From cd26a19f4f6652aafd63cd8625269a8defbc5c44 Mon Sep 17 00:00:00 2001 From: trashmasteruni Date: Fri, 16 Oct 2026 20:50:19 +0200 Subject: [PATCH] fixed bga events --- events/dlc/fp2/fp2_struggle_events.txt | 11764 +--------------- ...p3_story_cycle_seljuks_invasion_events.txt | 1 + .../fp3_story_cycle_zanj_rebellion_events.txt | 727 +- .../heresy/pam_heresy_historical_events.txt | 1 + events/dlc/pam/heresy/pam_heresy_pulse.txt | 93 + events/dlc/pam/pam_adorcism_events.txt | 199 + events/dlc/pam/pam_antipope_events.txt | 1057 ++ .../pam/pam_christian_situation_events.txt | 1 + events/dlc/pam/pam_clergy_events.txt | 1027 ++ events/dlc/pam/pam_decision_events.txt | 3574 +++++ events/dlc/pam/pam_generic_events.txt | 1909 +++ events/dlc/pam/pam_great_projects_events.txt | 3310 +++++ events/dlc/pam/pam_interactions_events.txt | 5575 ++++++++ .../dlc/pam/pam_religious_artifact_events.txt | 345 + events/dlc/pam/pam_saint_events.txt | 519 + events/dlc/pam/pam_secular_faith_events.txt | 8327 +++++++++++ .../dlc/pam/pam_theocratic_ruler_events.txt | 3149 +++++ .../story_cycles/ep3_story_cycle_el_cid.txt | 1 + .../fp2_story_cycle_bell_of_huesca.txt | 1 + .../pam_story_cycle_slavic_rite_events.txt | 1 + 20 files changed, 29092 insertions(+), 12489 deletions(-) create mode 100644 events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt create mode 100644 events/dlc/pam/heresy/pam_heresy_historical_events.txt create mode 100644 events/dlc/pam/heresy/pam_heresy_pulse.txt create mode 100644 events/dlc/pam/pam_adorcism_events.txt create mode 100644 events/dlc/pam/pam_antipope_events.txt create mode 100644 events/dlc/pam/pam_christian_situation_events.txt create mode 100644 events/dlc/pam/pam_clergy_events.txt create mode 100644 events/dlc/pam/pam_decision_events.txt create mode 100644 events/dlc/pam/pam_generic_events.txt create mode 100644 events/dlc/pam/pam_great_projects_events.txt create mode 100644 events/dlc/pam/pam_interactions_events.txt create mode 100644 events/dlc/pam/pam_religious_artifact_events.txt create mode 100644 events/dlc/pam/pam_saint_events.txt create mode 100644 events/dlc/pam/pam_secular_faith_events.txt create mode 100644 events/dlc/pam/pam_theocratic_ruler_events.txt create mode 100644 events/story_cycles/ep3_story_cycle_el_cid.txt create mode 100644 events/story_cycles/fp2_story_cycle_bell_of_huesca.txt create mode 100644 events/story_cycles/pam_story_cycle_slavic_rite_events.txt diff --git a/events/dlc/fp2/fp2_struggle_events.txt b/events/dlc/fp2/fp2_struggle_events.txt index da2ba0055..5f282702b 100644 --- a/events/dlc/fp2/fp2_struggle_events.txt +++ b/events/dlc/fp2/fp2_struggle_events.txt @@ -1,11763 +1 @@ -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_struggle_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_struggle_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_struggle_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 = 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 = erudite -# 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 -# religion = religion:catholic_religion -# 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 -# this != root -# } -# 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:folk_germanic_religion -# scope:visionary_spouse= { -# has_religion = religion:folk_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_religion = religion:catholic_religion -# scope:visionary_spouse= { -# has_religion = religion:catholic_religion -# } -# } -# 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.title_province = { -# add_province_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 -# } -# title_province = { -# add_province_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 = { -# title_province = { -# add_province_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 = { -# title_province = { -# add_province_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 = erudite -# } -# 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 = erudite -# } -# 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 = 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 = 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 -# religion = religion:catholic_religion -# 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 -# religion = religion:catholic_religion -# 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 -# artifact_can_be_gift_to_trigger = { RECIPIENT = root } -# } -# } -# random_character_artifact = { -# limit = { -# NOT = { has_variable = historical_unique_artifact } -# artifact_high_rarity_trigger = yes -# artifact_can_be_gift_to_trigger = { RECIPIENT = root } -# } -# 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 -# artifact_can_be_gift_to_trigger = { RECIPIENT = root } -# } -# } -# random_character_artifact = { -# limit = { -# NOT = { has_variable = historical_unique_artifact } -# artifact_low_rarity_trigger = yes -# artifact_can_be_gift_to_trigger = { RECIPIENT = root } -# } -# 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 -# } -#} -# \ No newline at end of file + \ No newline at end of file diff --git a/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt b/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt b/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt index 22f8e62a8..5f282702b 100644 --- a/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt +++ b/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt @@ -1,726 +1 @@ -#namespace = fp3_story_cycle_zanj_rebellion_events -# -#### Ali Ibn Muhammad and Zanj Rebellion Setup -#fp3_story_cycle_zanj_rebellion_events.0001 = { -# scope = none -# hidden = yes -# -# immediate = { -# spawn_zanj_leader_character_effect = yes -# scope:zanj_leader = { -# save_scope_as = story_owner -# create_story = story_zanj_rebellion -# give_nickname = nick_albaghid -# } -# -# title:c_basra.holder = { -# add_visiting_courtier = scope:zanj_leader -# } -# title:c_basra.holder.top_liege = { -# trigger_event = { -# id = fp3_story_cycle_zanj_rebellion_events.0002 -# } -# trigger_event = { -# id = fp3_story_cycle_zanj_rebellion_events.0005 -# days = { 60 120 } -# } -# } -# } -#} -# -#### Ali Ibn Muhammad riling up locals in Basra -#fp3_story_cycle_zanj_rebellion_events.0002 = { -# type = character_event -# theme = intrigue -# override_background = { reference = wilderness_wetlands } -# title = fp3_story_cycle_zanj_rebellion_events.0002.t -# desc = fp3_story_cycle_zanj_rebellion_events.0002.desc -# -# left_portrait = { -# character = root -# animation = marshal -# } -# right_portrait = { -# character = scope:zanj_leader -# animation = scheme -# } -# -# immediate = { -# scope:zanj_leader = { -# save_scope_as = outspoken_rebel -# } -# } -# -# #Try to arrest Ali -# option = { -# name = fp3_story_cycle_zanj_rebellion_events.0002.a -# duel = { -# skill = intrigue -# target = scope:outspoken_rebel -# 50 = { -# # You arrest Ali Ibn Muhammad -# desc = fp3_story_cycle_zanj_rebellion_events.0002.a.success -# compare_modifier = { -# value = scope:duel_value -# multiplier = 3.5 -# min = -49 -# } -# send_interface_toast = { -# title = fp3_story_cycle_zanj_rebellion_events.0002.a.success -# left_icon = root -# right_icon = scope:outspoken_rebel -# rightfully_imprison_character_effect = { -# TARGET = scope:outspoken_rebel -# IMPRISONER = root -# } -# } -# inherit_zanj_rebellion_effect = yes -# } -# 50 = { -# # Ali Ibn Muhammad escapes -# desc = fp3_story_cycle_zanj_rebellion_events.0002.a.failure -# compare_modifier = { -# value = scope:duel_value -# multiplier = -3.5 -# min = -49 -# } -# send_interface_toast = { -# title = fp3_story_cycle_zanj_rebellion_events.0002.a.failure -# custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_greatly_strengthened_tt -# custom_tooltip = fp3_story_cycle_zanj_rebellion_leaves_for_baghdad -# left_icon = root -# right_icon = scope:outspoken_rebel -# } -# hidden_effect = { -# scope:zanj_leader = { -# change_variable = { -# name = zanj_rebellion_strength_score -# add = 4 -# } -# } -# title:c_baghdad.holder = { -# hidden_effect = { -# title:c_baghdad.holder = { -# add_visiting_courtier = scope:outspoken_rebel -# } -# } -# } -# title:c_basra.holder.top_liege = { -# trigger_event = { -# id = fp3_story_cycle_zanj_rebellion_events.0003 -# days = { 30 60 } -# } -# } -# } -# } -# } -# root = { -# progress_towards_rival_effect = { -# REASON = fp3_zanj_rebellion_opressed_me -# CHARACTER = scope:outspoken_rebel -# OPINION = default_rival_opinion -# } -# } -# stress_impact = { -# paranoid = medium_stress_impact_loss -# just = minor_stress_impact_loss -# callous = minor_stress_impact_loss -# sadistic = minor_stress_impact_loss -# trusting = medium_stress_impact_gain -# forgiving = medium_stress_impact_gain -# compassionate = medium_stress_impact_gain -# } -# ai_chance = { -# base = 100 -# modifier = { -# factor = 0.5 -# OR = { -# has_trait = trusting -# has_trait = forgiving -# has_trait = compassionate -# } -# } -# } -# } -# -# #Ignore Ali -# option = { -# name = fp3_story_cycle_zanj_rebellion_events.0002.c -# custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_strengthened_tt -# scope:zanj_leader = { -# change_variable = { -# name = zanj_rebellion_strength_score -# add = 2 -# } -# } -# custom_tooltip = fp3_story_cycle_zanj_rebellion_leaves_for_baghdad -# hidden_effect = { -# title:c_baghdad.holder = { -# add_visiting_courtier = scope:outspoken_rebel -# } -# } -# title:c_basra.holder.top_liege = { -# trigger_event = { -# id = fp3_story_cycle_zanj_rebellion_events.0003 -# days = { 30 60 } -# } -# } -# stress_impact = { -# paranoid = medium_stress_impact_gain -# just = minor_stress_impact_gain -# callous = minor_stress_impact_gain -# sadistic = medium_stress_impact_gain -# trusting = medium_stress_impact_loss -# forgiving = medium_stress_impact_loss -# compassionate = medium_stress_impact_loss -# } -# ai_chance = { -# base = 100 -# modifier = { -# factor = 0.5 -# OR = { -# has_trait = paranoid -# has_trait = just -# has_trait = callous -# has_trait = sadistic -# } -# } -# } -# } -#} -# -#### Setup to find correct scope for event 0004 and check if Ali is dead or imprisoned -#fp3_story_cycle_zanj_rebellion_events.0003 = { -# scope = none -# hidden = yes -# -# immediate = { -# if ={ -# #check if Ali is still alive and not in prison and is not an inheritor of the rebellion -# limit = { -# scope:zanj_leader = { -# AND = { -# is_alive = yes -# is_imprisoned = no -# NOT = { has_character_flag = new_zanj_leader } -# } -# } -# } -# title:c_baghdad.holder.top_liege = { -# trigger_event = { -# id = fp3_story_cycle_zanj_rebellion_events.0004 -# } -# } -# } -# } -#} -# -#### Ali Ibn Muhammad claims divinity -#fp3_story_cycle_zanj_rebellion_events.0004 = { -# type = character_event -# theme = faith -# title = fp3_story_cycle_zanj_rebellion_events.0004.t -# desc = fp3_story_cycle_zanj_rebellion_events.0004.desc -# -# left_portrait = { -# character = root -# animation = dismissal -# } -# right_portrait = { -# character = scope:zanj_leader -# animation = personality_zealous -# } -# -# #Contest Ali Ibn Muhammad's claims -# option = { -# name = fp3_story_cycle_zanj_rebellion_events.0004.a -# duel = { -# skill = learning -# target = scope:zanj_leader -# 50 = { -# # You disprove Ali's claims -# desc = fp3_story_cycle_zanj_rebellion_events.0004.a.success -# compare_modifier = { -# value = scope:duel_value -# multiplier = 3.5 -# min = -49 -# } -# send_interface_toast = { -# title = fp3_story_cycle_zanj_rebellion_events.0004.a.success -# add_piety = medium_piety_gain -# add_prestige = minor_prestige_gain -# left_icon = root -# right_icon = scope:zanj_leader -# } -# } -# 50 = { -# # Ali Ibn Muhammad validates his claims -# desc = fp3_story_cycle_zanj_rebellion_events.0004.a.failure -# compare_modifier = { -# value = scope:duel_value -# multiplier = -3.5 -# min = -49 -# } -# custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_greatly_strengthened_tt -# send_interface_toast = { -# title = fp3_story_cycle_zanj_rebellion_events.0004.a.failure -# left_icon = root -# right_icon = scope:zanj_leader -# -# scope:zanj_leader = { -# add_trait = sayyid -# add_pressed_claim = title:e_arabia -# change_variable = { -# name = zanj_rebellion_strength_score -# add = 4 -# } -# } -# } -# } -# } -# root = { -# progress_towards_rival_effect = { -# REASON = fp3_zanj_rebellion_opressed_me -# CHARACTER = scope:zanj_leader -# OPINION = default_rival_opinion -# } -# } -# stress_impact = { -# paranoid = minor_stress_impact_loss -# just = minor_stress_impact_loss -# zealous = medium_stress_impact_loss -# trusting = medium_stress_impact_gain -# forgiving = medium_stress_impact_gain -# cynical = medium_stress_impact_gain -# } -# ai_chance = { -# base = 100 -# modifier = { -# factor = 0.5 -# OR = { -# has_trait = cynical -# has_trait = trusting -# has_trait = forgiving -# } -# } -# } -# } -# -# #Ignore Ali -# option = { -# name = fp3_story_cycle_zanj_rebellion_events.0004.b -# custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_strengthened_tt -# -# scope:zanj_leader = { -# add_trait = sayyid -# add_pressed_claim = title:e_arabia -# change_variable = { -# name = zanj_rebellion_strength_score -# add = 2 -# } -# } -# stress_impact = { -# paranoid = minor_stress_impact_gain -# just = minor_stress_impact_gain -# zealous = medium_stress_impact_gain -# trusting = minor_stress_impact_loss -# forgiving = medium_stress_impact_loss -# cynical = medium_stress_impact_loss -# } -# ai_chance = { -# base = 100 -# modifier = { -# factor = 0.5 -# OR = { -# has_trait = paranoid -# has_trait = just -# has_trait = zealous -# } -# } -# } -# } -#} -# -#### Setup event to find the correct scope and check if Ali or the current Zanj Leader is dead or imprisoned -#fp3_story_cycle_zanj_rebellion_events.0005 = { -# scope = none -# hidden = yes -# immediate = { -# if = { -# limit = { -# scope:zanj_leader = { -# OR = { -# is_imprisoned = yes -# is_alive = no -# is_landed = yes -# } -# } -# } -# inherit_zanj_rebellion_effect = yes -# } -# title:c_basra.holder.top_liege = { -# trigger_event = { -# id = fp3_story_cycle_zanj_rebellion_events.0006 -# } -# } -# } -#} -# -#### A Zanj Steps Forth -#fp3_story_cycle_zanj_rebellion_events.0006 = { -# type = character_event -# theme = corruption -# title = fp3_story_cycle_zanj_rebellion_events.0006.t -# desc = { -# desc = fp3_story_cycle_zanj_rebellion_events.0006.desc.a -# -# triggered_desc = { -# trigger = { scope:zanj_leader = { NOT = { has_character_flag = new_zanj_leader } } } -# desc = fp3_story_cycle_zanj_rebellion_events.0006.desc.b -# } -# -# desc = fp3_story_cycle_zanj_rebellion_events.0006.desc.c -# } -# -# left_portrait = { -# character = root -# animation = eyeroll -# } -# -# right_portrait = { -# character = scope:outspoken_rebel -# animation = worry -# } -# -# lower_left_portrait = { -# trigger = { scope:zanj_leader = { NOT = { has_character_flag = new_zanj_leader } } } -# character = scope:zanj_leader -# } -# -# immediate = { -# if = { -# limit = { scope:zanj_leader = { NOT = { has_character_flag = new_zanj_leader } } } -# spawn_zanj_representative_character_effect = yes -# scope:zanj_representative = { save_scope_as = outspoken_rebel } -# } -# else = { -# scope:zanj_leader = { save_scope_as = outspoken_rebel } -# } -# } -# #Give Basra to the Zanj -# option = { -# name = fp3_story_cycle_zanj_rebellion_events.0006.a -# -# create_title_and_vassal_change = { -# type = independency -# save_scope_as = change -# add_claim_on_loss = no -# } -# -# title:c_basra = { -# set_county_culture = culture:east_bantu -# set_county_faith = faith:azariqa -# } -# -# show_as_tooltip = { # UI/UX -# title:c_basra = { -# change_title_holder = { -# holder = scope:outspoken_rebel -# change = scope:change -# } -# } -# } -# -# scope:outspoken_rebel = { -# becomes_independent = { -# change = scope:change -# } -# add_truce_both_ways = { -# character = root -# years = 10 -# name = fp3_landed_zanj_reason -# } -# } -# -# if = { -# limit = { -# NOT = { title:c_basra.holder = root } -# } -# add_tyranny = 30 -# set_relation_rival = { -# reason = fp3_rival_gave_title_away -# target = title:c_basra.holder -# } -# } -# -# hidden_effect = { -# title:c_basra = { -# change_title_holder = { -# holder = scope:outspoken_rebel -# change = scope:change -# } -# every_de_jure_county = { -# change_title_holder = { -# holder = scope:outspoken_rebel -# change = scope:change -# } -# } -# } -# scope:zanj_leader = { -# random_owned_story = { -# type = story_zanj_rebellion -# end_story = yes -# } -# } -# } -# resolve_title_and_vassal_change = scope:change -# -# stress_impact = { -# compassionate = medium_stress_impact_loss -# just = minor_stress_impact_loss -# forgiving = minor_stress_impact_loss -# generous = medium_stress_impact_loss -# content = medium_stress_impact_loss -# callous = medium_stress_impact_gain -# sadistic = major_stress_impact_gain -# ambitious = medium_stress_impact_gain -# greedy = medium_stress_impact_gain -# } -# ai_chance = { -# base = 100 -# modifier = { -# factor = 0.5 -# OR = { -# has_trait = callous -# has_trait = sadistic -# has_trait = ambitious -# has_trait = greedy -# } -# } -# } -# } -# -# #Make minor concessions to the Zanj -# option = { -# name = fp3_story_cycle_zanj_rebellion_events.0006.b -# -# scope:zanj_leader = { -# change_variable = { -# name = zanj_rebellion_strength_score -# add = 3 -# } -# } -# custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_strengthened_tt -# hidden_effect = { -# title:c_basra.holder = { -# if = { -# limit = { scope:zanj_leader != scope:outspoken_rebel} -# add_visiting_courtier = scope:zanj_leader -# } -# add_visiting_courtier = scope:outspoken_rebel -# } -# } -# -# if = { -# limit = { -# NOT = { title:c_basra.holder = root } -# } -# progress_towards_rival_effect = { -# REASON = fp3_zanj_rebellion_interfered_with_my_workers -# CHARACTER = title:c_basra.holder -# OPINION = default_rival_opinion -# } -# } -# -# title:c_basra = { -# add_county_modifier = { -# modifier = fp3_zanj_rebellion_work_concessions_modifier -# years = 5 -# } -# } -# -# trigger_event = { -# id = fp3_story_cycle_zanj_rebellion_events.0007 -# days = { 30 60 } -# } -# stress_impact = { -# compassionate = minor_stress_impact_loss -# just = minor_stress_impact_loss -# forgiving = minor_stress_impact_loss -# generous = minor_stress_impact_loss -# content = minor_stress_impact_loss -# callous = minor_stress_impact_gain -# sadistic = medium_stress_impact_gain -# ambitious = minor_stress_impact_gain -# greedy = minor_stress_impact_gain -# } -# ai_chance = { -# base = 100 -# modifier = { -# factor = 0.5 -# OR = { -# has_trait = callous -# has_trait = sadistic -# has_trait = ambitious -# has_trait = greedy -# } -# } -# } -# } -# -# #Ignore the Zanj -# option = { -# name = fp3_story_cycle_zanj_rebellion_events.0006.c -# -# scope:zanj_leader = { -# change_variable = { -# name = zanj_rebellion_strength_score -# add = 5 -# } -# } -# custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_greatly_strengthened_tt -# hidden_effect = { -# title:c_basra.holder = { -# add_visiting_courtier = scope:zanj_leader -# add_visiting_courtier = scope:zanj_representative -# } -# } -# -# if = { -# limit = { -# NOT = { title:c_basra.holder = root } -# } -# -# progress_towards_friend_effect = { -# REASON = fp3_rival_stayed_out_of_my_business -# CHARACTER = title:c_basra.holder -# OPINION = default_friend_opinion -# } -# } -# -# trigger_event = { -# id = fp3_story_cycle_zanj_rebellion_events.0007 -# days = { 30 60 } -# } -# -# stress_impact = { -# compassionate = minor_stress_impact_gain -# just = minor_stress_impact_gain -# forgiving = minor_stress_impact_gain -# generous = minor_stress_impact_gain -# content = minor_stress_impact_gain -# callous = minor_stress_impact_loss -# sadistic = medium_stress_impact_loss -# ambitious = minor_stress_impact_loss -# greedy = minor_stress_impact_loss -# } -# ai_chance = { -# base = 100 -# modifier = { -# factor = 0.5 -# OR = { -# has_trait = compassionate -# has_trait = just -# has_trait = forgiving -# has_trait = generous -# } -# } -# } -# } -#} -# -#fp3_story_cycle_zanj_rebellion_events.0007 = { -# scope = none -# hidden = yes -# immediate = { -# if = { -# limit = { -# scope:zanj_leader = { -# OR = { -# is_imprisoned = yes -# is_alive = no -# is_landed = yes -# } -# } -# } -# inherit_zanj_rebellion_effect = yes -# } -# title:c_basra.holder.top_liege = { -# trigger_event = { -# id = fp3_story_cycle_zanj_rebellion_events.0008 -# -# } -# } -# } -#} -# -#### The Zanj Rebellion -#fp3_story_cycle_zanj_rebellion_events.0008 = { -# type = character_event -# theme = battle -# override_background = { reference = wilderness_wetlands } -# title = fp3_story_cycle_zanj_rebellion_events.0008.t -# desc = { -# desc = fp3_story_cycle_zanj_rebellion_events.0008.desc.a -# triggered_desc = { -# trigger = { -# scope:zanj_leader = { NOT = { has_character_flag = new_zanj_leader}} -# } -# desc = fp3_story_cycle_zanj_rebellion_events.0008.desc.b -# } -# triggered_desc = { -# trigger = { -# scope:zanj_leader = { has_character_flag = new_zanj_leader } -# } -# desc = fp3_story_cycle_zanj_rebellion_events.0008.desc.c -# } -# desc = fp3_story_cycle_zanj_rebellion_events.0008.desc.d -# } -# -# left_portrait = { -# character = root -# animation = shock -# } -# right_portrait = { -# character = scope:zanj_leader -# animation = celebrate_sword -# } -# -# immediate = { -# scope:zanj_leader = { -# give_nickname = nick_chief_of_the_zanj -# hidden_effect = { -# random_owned_story = { -# type = story_zanj_rebellion -# end_story = yes -# } -# } -# } -# hidden_effect = { -# fp3_start_zanj_rebellion_effect = { -# TARGET_COUNTY = title:c_basra -# REBEL_LEADER = scope:zanj_leader -# } -# create_zanj_courtier_effect = { -# EMPLOYER = scope:zanj_leader -# LOCATION = scope:zanj_leader.location -# } -# create_zanj_courtier_effect = { -# EMPLOYER = scope:zanj_leader -# LOCATION = scope:zanj_leader.location -# } -# create_zanj_courtier_effect = { -# EMPLOYER = scope:zanj_leader -# LOCATION = scope:zanj_leader.location -# } -# create_zanj_courtier_effect = { -# EMPLOYER = scope:zanj_leader -# LOCATION = scope:zanj_leader.location -# } -# } -# } -# -# option = { -# name = fp3_story_cycle_zanj_rebellion_events.0008.a -# } -#} \ No newline at end of file + \ No newline at end of file diff --git a/events/dlc/pam/heresy/pam_heresy_historical_events.txt b/events/dlc/pam/heresy/pam_heresy_historical_events.txt new file mode 100644 index 000000000..178774eed --- /dev/null +++ b/events/dlc/pam/heresy/pam_heresy_historical_events.txt @@ -0,0 +1 @@ +# we can repopulate this if we want to make our own historical heresy outbreaks \ No newline at end of file diff --git a/events/dlc/pam/heresy/pam_heresy_pulse.txt b/events/dlc/pam/heresy/pam_heresy_pulse.txt new file mode 100644 index 000000000..ac9151561 --- /dev/null +++ b/events/dlc/pam/heresy/pam_heresy_pulse.txt @@ -0,0 +1,93 @@ +namespace = heresy_pulse + +#################################################################### +# Heresy outbreak system - Router # +#################################################################### +# Faith pulse: faith_heresy_events_pulse runs once a month per faith and +# fires heresy_pulse.0001 when fervor is critically low. +# The router picks Component 1 (light divergence), 2 (dangerous new rite), or 3 (historical heresy, Christianity-only) +# using pluralism + Christian Situation phase weights, and sets the cooldown variable that gates re-runs. + +##################################### +# 0001 - Component selection router # +##################################### + +heresy_pulse.0001 = { + hidden = yes + scope = faith + + immediate = { + save_scope_as = origin_faith + + random_list = { + # Component 1 - light rite divergence (most common) + 50 = { + trigger = { + any_faith_rite = { + this != root.main_rite + rite_counties >= 1 + head_of_rite ?= { is_ai = yes } + } + } + # Pluralism severity scaling + modifier = { + factor = 0.2 + main_rite = { rite_has_parameter = pluralism_fundamentalist_vulnerable_to_heresy } + } + modifier = { + factor = 1.6 + main_rite = { rite_has_parameter = pluralism_pluralistic_resistant_to_heresy } + } + scope:origin_faith = { + trigger_event = heresy_light.0001 + pam_heresy_set_pulse_cooldown_effect = yes + } + } + + # Component 2 - new dangerously divergent rite (rare) + 20 = { + # Hard 60% main-rite share gate. + trigger = { + pam_heresy_c2_main_rite_dominant_trigger = yes + } + # Pluralism severity scaling + modifier = { + factor = 1 + main_rite = { rite_has_parameter = pluralism_fundamentalist_vulnerable_to_heresy } + } + modifier = { + factor = 0.5 + main_rite = { rite_has_parameter = pluralism_pluralistic_resistant_to_heresy } + } + modifier = { + factor = 0.1 + rite_growth_rites_needed <= 0 + } + scope:origin_faith = { + trigger_event = heresy_dangerous_rite.0001 + pam_heresy_set_pulse_cooldown_effect = yes + } + } + + # Component 3 - historical heresy outbreak (Christianity-only) + 10 = { + trigger = { + pam_heresy_c3_eligible_trigger = yes + } + # Pluralism severity scaling (C3 is the most pluralism-sensitive) + modifier = { + factor = 3 + main_rite = { rite_has_parameter = pluralism_fundamentalist_vulnerable_to_heresy } + } + modifier = { + factor = 0.5 + main_rite = { rite_has_parameter = pluralism_pluralistic_resistant_to_heresy } + } + scope:origin_faith = { + trigger_event = heresy_historical.0001 + pam_heresy_set_pulse_cooldown_effect = yes + } + } + } + } +} diff --git a/events/dlc/pam/pam_adorcism_events.txt b/events/dlc/pam/pam_adorcism_events.txt new file mode 100644 index 000000000..971ef8fba --- /dev/null +++ b/events/dlc/pam/pam_adorcism_events.txt @@ -0,0 +1,199 @@ +namespace = pam_adorcism_events + +################################################## +# Adorcism personal-tenet decisions +# +# 0001 Curse Enemy +# 0002 Curse Enemy - target letter +# 0101 Seek Aid for War +################################################## + +pam_adorcism_events.0001 = { + type = character_event + title = pam_adorcism_events.0001.t + desc = pam_adorcism_events.0001.desc + theme = faith + override_background = { reference = fp3_cave } + override_effect_2d = { reference = fog } + + left_portrait = { + character = root + animation = divine_ecstasy + } + lower_right_portrait = { + character = scope:pam_adorcism_curse_target + animation = worry + } + + trigger = { + has_personal_tenet_flag = tenet_adorcism_curse_enemy + pam_adorcism_curse_target_is_valid_trigger = { + TARGET = scope:pam_adorcism_curse_target + ACTOR = root + } + } + + option = { + name = pam_adorcism_events.0001.a + add_character_modifier = { + modifier = pam_adorcism_curse_focus_modifier + years = 3 + } + add_stress = major_stress_loss + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + save_scope_as = pam_adorcism_curser + + if = { + limit = { + pam_adorcism_curse_target_is_valid_trigger = { + TARGET = scope:pam_adorcism_curse_target + ACTOR = root + } + } + scope:pam_adorcism_curse_target = { + if = { + limit = { + rite = root.rite + } + add_character_modifier = { + modifier = pam_adorcism_ill_omen_modifier + years = 1 + } + } + if = { + limit = { + OR = { + rite = root.rite + probably_superstitious = yes + } + } + add_character_modifier = { + modifier = pam_adorcism_curse_anxiety_modifier + years = 1 + } + trigger_event = pam_adorcism_events.0002 + } + } + } + } +} + +pam_adorcism_events.0002 = { + type = letter_event + opening = pam_adorcism_events.0002.opening + desc = { + desc = pam_adorcism_events.0002.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:pam_adorcism_curser = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + } + desc = pam_adorcism_events.0002.desc.christian + } + desc = pam_adorcism_events.0002.desc.default + } + } + sender = scope:pam_adorcism_curser + + trigger = { + exists = scope:pam_adorcism_curser + scope:pam_adorcism_curser = { is_alive = yes } + has_character_modifier = pam_adorcism_curse_anxiety_modifier + } + + option = { + name = pam_adorcism_events.0002.a + flavor = pam_adorcism_events.0002.a.flavor + show_as_tooltip = { + add_character_modifier = { + modifier = pam_adorcism_curse_anxiety_modifier + years = 1 + } + } + } +} + +pam_adorcism_events.0101 = { + type = character_event + title = pam_adorcism_events.0101.t + desc = pam_adorcism_events.0101.desc + theme = war + override_background = { reference = battlefield } + + left_portrait = { + character = root + animation = war_attacker + } + + trigger = { + has_personal_tenet_flag = tenet_adorcism_seek_war_aid + is_at_war = yes + } + + option = { + name = pam_adorcism_events.0101.a + add_character_modifier = { + modifier = pam_adorcism_battle_guidance_modifier + years = 3 + } + ai_chance = { + base = 100 + modifier = { + add = 50 + OR = { + has_trait = brave + has_trait = ambitious + } + } + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = pam_adorcism_events.0101.b + add_character_modifier = { + modifier = pam_adorcism_personal_vigor_modifier + years = 3 + } + ai_chance = { + base = 75 + modifier = { + add = 75 + has_trait = brave + } + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = pam_adorcism_events.0101.c + add_character_modifier = { + modifier = pam_adorcism_campaign_endurance_modifier + years = 3 + } + ai_chance = { + base = 100 + modifier = { + add = 50 + OR = { + has_trait = patient + has_trait = diligent + } + } + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} diff --git a/events/dlc/pam/pam_antipope_events.txt b/events/dlc/pam/pam_antipope_events.txt new file mode 100644 index 000000000..166d474f7 --- /dev/null +++ b/events/dlc/pam/pam_antipope_events.txt @@ -0,0 +1,1057 @@ +namespace = pam_antipope_events + +pam_antipope_events.0001 = { + type = character_event + title = pam_antipope_events.0001.t + desc = { + desc = pam_antipope_events.0001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + this = scope:antipope + } + desc = pam_antipope_events.0001.desc.self + } + desc = pam_antipope_events.0001.desc.sponsor + } + } + theme = christian + left_portrait = { + character = root + triggered_animation = { + trigger = { this = scope:antipope } + animation = preaching + } + animation = personality_zealous + } + right_portrait = { + trigger = { + NOT = { this = root } + } + character = scope:antipope + animation = preaching + } + lower_center_portrait = { + character = scope:pope + animation = anger + } + + immediate = { + save_scope_as = antipope_declarer + if = { + limit = { NOT = { exists = scope:antipope } } + save_scope_as = antipope + save_scope_as = antipope_self + pam_establish_antipope_effect = { + ANTIPOPE = root + SPONSOR = root + } + scope:pope = { + if = { + limit = { can_set_relation_rival_trigger = { CHARACTER = root } } + set_relation_rival = { + target = root + reason = rival_declared_antipope + } + } + } + } + else = { + pam_establish_antipope_effect = { + ANTIPOPE = scope:antipope + SPONSOR = root + } + scope:pope = { + if = { + limit = { can_set_relation_rival_trigger = { CHARACTER = scope:antipope } } + set_relation_rival = { + target = scope:antipope + reason = rival_declared_antipope + } + } + add_opinion = { + opinion = -25 + target = root + modifier = angry_opinion + } + } + } + } + + option = { + name = pam_antipope_events.0001.a + show_as_tooltip = { + scope:antipope = { get_title = scope:new_title } + } + hidden_effect = { + every_player = { + limit = { + faith.religion = scope:antipope.religion + NOR = { + this = scope:sponsor + this = scope:antipope + } + } + trigger_event = { + id = pam_antipope_events.0002 + days = 1 + } + } + } + } +} + +# Letter notification to players of the Antipope's religion when a new Antipope is declared +pam_antipope_events.0002 = { + type = letter_event + opening = pam_antipope_events.0002.opening + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antipope_self } + desc = pam_antipope_events.0002.desc.antipope_self + } + desc = pam_antipope_events.0002.desc.challenger_sponsor + } + desc = pam_antipope_events.0002.desc.outro + } + sender = scope:antipope_declarer + + option = { + name = pam_antipope_events.0002.a + } +} + +### EVENT LIST #################################################################### +## 0010 The Head of Faith kept his seat: judge the rival who challenged him +## 0011 The Head of Faith kept his seat: judge the ruler who backed that rival +## 0012 The challenge succeeded: judge the deposed Head of Faith +## 0014 The judged character learns what happens to them +## 0015 Letter telling the rest of the faith how the war ended +################################################################################### + +scripted_effect pam_challenge_hof_war_judge_imprison_effect = { + rightfully_imprison_character_less_verbose_effect = { + TARGET = $TARGET$ + IMPRISONER = root + } + $TARGET$ = { + set_variable = { + name = pam_ch_hof_fate + value = flag:imprisoned + days = 30 + } + } +} + +scripted_trigger pam_challenge_hof_war_torture_harm_possible_trigger = { + OR = { + NOT = { has_trait = blind } + NOT = { has_trait = disfigured } + AND = { + is_eunuch_trigger = no + is_male = yes + } + NOT = { has_trait = maimed } + NOT = { has_trait = scarred } + } +} + +# $VICTIM$: a Sadistic or Torturer judge can use this while harm remains, in place of imprison +scripted_trigger pam_challenge_hof_war_judge_torture_option_available_trigger = { + OR = { + has_trait = sadistic + has_trait = torturer + } + $VICTIM$ = { + pam_challenge_hof_war_torture_harm_possible_trigger = yes + } +} + +# $TARGET$: we excommunicate, imprison, and add one random lasting injury, but they do not die +scripted_effect pam_challenge_hof_war_judge_torture_harm_effect = { + pam_challenge_hof_war_judge_excommunicate_effect = { TARGET = $TARGET$ } + pam_challenge_hof_war_judge_imprison_effect = { TARGET = $TARGET$ } + reverse_add_opinion = { + target = $TARGET$ + modifier = tortured_me + } + $TARGET$ = { + set_variable = { + name = pam_ch_hof_fate + value = flag:tortured + days = 30 + } + add_character_modifier = { + modifier = recently_tortured + years = 5 + } + custom_tooltip = pam_challenge_hof_war_random_permanent_harm_tt + hidden_effect = { + random_list = { + 1 = { + trigger = { NOT = { has_trait = blind } } + add_trait = blind + } + 1 = { + trigger = { NOT = { has_trait = disfigured } } + add_trait = disfigured + } + 1 = { + trigger = { + is_eunuch_trigger = no + is_male = yes + } + add_eunuch_trait_effect = yes + } + 1 = { + trigger = { NOT = { has_trait = maimed } } + apply_maimed_trait_and_modifier_effect = yes + } + 1 = { + trigger = { NOT = { has_trait = scarred } } + add_trait = scarred + } + } + } + } +} + +scripted_effect pam_challenge_hof_war_judge_excommunicate_effect = { + pam_challenge_hof_war_excommunicate_if_possible_effect = { TARGET = $TARGET$ } +} + +scripted_effect pam_challenge_hof_war_judge_mercy_effect = { + $TARGET$ = { + set_variable = { + name = pam_ch_hof_fate + value = flag:mercy + days = 30 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + add_piety = medium_piety_gain + pam_challenge_hof_war_notify_victim_fate_effect = { + VICTIM = $TARGET$ + JUDGE = root + } +} + +scripted_effect pam_challenge_hof_war_chain_sponsor_judgment_or_followup_effect = { + if = { + limit = { + exists = scope:pam_ch_hof_sponsor + exists = scope:pam_ch_hof_challenger + NOT = { scope:pam_ch_hof_sponsor = scope:pam_ch_hof_challenger } + scope:pam_ch_hof_sponsor = { is_alive = yes } + } + trigger_event = { + id = pam_antipope_events.0011 + days = 1 + } + } + else = { + pam_challenge_hof_war_fire_followup_events_effect = yes + } +} + +###################################### +# Defender victory: judge challenger # +# By Laurence Kennedy # +###################################### + +pam_antipope_events.0010 = { + type = character_event + title = pam_antipope_events.0010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0010.desc.christian + } + desc = pam_antipope_events.0010.desc + } + } + theme = faith + override_background = { reference = battlefield } + override_effect_2d = { reference = smoke } + left_portrait = { + character = root + animation = celebrate_sword + } + right_portrait = { + character = scope:pam_ch_hof_challenger + animation = fear + } + + trigger = { + var:pam_ch_hof_challenger ?= { is_alive = yes } + } + + on_trigger_fail = { + pam_challenge_hof_war_restore_scopes_from_vars_effect = yes + pam_challenge_hof_war_chain_sponsor_judgment_or_followup_effect = yes + } + + immediate = { + pam_challenge_hof_war_restore_scopes_from_vars_effect = yes + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0010.a.christian + } + desc = pam_antipope_events.0010.a + } + } + } + trigger = { + NOT = { + pam_challenge_hof_war_judge_torture_option_available_trigger = { VICTIM = scope:pam_ch_hof_challenger } + } + } + pam_challenge_hof_war_judge_excommunicate_effect = { TARGET = scope:pam_ch_hof_challenger } + pam_challenge_hof_war_judge_imprison_effect = { TARGET = scope:pam_ch_hof_challenger } + pam_challenge_hof_war_notify_victim_fate_effect = { + VICTIM = scope:pam_ch_hof_challenger + JUDGE = root + } + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0010.b.christian + } + desc = pam_antipope_events.0010.b + } + } + } + pam_challenge_hof_war_try_execute_effect = { + VICTIM = scope:pam_ch_hof_challenger + EXECUTIONER = root + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + } + } + + option = { + name = pam_antipope_events.0010.c + pam_challenge_hof_war_judge_mercy_effect = { TARGET = scope:pam_ch_hof_challenger } + if = { + limit = { is_playable_character = yes } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + } + } + + option = { + name = pam_antipope_events.0010.d + trigger = { + pam_challenge_hof_war_judge_torture_option_available_trigger = { VICTIM = scope:pam_ch_hof_challenger } + } + trait = sadistic + pam_challenge_hof_war_judge_torture_harm_effect = { TARGET = scope:pam_ch_hof_challenger } + pam_challenge_hof_war_notify_victim_fate_effect = { + VICTIM = scope:pam_ch_hof_challenger + JUDGE = root + } + add_dread = medium_dread_gain + add_intrigue_lifestyle_xp = minor_lifestyle_xp + stress_and_fulfillment_impact = { + sadistic = medium_stress_impact_loss + torturer = medium_stress_impact_loss + compassionate = major_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + } + } + modifier = { + add = 150 + OR = { + has_trait = sadistic + has_trait = torturer + } + } + } + } + + after = { + pam_challenge_hof_war_chain_sponsor_judgment_or_followup_effect = yes + } +} + +################################### +# Defender victory: judge sponsor # +# By Laurence Kennedy # +################################### + +pam_antipope_events.0011 = { + type = character_event + title = pam_antipope_events.0011.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0011.desc.christian + } + desc = pam_antipope_events.0011.desc + } + } + theme = faith + override_background = { reference = dungeon } + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:pam_ch_hof_sponsor + animation = beg + } + lower_right_portrait = { + trigger = { + exists = scope:pam_ch_hof_challenger + is_alive = yes + } + character = scope:pam_ch_hof_challenger + } + + trigger = { + var:pam_ch_hof_sponsor ?= { is_alive = yes } + } + + on_trigger_fail = { + pam_challenge_hof_war_fire_followup_events_effect = yes + } + + immediate = { + pam_challenge_hof_war_restore_scopes_from_vars_effect = yes + } + + option = { + name = pam_antipope_events.0011.a + trigger = { + NOT = { + pam_challenge_hof_war_judge_torture_option_available_trigger = { VICTIM = scope:pam_ch_hof_sponsor } + } + } + pam_challenge_hof_war_judge_excommunicate_effect = { TARGET = scope:pam_ch_hof_sponsor } + pam_challenge_hof_war_judge_imprison_effect = { TARGET = scope:pam_ch_hof_sponsor } + pam_challenge_hof_war_notify_victim_fate_effect = { + VICTIM = scope:pam_ch_hof_sponsor + JUDGE = root + } + } + + option = { + name = pam_antipope_events.0011.b + pam_challenge_hof_war_try_execute_effect = { + VICTIM = scope:pam_ch_hof_sponsor + EXECUTIONER = root + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + } + } + + option = { + name = pam_antipope_events.0011.c + pam_challenge_hof_war_judge_mercy_effect = { TARGET = scope:pam_ch_hof_sponsor } + if = { + limit = { is_playable_character = yes } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + } + } + + option = { + name = pam_antipope_events.0011.d + trigger = { + pam_challenge_hof_war_judge_torture_option_available_trigger = { VICTIM = scope:pam_ch_hof_sponsor } + } + trait = sadistic + pam_challenge_hof_war_judge_torture_harm_effect = { TARGET = scope:pam_ch_hof_sponsor } + pam_challenge_hof_war_notify_victim_fate_effect = { + VICTIM = scope:pam_ch_hof_sponsor + JUDGE = root + } + add_dread = medium_dread_gain + add_intrigue_lifestyle_xp = minor_lifestyle_xp + stress_and_fulfillment_impact = { + sadistic = medium_stress_impact_loss + torturer = medium_stress_impact_loss + compassionate = major_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + } + } + modifier = { + add = 150 + OR = { + has_trait = sadistic + has_trait = torturer + } + } + } + } + + after = { + pam_challenge_hof_war_fire_followup_events_effect = yes + } +} + +######################################### +# Attacker victory: judge deposed pope # +# By Laurence Kennedy # +######################################### + +pam_antipope_events.0012 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0012.t.christian + } + desc = pam_antipope_events.0012.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:pam_ch_hof_sponsor + exists = scope:pam_ch_hof_new_hof + this = scope:pam_ch_hof_sponsor + } + desc = pam_antipope_events.0012.intro.sponsor + } + triggered_desc = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0012.intro.christian + } + desc = pam_antipope_events.0012.intro + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0012.dialogue.christian + } + desc = pam_antipope_events.0012.dialogue + } + } + theme = faith + override_background = { reference = battlefield } + override_effect_2d = { reference = smoke } + left_portrait = { + character = root + animation = celebrate_sword + } + right_portrait = { + character = scope:pam_ch_hof_old_hof + animation = shame + } + lower_left_portrait = { + trigger = { + exists = scope:pam_ch_hof_new_hof + exists = scope:pam_ch_hof_sponsor + root = scope:pam_ch_hof_sponsor + } + character = scope:pam_ch_hof_new_hof + } + + trigger = { + var:pam_ch_hof_var_carrier ?= { + var:pam_ch_hof_old_hof ?= { is_alive = yes } + } + } + + on_trigger_fail = { + pam_challenge_hof_war_fire_followup_events_effect = yes + } + + immediate = { + var:pam_ch_hof_var_carrier ?= { + pam_challenge_hof_war_restore_scopes_from_vars_effect = yes + } + } + + option = { + name = pam_antipope_events.0012.a + trigger = { + NOT = { + pam_challenge_hof_war_judge_torture_option_available_trigger = { VICTIM = scope:pam_ch_hof_old_hof } + } + } + pam_challenge_hof_war_judge_excommunicate_effect = { TARGET = scope:pam_ch_hof_old_hof } + pam_challenge_hof_war_judge_imprison_effect = { TARGET = scope:pam_ch_hof_old_hof } + scope:pam_ch_hof_old_hof = { + add_character_modifier = { + modifier = pam_deposed_pontiff_modifier + years = 20 + } + } + pam_challenge_hof_war_notify_victim_fate_effect = { + VICTIM = scope:pam_ch_hof_old_hof + JUDGE = root + } + } + + option = { + name = pam_antipope_events.0012.b + pam_challenge_hof_war_try_execute_effect = { + VICTIM = scope:pam_ch_hof_old_hof + EXECUTIONER = root + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + } + } + + option = { + name = pam_antipope_events.0012.c + pam_challenge_hof_war_judge_mercy_effect = { TARGET = scope:pam_ch_hof_old_hof } + if = { + limit = { is_playable_character = yes } + change_spiritual_fulfillment = major_spiritual_fulfillment_value + } + } + + option = { + name = pam_antipope_events.0012.d + trigger = { + pam_challenge_hof_war_judge_torture_option_available_trigger = { VICTIM = scope:pam_ch_hof_old_hof } + } + trait = sadistic + pam_challenge_hof_war_judge_torture_harm_effect = { TARGET = scope:pam_ch_hof_old_hof } + scope:pam_ch_hof_old_hof = { + add_character_modifier = { + modifier = pam_deposed_pontiff_modifier + years = 20 + } + } + pam_challenge_hof_war_notify_victim_fate_effect = { + VICTIM = scope:pam_ch_hof_old_hof + JUDGE = root + } + add_dread = medium_dread_gain + add_intrigue_lifestyle_xp = minor_lifestyle_xp + stress_and_fulfillment_impact = { + sadistic = medium_stress_impact_loss + torturer = medium_stress_impact_loss + compassionate = major_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + } + } + modifier = { + add = 150 + OR = { + has_trait = sadistic + has_trait = torturer + } + } + } + } + + after = { + pam_challenge_hof_war_fire_followup_events_effect = yes + } +} + +##################################### +# Victim fate after judgment # +# By Laurence Kennedy # +##################################### + +pam_antipope_events.0014 = { + type = character_event + title = pam_antipope_events.0014.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + var:pam_ch_hof_fate = flag:mercy + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0014.intro.mercy.christian + } + triggered_desc = { + trigger = { var:pam_ch_hof_fate = flag:mercy } + desc = pam_antipope_events.0014.intro.mercy + } + desc = pam_antipope_events.0014.intro.judge + } + first_valid = { + triggered_desc = { + trigger = { + var:pam_ch_hof_fate = flag:executed + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0014.desc.condemned.christian + } + triggered_desc = { + trigger = { var:pam_ch_hof_fate = flag:executed } + desc = pam_antipope_events.0014.desc.condemned + } + triggered_desc = { + trigger = { var:pam_ch_hof_fate = flag:tortured } + desc = pam_antipope_events.0014.desc.broken + } + triggered_desc = { + trigger = { + var:pam_ch_hof_fate = flag:imprisoned + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0014.desc.captive.christian + } + triggered_desc = { + trigger = { var:pam_ch_hof_fate = flag:imprisoned } + desc = pam_antipope_events.0014.desc.captive + } + triggered_desc = { + trigger = { + var:pam_ch_hof_fate = flag:mercy + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0014.desc.spared.christian + } + triggered_desc = { + trigger = { var:pam_ch_hof_fate = flag:mercy } + desc = pam_antipope_events.0014.desc.spared + } + desc = pam_antipope_events.0014.desc.generic + } + } + theme = faith + override_background = { reference = battlefield } + override_effect_2d = { reference = smoke } + left_portrait = { + character = root + animation = fear + override_imprisonment_visuals = yes + } + right_portrait = { + trigger = { exists = scope:pam_ch_hof_judge } + character = scope:pam_ch_hof_judge + triggered_animation = { + trigger = { + root = { var:pam_ch_hof_fate = flag:tortured } + } + animation = whipping + } + animation = anger + } + + immediate = { + var:pam_ch_hof_judge ?= { save_scope_as = pam_ch_hof_judge } + if = { + limit = { NOT = { exists = scope:pam_ch_hof_judge } } + var:pam_ch_hof_executioner ?= { save_scope_as = pam_ch_hof_judge } + } + } + + # Facing execution: let the house claim you as a martyr + option = { + name = pam_antipope_events.0014.a + trigger = { var:pam_ch_hof_fate = flag:executed } + house ?= { + add_house_modifier = { + modifier = pam_house_martyred_pontiff_modifier + years = 20 + } + } + } + + # Facing execution: leave the judge carrying the guilt of your blood + option = { + name = pam_antipope_events.0014.b + trigger = { var:pam_ch_hof_fate = flag:executed } + scope:pam_ch_hof_judge ?= { + add_character_modifier = { + modifier = pam_ch_hof_sacred_bloodguilt_modifier + years = 20 + } + # The judge never sees this event, so tell them about it if they are a player + hidden_effect = { + if = { + limit = { is_ai = no } + send_interface_toast = { + type = event_toast_effect_bad + title = pam_antipope_events.0014.b.toast + left_icon = root + show_as_tooltip = { + add_character_modifier = { + modifier = pam_ch_hof_sacred_bloodguilt_modifier + years = 20 + } + } + } + } + } + } + } + + # Facing execution, last words for the family: we clear the house stain, or prestige to heir or self + option = { + name = pam_antipope_events.0014.c + trigger = { var:pam_ch_hof_fate = flag:executed } + if = { + limit = { + exists = house + house = { has_house_modifier = pam_house_schismatic_sponsor_modifier } + } + house = { remove_house_modifier = pam_house_schismatic_sponsor_modifier } + } + else_if = { + limit = { exists = player_heir } + player_heir = { add_prestige = medium_prestige_gain } + } + else = { + add_prestige = medium_prestige_gain + } + } + + # Spared: clear the house's stain if it carries one, and gain piety either way + option = { + name = pam_antipope_events.0014.d + trigger = { NOT = { var:pam_ch_hof_fate = flag:executed } } + if = { + limit = { + exists = house + house = { has_house_modifier = pam_house_schismatic_sponsor_modifier } + } + house = { remove_house_modifier = pam_house_schismatic_sponsor_modifier } + } + add_piety = medium_piety_gain + } + + # Spared: start plotting the judge's murder, or just learn from the humiliation + option = { + name = pam_antipope_events.0014.e + trigger = { NOT = { var:pam_ch_hof_fate = flag:executed } } + if = { + limit = { + exists = scope:pam_ch_hof_judge + can_start_scheme = { + type = murder + target_character = scope:pam_ch_hof_judge + } + } + start_scheme = { + type = murder + target_character = scope:pam_ch_hof_judge + } + custom_tooltip = pam_antipope_events.0014.e.tt + hidden_effect = { + random_scheme = { + limit = { + scheme_type = murder + scheme_target_character = scope:pam_ch_hof_judge + } + add_scheme_modifier = { + type = extra_success_chance_modifier + } + } + } + } + else = { + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + } + + # Spared: swear to do penance for what you attempted + option = { + name = pam_antipope_events.0014.f + trigger = { NOT = { var:pam_ch_hof_fate = flag:executed } } + add_character_modifier = { + modifier = pam_ch_hof_penitent_road_modifier + years = 10 + } + } + + after = { + if = { + limit = { var:pam_ch_hof_fate = flag:executed } + death = { + killer = scope:pam_ch_hof_judge + death_reason = death_execution + } + } + } +} + +##################################### +# Faith-wide letter # +# By Laurence Kennedy # +##################################### + +pam_antipope_events.0015 = { + type = letter_event + opening = pam_antipope_events.0015.opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:pam_ch_hof_old_hof + scope:pam_ch_hof_old_hof = { + var:pam_ch_hof_outcome = flag:defender_victory + } + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0015.desc.defender_victory.christian + } + triggered_desc = { + trigger = { + exists = scope:pam_ch_hof_old_hof + scope:pam_ch_hof_old_hof = { + var:pam_ch_hof_outcome = flag:defender_victory + } + } + desc = pam_antipope_events.0015.desc.defender_victory + } + triggered_desc = { + trigger = { + exists = scope:pam_ch_hof_old_hof + scope:pam_ch_hof_old_hof = { + var:pam_ch_hof_outcome = flag:attacker_victory + } + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_antipope_events.0015.desc.attacker_victory.christian + } + desc = pam_antipope_events.0015.desc.attacker_victory + } + } + sender = scope:pam_ch_hof_winner + + trigger = { + exists = scope:pam_ch_hof_old_hof + scope:pam_ch_hof_old_hof = { + OR = { + var:pam_ch_hof_outcome = flag:defender_victory + var:pam_ch_hof_outcome = flag:attacker_victory + } + } + } + + option = { + name = pam_antipope_events.0015.a + } +} diff --git a/events/dlc/pam/pam_christian_situation_events.txt b/events/dlc/pam/pam_christian_situation_events.txt new file mode 100644 index 000000000..41380e9dd --- /dev/null +++ b/events/dlc/pam/pam_christian_situation_events.txt @@ -0,0 +1 @@ +# please replace and fix up vanilla in the future \ No newline at end of file diff --git a/events/dlc/pam/pam_clergy_events.txt b/events/dlc/pam/pam_clergy_events.txt new file mode 100644 index 000000000..5c7b79902 --- /dev/null +++ b/events/dlc/pam/pam_clergy_events.txt @@ -0,0 +1,1027 @@ +namespace = pam_clergy_events + +########################################## +## 0001 - Choose Papal name ## +########################################## + +# Choose Papal name +pam_clergy_events.0001 = { + theme = christian + type = character_event + title = pam_clergy_events.0001.t + window = big_event_window + desc = pam_clergy_events.0001.desc + + override_background = pam_gothic_cathedral_interior + override_sound = { reference = "event:/DLC/CE3/SFX/Stingers/ce3_mx_sting_ElectPope" } + + trigger = { + is_ai = no + primary_title = title:k_papal_state + exists = cp:councillor_court_chaplain + } + + left_portrait = { + character = root + animation = acknowledging_crozier + camera = camera_event_left + } + + right_portrait = { + character = scope:chaplain + animation = happy_teacher + camera = camera_event_very_right + } + + immediate = { + cp:councillor_court_chaplain = { + save_scope_as = chaplain + } + } + + # naming widget + widgets = { + widget = { + gui = event_window_widget_vfx_stained_glass + container = background_shader_vfx_container + } + widget = { + gui = "event_window_widget_name_pope" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { root = { save_scope_as = name_character_target } } + } + } + + option = { + name = pam_clergy_events.0001.a + } +} + +pam_clergy_events.0002 = { + hidden = yes + immediate = { + # Just became pope? choose your papal name! + if = { + limit = { + is_ai = no + } + trigger_event = pam_clergy_events.0001 + remove_variable = has_edited_a_rite + } + # Just became AI pope? choose your favorite tenet! + else = { + head_of_faith_change_core_tenet_effect = yes + } + } +} + +########################################## +## 0003 - AI pope changed a core tenet ## +########################################## + +pam_clergy_events.0003 = { + hidden = yes + + trigger = { + is_ai = no + exists = scope:tenet_to_remove + exists = scope:tenet_to_add + } + + immediate = { + send_interface_toast = { + title = pam_clergy_events.0003.t + desc = pam_clergy_events.0003.desc + left_icon = scope:pam_recast_pope + } + } +} + +########################################## +## 0010 - Receive Cardinal Order ## +########################################## + +# Player-only: AI cardinals resolve in give_cardinal_order_interaction on_accept without firing this event. +pam_clergy_events.0010 = { + theme = christian + type = character_event + title = pam_clergy_events.0010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:puppet_recipient + } + desc = pam_clergy_events.0010.desc.puppet.intro + } + desc = pam_clergy_events.0010.desc.intro + } + desc = pam_clergy_events.0010.desc + first_valid = { + triggered_desc = { + trigger = { + scope:cardinal_improve_development = yes + } + desc = pam_clergy_events.0010.desc.develop + } + triggered_desc = { + trigger = { + scope:cardinal_convert_faith = yes + } + desc = pam_clergy_events.0010.desc.convert_faith + } + triggered_desc = { + trigger = { + scope:cardinal_increase_control = yes + } + desc = pam_clergy_events.0010.desc.increase_control + } + triggered_desc = { + trigger = { + scope:cardinal_accelerate_cultural_fascination = yes + } + desc = pam_clergy_events.0010.desc.cultural_fascination + } + triggered_desc = { + trigger = { + scope:cardinal_improve_epidemic_resistance = yes + } + desc = pam_clergy_events.0010.desc.epidemic_resistance + } + triggered_desc = { + trigger = { + scope:cardinal_improve_legitimacy = yes + } + desc = pam_clergy_events.0010.desc.improve_legitimacy + } + triggered_desc = { + trigger = { + scope:cardinal_undermine_legitimacy = yes + } + desc = pam_clergy_events.0010.desc.undermine_legitimacy + } + } + } + immediate = { + #save Cardinal title + scope:recipient.clerical_elector_title ?= { + save_scope_as = cardinalate + } + #save Archdiocese title + scope:recipient = { + capital_county.clerical_region_title = { + save_scope_as = archdiocese + } + } + #If you are a puppet cardinal of your liege + if = { + limit = { + scope:recipient.liege.puppet:theological_agent_puppet ?= scope:recipient + } + save_scope_as = puppet_recipient + } + } + + + left_portrait = { + character = scope:recipient + animation = prayer_standing + } + + right_portrait = { + character = scope:puppet_or_actor + animation = personality_zealous + } + + option = { + name = pam_clergy_events.0010.a + scope:recipient = { + pam_choose_cardinal_order_switch_scripted_effect = yes + add_character_modifier = { + modifier = pam_cardinal_diverted_benefices_modifier + years = 10 + } + } + hidden_effect = { + pam_cardinal_order_accept_notify_players_effect = { + HOF = scope:puppet_or_actor + } + } + stress_and_fulfillment_impact = { + greedy = medium_stress_impact_gain + cynical = medium_stress_impact_gain + humble = minor_stress_impact_loss + loyal = minor_stress_impact_loss + zealous = medium_stress_impact_loss + } + } + + option = { + name = pam_clergy_events.0010.b + add_internal_flag = dangerous + hidden_effect = { + scope:puppet_or_actor = { + if = { + limit = { is_ai = no } + send_interface_toast = { + type = event_toast_effect_bad + title = give_cardinal_order_interaction_decline_toast + left_icon = scope:puppet_or_actor + right_icon = scope:recipient + scope:recipient = { + show_as_tooltip = { + pam_cardinal_order_decline_effect = { + HOF = scope:puppet_or_actor + CARDINAL = scope:recipient + } + } + } + } + } + } + } + pam_cardinal_order_decline_effect = { + HOF = scope:puppet_or_actor + CARDINAL = scope:recipient + } + stress_and_fulfillment_impact = { + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + loyal = minor_stress_impact_gain + just = medium_stress_impact_gain + temperate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + callous = medium_stress_impact_loss + greedy = medium_stress_impact_loss + cynical = medium_stress_impact_loss + } + } +} + +########################################## +## 0030 - React to new pope ## +########################################## + +pam_clergy_events.0030 = { + theme = christian + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { scope:new_pope = { is_female = yes } } + desc = pam_clergy_events.0030.t.female + } + desc = pam_clergy_events.0030.t + } + } + desc = pam_clergy_events.0030.desc + + override_background = { reference = pam_gothic_cathedral_interior } + window = big_event_window + widgets = { + widget = { + gui = event_window_widget_vfx_stained_glass_foreground + container = foreground_shader_vfx_container + } + widget = { + gui = "event_window_widget_rite_new_pope" + container = "custom_widgets_container" + } + } + + left_portrait = { + character = scope:new_pope + animation = acknowledging_crozier + camera = camera_body + } + + # Send future events as feed messages + option = { + name = pam_clergy_events.0030.aa + trigger = { is_ai = no } + custom_tooltip = pam_clergy_events.0030.aa.tt + set_variable = pam_new_pope_events_as_feed_message + ai_chance = { base = 0 } + } + + # Support him + option = { + name = pam_clergy_events.0030.a + trigger = { + NOR = { + pam_is_antipope_trigger = yes + pam_is_antipope_sponsor_trigger = yes + } + } + add_piety = minor_piety_gain + scope:new_pope = { + add_opinion = { + modifier = loyalty_opinion + target = root + opinion = 15 + } + } + ai_chance = { + base = 100 + modifier = { + add = 50 + OR = { + has_trait = loyal + has_trait = zealous + } + } + modifier = { + add = 25 + opinion = { + target = scope:new_pope + value >= 25 + } + } + modifier = { + add = -50 + opinion = { + target = scope:new_pope + value <= -25 + } + } + modifier = { + factor = 0 + OR = { + has_relation_rival = scope:new_pope + has_trait = deceitful + has_trait = paranoid + } + } + } + } + + # Deny him + option = { + name = pam_clergy_events.0030.b + add_internal_flag = dangerous + custom_tooltip = pam_clergy_events.0030.b.tt + scope:new_pope = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -25 + } + } + add_character_modifier = { + modifier = pam_denied_new_pope_modifier + years = 20 + } + ai_chance = { + base = 25 + modifier = { + add = 50 + OR = { + has_trait = cynical + has_trait = ambitious + } + } + modifier = { + add = 50 + has_relation_rival = scope:new_pope + } + modifier = { + add = 25 + opinion = { + target = scope:new_pope + value <= -25 + } + } + modifier = { + add = -25 + scope:new_pope.var:challenger_sponsor ?= root + } + modifier = { + add = -10 + scope:new_pope.rite = root.rite + } + modifier = { + factor = 0 + OR = { + has_trait = loyal + has_trait = humble + has_trait = zealous + } + } + } + } +} + +########################################## +## 0040 - AI HoF fills cardinal vacancy ## +########################################## + +# Letter to the appointed archbishop +pam_clergy_events.0040 = { + type = letter_event + opening = pam_clergy_events.0040.opening + desc = pam_clergy_events.0040.desc + sender = scope:head_of_faith + + immediate = { + custom_tooltip = { + text = pam_clergy_events.0040.appoint_tt + grant_cardinal_title_effect = { + CARDINAL_COUNTY = capital_county + } + } + pam_the_christian_church_appointed_cardinal_catalyst_effect = { + POPE = scope:head_of_faith + CARDINAL = root + OTHERWISE = catalyst_the_christian_church_appointed_cardinal + } + } + + option = { + name = pam_clergy_events.0040.a + } +} + +################################################# +## 0041 - Archbishop appoints himself cardinal ## +################################################# + +# Letter to a player head of faith when an AI archbishop appoints himself as cardinal +pam_clergy_events.0041 = { + type = letter_event + opening = pam_clergy_events.0041.opening + desc = pam_clergy_events.0041.desc + sender = scope:cardinal_candidate + + immediate = { + scope:cardinal_candidate = { + custom_tooltip = { + text = pam_clergy_events.0041.appoint_tt + grant_cardinal_title_effect = { + CARDINAL_COUNTY = capital_county + } + } + add_piety = major_piety_loss + } + situation:the_christian_church ?= { + if = { + limit = { + situation_top_has_catalyst = catalyst_clergy_self_proclaimed_cardinal + } + trigger_situation_catalyst = catalyst_clergy_self_proclaimed_cardinal + } + } + } + + option = { + name = pam_clergy_events.0041.a + } +} + +################################################ +## 0042 - The College fills its own vacancies ## +################################################ + +pam_clergy_events.0042 = { + type = letter_event + opening = pam_clergy_events.0042.opening + desc = pam_clergy_events.0042.desc + sender = scope:cardinal_candidate + + option = { + name = pam_clergy_events.0042.a + } +} + +################################################## +## 0043 - Notify-only letter for a new cardinal ## +################################################## + +pam_clergy_events.0043 = { + type = letter_event + opening = pam_clergy_events.0040.opening + desc = pam_clergy_events.0040.desc + sender = scope:head_of_faith + + option = { + name = pam_clergy_events.0040.a + } +} + +################################################################### +## 0051 - Clerical region capital converts (player holder) ## ## +################################################################### + +# Give away personal counties so only a Clerical Region (if any) remains playable. +scripted_effect pam_strip_personal_landed_titles_effect = { + if = { + limit = { + any_held_title = { + tier >= tier_county + trigger_if = { + limit = { + scope:reason != flag:character_converted + } + has_clerical_region = no + } + } + } + create_title_and_vassal_change = { + type = revoked + save_scope_as = pam_strip_land_change + add_claim_on_loss = no + } + + if = { + limit = { exists = root.var:old_rite } + root.var:old_rite = { save_scope_as = pam_strip_see_rite } + } + else_if = { + limit = { exists = scope:county.rite } + scope:county.rite = { save_scope_as = pam_strip_see_rite } + } + + if = { + limit = { + scope:reason ?= flag:character_converted + exists = scope:pam_strip_see_rite + } + if = { + limit = { + exists = primary_heir + primary_heir = { + rite ?= scope:pam_strip_see_rite + OR = { + is_ruler = no + government_has_flag = government_is_theocracy + } + } + } + primary_heir ?= { save_scope_as = heir } + } + else_if = { + limit = { + exists = player_heir + player_heir = { + rite ?= scope:pam_strip_see_rite + OR = { + is_ruler = no + government_has_flag = government_is_theocracy + } + } + } + player_heir ?= { save_scope_as = heir } + } + # final fallback, I don't think we need this... + else = { + create_character = { + template = monk_character_template + employer = root + save_scope_as = heir + } + } + } + else = { + if = { + limit = { liege != this } + liege ?= { save_scope_as = heir } + } + else_if = { + limit = { exists = primary_heir } + primary_heir ?= { save_scope_as = heir } + } + else_if = { + limit = { exists = player_heir } + player_heir ?= { save_scope_as = heir } + } + # final fallback, I don't think we need this... + else = { + create_character = { + template = monk_character_template + employer = root + save_scope_as = heir + } + } + } + if = { + limit = { + scope:reason ?= flag:character_converted + exists = scope:pam_strip_see_rite + } + scope:heir = { + set_character_rite = scope:pam_strip_see_rite + } + } + every_held_title = { + limit = { + tier >= tier_county + trigger_if = { + limit = { + scope:reason != flag:character_converted + } + has_clerical_region = no + } + } + change_title_holder_include_vassals = { + holder = scope:heir + change = scope:pam_strip_land_change + } + } + resolve_title_and_vassal_change = scope:pam_strip_land_change + if = { + limit = { + scope:reason = flag:character_converted + exists = scope:pam_strip_see_rite + } + scope:heir = { + change_government = faith.faith_theocratic_goverment_type + rite = { force_refresh_head_of_rite = yes } + if = { + limit = { should_use_theocratic_elective_succession_law_trigger = yes } + add_realm_law_skip_effects = theocratic_elective_succession_law + } + } + } + } +} + +pam_clergy_events.0051 = { + theme = faith + type = character_event + title = pam_clergy_events.0051.t + desc = pam_clergy_events.0051.desc + + override_background = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + reference = pam_gothic_cathedral_interior + } + override_background = { + reference = temple + } + + trigger = { + is_ai = no + faith = { has_doctrine_parameter = has_clerical_regions } + scope:county.faith = { has_doctrine_parameter = has_clerical_regions } + faith != scope:county.faith + scope:reason = flag:county_converted + } + + immediate = { + faith = { save_scope_as = old_faith } + scope:county.faith = { save_scope_as = new_faith } + scope:county.rite = { save_scope_as = new_rite } + scope:new_faith.religion = { save_scope_as = new_religion } + pam_find_translation_clerical_region_effect = { + EXCLUDE_RULER_REALM = no + EXCLUDED_RULER = root + } + # Pope / Head of Faith, else Head of Rite — your current religious superior + if = { + limit = { + exists = faith.religious_head + faith.religious_head != root + } + faith.religious_head = { save_scope_as = religious_superior } + } + else_if = { + limit = { + exists = rite.head_of_rite + rite.head_of_rite != root + } + rite.head_of_rite = { save_scope_as = religious_superior } + } + } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + animation = acknowledging_crozier + } + animation = personality_rational + camera = camera_event_left + } + + right_portrait = { + trigger = { exists = scope:religious_superior } + character = scope:religious_superior + animation = worry + camera = camera_event_right + } + + # A — Stay: convert and keep this Clerical Region + option = { + name = pam_clergy_events.0051.a + custom_tooltip = pam_clergy_events.0051.a.keep_see_tt + + # Fulfillment cost before convert (still on old Faith's fulfillment type) + if = { + limit = { has_spiritual_fulfillment_type = christian_fulfillment } + if = { + limit = { scope:old_faith.religion = scope:new_faith.religion } + change_spiritual_fulfillment = major_spiritual_fulfillment_loss + } + else = { + change_spiritual_fulfillment = massive_spiritual_fulfillment_loss + } + } + + # Devotion / piety / stress / convert modifiers — tooltips come from this effect + convert_to_rite_with_consequences_effect = { RITE = scope:new_rite } + + # Liege of the capital's new Faith is glad you followed + if = { + limit = { + liege ?= { + faith = scope:new_faith + this != root + } + } + liege = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + } + } + } + + # B — Take nearest same-Faith Clerical Region + option = { + name = pam_clergy_events.0051.b + trigger = { exists = scope:translation_see } + custom_tooltip = pam_clergy_events.0051.b.tt + + create_title_and_vassal_change = { + type = granted + save_scope_as = pam_translation_change + add_claim_on_loss = no + } + scope:translation_see = { + change_title_holder = { + holder = root + change = scope:pam_translation_change + } + } + resolve_title_and_vassal_change = scope:pam_translation_change + + destroy_title = scope:title + pam_strip_personal_landed_titles_effect = yes + } + + # C — Accept game over (landless offer comes from normal systems if available) + option = { + name = pam_clergy_events.0051.c + add_internal_flag = dangerous + custom_tooltip = pam_clergy_events.0051.c.tt + + pam_strip_personal_landed_titles_effect = yes + destroy_title = scope:title + hidden_effect = { + if = { + limit = { has_dlc_feature = roads_to_power } + create_landless_adventurer_title_effect = { + REASON = flag:wanderer + FLAVOR_CHAR = root + } + } + } + } +} + +################################################################### +## 0052 - Clerical region capital converts (AI, or no clerical regions) ## +################################################################### +pam_clergy_events.0052 = { + theme = christian + type = character_event + title = pam_clergy_events.0052.t + desc = pam_clergy_events.0052.desc + + trigger = { + OR = { + is_ai = yes + scope:reason != flag:county_converted + } + } + + left_portrait = { + character = root + animation = acknowledging_crozier + camera = camera_event_left + } + + option = { + name = pam_clergy_events.0052.a + add_internal_flag = dangerous + custom_tooltip = pam_clergy_events.0051.c.tt + + pam_strip_personal_landed_titles_effect = yes + if = { + limit = { scope:reason != flag:character_converted } + destroy_title = scope:title + } + hidden_effect = { + if = { + limit = { has_dlc_feature = roads_to_power } + create_landless_adventurer_title_effect = { + REASON = flag:wanderer + FLAVOR_CHAR = root + } + } + } + } +} + +################################################################### +## 0060 - A kinsman takes a great office of the Church ## +################################################################### + +# Sent by pam_family_becomes_prelate_effect to player family or house of the new prelate +# scope:new_prelate = kinsman, scope:prelate_title = the title, scope:prelate_office = which office +pam_clergy_events.0060 = { + theme = christian + type = character_event + window = big_event_window + title = { + first_valid = { + triggered_desc = { + trigger = { scope:prelate_office = flag:antipope } + desc = pam_clergy_events.0060.t.antipope + } + triggered_desc = { + trigger = { scope:prelate_title = title:k_papal_state } + desc = pam_clergy_events.0060.t.pope + } + triggered_desc = { + trigger = { scope:prelate_office = flag:head_of_faith } + desc = pam_clergy_events.0060.t.head_of_faith + } + desc = pam_clergy_events.0060.t.archbishop + } + } + desc = { + desc = pam_clergy_events.0060.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:prelate_office = flag:antipope } + desc = pam_clergy_events.0060.desc.antipope + } + triggered_desc = { + trigger = { scope:prelate_title = title:k_papal_state } + desc = pam_clergy_events.0060.desc.pope + } + triggered_desc = { + trigger = { scope:prelate_office = flag:head_of_faith } + desc = pam_clergy_events.0060.desc.head_of_faith + } + desc = pam_clergy_events.0060.desc.archbishop + } + triggered_desc = { + trigger = { scope:prelate_office = flag:head_of_faith } + desc = pam_clergy_events.0060.desc.hof_outro + } + triggered_desc = { + trigger = { faith != scope:new_prelate.faith } + desc = pam_clergy_events.0060.desc.different_faith + } + } + + override_background = { + reference = temple + } + override_sound = { + trigger = { scope:prelate_office = flag:antipope } + reference = "event:/DLC/CE3/SFX/Stingers/ce3_mx_sting_becomeHeretic" + } + override_sound = { + trigger = { scope:prelate_office = flag:head_of_faith } + reference = "event:/DLC/CE3/SFX/Stingers/ce3_mx_sting_ElectPope" + } + + widgets = { + widget = { + is_shown = { + scope:new_prelate = { pam_is_western_christian_trigger = yes } + } + gui = event_window_widget_vfx_stained_glass_foreground + container = foreground_shader_vfx_container + } + } + + trigger = { + is_ai = no + exists = scope:new_prelate + exists = scope:prelate_title + scope:new_prelate = { + this != root + is_alive = yes + } + # The office can change hands again before the news reaches us + scope:prelate_title.holder ?= scope:new_prelate + # Office and see resolve unordered in one batch, so the double announce is settled here + trigger_if = { + limit = { scope:prelate_office = flag:archbishop } + scope:new_prelate = { pam_holds_church_seat_trigger = no } + } + } + + immediate = { + # The scene belongs to the prelate's church, not ours; we may not even share their faith + scope:new_prelate = { save_scope_as = bg_override_char } + + # An antipope only reads as an antipope next to the incumbent being defied. + # Skipped when that incumbent is us, since root already holds the right-hand portrait + if = { + limit = { + scope:prelate_office = flag:antipope + exists = scope:new_prelate.faith.religious_head + scope:new_prelate.faith.religious_head != scope:new_prelate + scope:new_prelate.faith.religious_head != root + } + scope:new_prelate.faith.religious_head = { save_scope_as = seated_prelate } + } + } + + left_portrait = { + character = scope:new_prelate + animation = acknowledging_crozier + camera = camera_body + } + + right_portrait = { + character = root + animation = personality_zealous + camera = camera_event_right + } + + lower_center_portrait = { + trigger = { exists = scope:seated_prelate } + character = scope:seated_prelate + animation = anger + } + + # Stay as myself + option = { + name = { + trigger = { scope:prelate_office = flag:antipope } + text = pam_clergy_events.0060.a.antipope + } + name = pam_clergy_events.0060.a + + add_piety = minor_piety_gain + dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_gain } + scope:new_prelate = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + # Continue as the new prelate + option = { + name = { + trigger = { scope:prelate_office = flag:antipope } + text = pam_clergy_events.0060.b.antipope + } + name = pam_clergy_events.0060.b + + # A second player must not be able to take over a character someone else is already playing + trigger = { + scope:new_prelate = { + is_ai = yes + is_playable_character = yes + } + } + add_internal_flag = dangerous + + custom_tooltip = pam_clergy_events.0060.b.tt + if = { + limit = { faith != scope:new_prelate.faith } + custom_tooltip = pam_clergy_events.0060.b.faith_tt + } + if = { + limit = { scope:prelate_office = flag:antipope } + custom_tooltip = pam_clergy_events.0060.b.antipope_tt + } + set_player_character = scope:new_prelate + } +} diff --git a/events/dlc/pam/pam_decision_events.txt b/events/dlc/pam/pam_decision_events.txt new file mode 100644 index 000000000..321ef25e8 --- /dev/null +++ b/events/dlc/pam/pam_decision_events.txt @@ -0,0 +1,3574 @@ +namespace = pam_decision_events + +########################################### +## 0001 - Take Confession ## +## 0002 - Act of Devotion ## +## 0003 - Provide Spiritual Guidance ## +## 0004 - Establish Theocratic Dynasty ## +## 0005-0007 - Last Rites ## +## 0008 - Levy the Tithes ## +## 0009 - Feudal to theocracy ## +## 0010 - Feudal to theocracy - vassal ## +## 0015 - Promulgate Word of Pious Deeds ## +## 0016 - Khachkar catalyst on dynast death (hidden) ## +## 0017 - Raise an Ancestral Khachkar (confirmation) ## +## 0011 - HoF Tenet Stance notification ## +## 0018 - HoF Crusade Age core tenet ## +## 0019 - Secure Pilgrim Routes ## +## 0021 - Proclaim the Living Word ## +## 0032 - Develop Clerical Court ## +########################################### + +# Take Confession +pam_decision_events.0001 = { + type = character_event + title = pam_decision_events.0001.t + desc = { + desc = pam_decision_events.0001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + spiritual_fulfillment <= -50 + } + desc = pam_decision_events.0001.desc.bad + } + triggered_desc = { + trigger = { + spiritual_fulfillment >= 50 + } + desc = pam_decision_events.0001.desc.good + } + desc = pam_decision_events.0001.desc.neutral + } + triggered_desc = { + trigger = { num_sinful_traits > 0 } + desc = pam_decision_events.0001.desc.sin.preamble + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = lustful + rite = { trait_is_sin_rite = lustful } + } + desc = pam_decision_events.0001.desc.sin.lustful + } + triggered_desc = { + trigger = { + has_trait = chaste + rite = { trait_is_sin_rite = chaste } + } + desc = pam_decision_events.0001.desc.sin.chaste + } + triggered_desc = { + trigger = { + has_trait = gluttonous + rite = { trait_is_sin_rite = gluttonous } + } + desc = pam_decision_events.0001.desc.sin.gluttonous + } + triggered_desc = { + trigger = { + has_trait = temperate + rite = { trait_is_sin_rite = temperate } + } + desc = pam_decision_events.0001.desc.sin.temperate + } + triggered_desc = { + trigger = { + has_trait = greedy + rite = { trait_is_sin_rite = greedy } + } + desc = pam_decision_events.0001.desc.sin.greedy + } + triggered_desc = { + trigger = { + has_trait = generous + rite = { trait_is_sin_rite = generous } + } + desc = pam_decision_events.0001.desc.sin.generous + } + triggered_desc = { + trigger = { + has_trait = lazy + rite = { trait_is_sin_rite = lazy } + } + desc = pam_decision_events.0001.desc.sin.lazy + } + triggered_desc = { + trigger = { + has_trait = diligent + rite = { trait_is_sin_rite = diligent } + } + desc = pam_decision_events.0001.desc.sin.diligent + } + triggered_desc = { + trigger = { + has_trait = wrathful + rite = { trait_is_sin_rite = wrathful } + } + desc = pam_decision_events.0001.desc.sin.wrathful + } + triggered_desc = { + trigger = { + has_trait = calm + rite = { trait_is_sin_rite = calm } + } + desc = pam_decision_events.0001.desc.sin.calm + } + triggered_desc = { + trigger = { + has_trait = patient + rite = { trait_is_sin_rite = patient } + } + desc = pam_decision_events.0001.desc.sin.patient + } + triggered_desc = { + trigger = { + has_trait = impatient + rite = { trait_is_sin_rite = impatient } + } + desc = pam_decision_events.0001.desc.sin.impatient + } + triggered_desc = { + trigger = { + has_trait = arrogant + rite = { trait_is_sin_rite = arrogant } + } + desc = pam_decision_events.0001.desc.sin.arrogant + } + triggered_desc = { + trigger = { + has_trait = humble + rite = { trait_is_sin_rite = humble } + } + desc = pam_decision_events.0001.desc.sin.humble + } + triggered_desc = { + trigger = { + has_trait = deceitful + rite = { trait_is_sin_rite = deceitful } + } + desc = pam_decision_events.0001.desc.sin.deceitful + } + triggered_desc = { + trigger = { + has_trait = honest + rite = { trait_is_sin_rite = honest } + } + desc = pam_decision_events.0001.desc.sin.honest + } + triggered_desc = { + trigger = { + has_trait = craven + rite = { trait_is_sin_rite = craven } + } + desc = pam_decision_events.0001.desc.sin.craven + } + triggered_desc = { + trigger = { + has_trait = brave + rite = { trait_is_sin_rite = brave } + } + desc = pam_decision_events.0001.desc.sin.brave + } + triggered_desc = { + trigger = { + has_trait = shy + rite = { trait_is_sin_rite = shy } + } + desc = pam_decision_events.0001.desc.sin.shy + } + triggered_desc = { + trigger = { + has_trait = gregarious + rite = { trait_is_sin_rite = gregarious } + } + desc = pam_decision_events.0001.desc.sin.gregarious + } + triggered_desc = { + trigger = { + has_trait = ambitious + rite = { trait_is_sin_rite = ambitious } + } + desc = pam_decision_events.0001.desc.sin.ambitious + } + triggered_desc = { + trigger = { + has_trait = content + rite = { trait_is_sin_rite = content } + } + desc = pam_decision_events.0001.desc.sin.content + } + triggered_desc = { + trigger = { + has_trait = arbitrary + rite = { trait_is_sin_rite = arbitrary } + } + desc = pam_decision_events.0001.desc.sin.arbitrary + } + triggered_desc = { + trigger = { + has_trait = just + rite = { trait_is_sin_rite = just } + } + desc = pam_decision_events.0001.desc.sin.just + } + triggered_desc = { + trigger = { + has_trait = cynical + rite = { trait_is_sin_rite = cynical } + } + desc = pam_decision_events.0001.desc.sin.cynical + } + triggered_desc = { + trigger = { + has_trait = zealous + rite = { trait_is_sin_rite = zealous } + } + desc = pam_decision_events.0001.desc.sin.zealous + } + triggered_desc = { + trigger = { + has_trait = paranoid + rite = { trait_is_sin_rite = paranoid } + } + desc = pam_decision_events.0001.desc.sin.paranoid + } + triggered_desc = { + trigger = { + has_trait = trusting + rite = { trait_is_sin_rite = trusting } + } + desc = pam_decision_events.0001.desc.sin.trusting + } + triggered_desc = { + trigger = { + has_trait = compassionate + rite = { trait_is_sin_rite = compassionate } + } + desc = pam_decision_events.0001.desc.sin.compassionate + } + triggered_desc = { + trigger = { + has_trait = callous + rite = { trait_is_sin_rite = callous } + } + desc = pam_decision_events.0001.desc.sin.callous + } + triggered_desc = { + trigger = { + has_trait = stubborn + rite = { trait_is_sin_rite = stubborn } + } + desc = pam_decision_events.0001.desc.sin.stubborn + } + triggered_desc = { + trigger = { + has_trait = fickle + rite = { trait_is_sin_rite = fickle } + } + desc = pam_decision_events.0001.desc.sin.fickle + } + triggered_desc = { + trigger = { + has_trait = eccentric + rite = { trait_is_sin_rite = eccentric } + } + desc = pam_decision_events.0001.desc.sin.eccentric + } + triggered_desc = { + trigger = { + has_trait = vengeful + rite = { trait_is_sin_rite = vengeful } + } + desc = pam_decision_events.0001.desc.sin.vengeful + } + triggered_desc = { + trigger = { + has_trait = forgiving + rite = { trait_is_sin_rite = forgiving } + } + desc = pam_decision_events.0001.desc.sin.forgiving + } + triggered_desc = { + trigger = { + has_trait = sadistic + rite = { trait_is_sin_rite = sadistic } + } + desc = pam_decision_events.0001.desc.sin.sadistic + } + } + } + desc = pam_decision_events.0001.desc.outro + } + theme = christian + + left_portrait = { + character = root + animation = prayer_standing + } + + right_portrait = { + character = scope:chaplain + animation = personality_zealous + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + random_secret = { + limit = { + NOT = { is_known_by = scope:chaplain } + } + save_scope_as = my_secret + } + } + + option = { # Amen + name = pam_decision_events.0001.a + if = { + limit = { + spiritual_fulfillment < 0 + } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + base = minor_stress_impact_loss + zealous = medium_stress_impact_loss + humble = medium_stress_impact_loss + } + } + else = { + stress_and_fulfillment_impact = { + base = medium_stress_impact_loss + zealous = medium_stress_impact_loss + humble = medium_stress_impact_loss + } + } + if = { + limit = { + exists = scope:my_secret + } + random = { + chance = 50 + scope:my_secret = { reveal_to = scope:chaplain } + } + } + custom_tooltip = pam_decision_events.0001.a.confession_random_outcome + hidden_effect = { + random_list = { + 40 = { # Nothing happens + send_interface_toast = { + title = pam_decision_events.0001.a.piety + left_icon = root + if = { + limit = { + has_personal_tenet_flag = tenet_confession_decision_bonus + } + add_piety = medium_piety_gain + } + else = { + add_piety = minor_piety_gain + } + } + } + 5 = { # Priest gets hook + trigger = { + scope:chaplain = { + can_add_hook = { + target = root + type = weak_blackmail_hook_no_secret + } + } + } + modifier = { + has_personal_tenet_flag = tenet_confession_decision_bonus + factor = 0 + } + send_interface_toast = { + title = pam_decision_events.0001.a.hook + left_icon = root + right_icon = scope:chaplain + scope:chaplain = { + add_hook = { + target = root + type = weak_blackmail_hook_no_secret + } + } + } + } + 5 = { # Priest loses opinion + trigger = { + scope:chaplain = { + NOT = { has_trait = cynical } + } + num_sinful_traits > 0 + } + modifier = { + has_personal_tenet_flag = tenet_confession_decision_bonus + factor = 0 + } + send_interface_toast = { + title = pam_decision_events.0001.a.opinion_malus + left_icon = root + right_icon = scope:chaplain + scope:chaplain = { + add_opinion = { + target = root + opinion = -25 + modifier = impious_opinion + } + } + } + } + 10 = { # You learn of a courtier's secret + trigger = { + any_courtier_or_guest = { + any_secret = { + NOT = { is_known_by = root } + } + } + } + modifier = { + has_personal_tenet_flag = tenet_confession_decision_bonus + add = 50 + } + random_courtier_or_guest = { + limit = { + any_secret = { + NOT = { is_known_by = root } + } + } + save_scope_as = my_courtier + random_secret = { + limit = { + NOT = { is_known_by = root } + } + save_scope_as = courtier_secret + } + } + send_interface_toast = { + title = pam_decision_events.0001.a.courtier_secret + left_icon = root + right_icon = scope:my_courtier + scope:courtier_secret = { reveal_to = root } + } + } + 5 = { # You hear someone else confessing + modifier = { + has_lifestyle = intrigue_lifestyle + add = 5 + } + modifier = { + has_personal_tenet_flag = tenet_confession_decision_bonus + add = 30 + } + send_interface_toast = { + title = pam_decision_events.0001.a.random_confession + left_icon = root + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + } + 10 = { # Chaplain asks you to go on pilgrimage + trigger = { + NOT = { has_character_modifier = pam_confession_penalty_modifier } + rite = { + NOT = { rite_has_doctrine = doctrine_pilgrimage_forbidden } + } + } + modifier = { + NOT = { has_trait = pilgrim } + add = 5 + } + modifier = { + num_sinful_traits > 0 + add = 5 + } + modifier = { + has_personal_tenet_flag = tenet_confession_decision_bonus + factor = 0 + } + send_interface_toast = { + title = pam_decision_events.0001.a.pilgrimage + left_icon = root + right_icon = scope:chaplain + add_character_modifier = { # Removed when you do the thing + modifier = pam_confession_penalty_modifier + } + set_variable = { # To check what they asked you to do + name = pam_confession_penalty_var + value = flag:pilgrimage + } + } + } + 5 = { # Chaplain asks you to employ a High Almoner + trigger = { + can_employ_court_position_type = high_almoner_court_position + NOT = { employs_court_position = high_almoner_court_position } + } + modifier = { + has_personal_tenet_flag = tenet_confession_decision_bonus + factor = 0 + } + send_interface_toast = { + title = pam_decision_events.0001.a.high_almoner + left_icon = root + right_icon = scope:chaplain + add_character_modifier = { # Removed when you do the thing + modifier = pam_confession_penalty_modifier + } + set_variable = { # To check what they asked you to do + name = pam_confession_penalty_var + value = flag:high_almoner + } + } + } + 15 = { # Chaplain asks you to convert astray family member + trigger = { + OR = { + any_spouse = { faith != root.faith } + any_child = { faith != root.faith } + } + } + modifier = { + has_personal_tenet_flag = tenet_confession_decision_bonus + add = -10 + } + random_spouse = { + limit = { faith != root.faith } + save_scope_as = target + } + if = { + limit = { + NOT = { exists = scope:target } + } + random_child = { + limit = { faith != root.faith } + save_scope_as = target + } + } + send_interface_toast = { + title = pam_decision_events.0001.a.conversion + left_icon = root + right_icon = scope:target + add_character_modifier = { # Removed when you do the thing + modifier = pam_confession_penalty_modifier + } + set_variable = { # To check what they asked you to do + name = pam_confession_penalty_var + value = scope:target + } + } + } + 5 = { # Chaplain asks you to not go to war for 5y + modifier = { + rite = { + OR = { + rite_has_tenet = tenet_pacifism + rite_has_tenet = tenet_peace_of_god + } + } + add = 10 + } + modifier = { + has_personal_tenet_flag = tenet_confession_decision_bonus + factor = 0 + } + send_interface_toast = { + title = pam_decision_events.0001.a.no_war + left_icon = root + right_icon = scope:chaplain + add_character_modifier = { + modifier = pam_confession_penalty_modifier + years = 5 # It'll go away on its own for this one + } + set_variable = { # To check what they asked you to do + name = pam_confession_penalty_var + value = flag:no_war + } + } + } + } + } + ai_chance = { + base = 100 + } + } +} + +# Act of Devotion +pam_decision_events.0002 = { + type = character_event + title = pam_decision_events.0002.t + desc = { + desc = pam_decision_events.0002.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_realm_law = crowned_king + has_realm_law = crowned_emperor + } + } + desc = pam_decision_events.0002.desc.crowned + } + desc = pam_decision_events.0002.desc.uncrowned + } + desc = pam_decision_events.0002.desc.mid + first_valid = { + triggered_desc = { + trigger = { + spiritual_fulfillment <= -50 + } + desc = pam_decision_events.0002.desc.bad + } + triggered_desc = { + trigger = { + spiritual_fulfillment >= 50 + } + desc = pam_decision_events.0002.desc.good + } + desc = pam_decision_events.0002.desc.neutral + } + desc = pam_decision_events.0002.desc.outro + } + theme = christian + + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:my_chaplain + animation = preaching_no_book + camera = camera_event_center_close_to_right + } + override_effect_2d = { + reference = legend_glow + } + + immediate = { + save_scope_as = devotional_guy + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = my_chaplain } + } + else_if = { + limit = { + any_vassal = { + government_has_flag = government_is_theocracy + } + } + ordered_vassal = { + order_by = primary_title.tier + limit = { government_has_flag = government_is_theocracy } + save_scope_as = my_chaplain + } + } + else = { + create_character = { + template = priest_character_template + location = root.location + save_scope_as = my_chaplain + } + } + } + + option = { # Push harder + show_as_unavailable = { always = yes } + name = pam_decision_events.0002.a + trigger = { + custom_tooltip = { + text = pam_decision_act_of_devotion_fame_tooltip + prestige_level < 3 + } + } + add_piety_level = -1 + add_prestige_level = 1 + add_prestige = medium_prestige_gain + + ai_chance = { + base = 0 + } + } + + option = { # Collect your prestige + name = pam_decision_events.0002.b + add_prestige = major_prestige_gain + + ai_chance = { + base = 100 + } + } +} + +# Provide Spiritual Guidance +pam_decision_events.0003 = { + type = character_event + title = pam_decision_events.0003.t + desc = { + desc = pam_decision_events.0003.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:target_child.spiritual_fulfillment <= -50 + } + desc = pam_decision_events.0003.desc.bad + } + triggered_desc = { + trigger = { + scope:target_child.spiritual_fulfillment >= 50 + } + desc = pam_decision_events.0003.desc.good + } + desc = pam_decision_events.0003.desc.neutral + } + } + theme = christian + + left_portrait = { + character = root + animation = prayer_standing + } + right_portrait = { + character = scope:target_child + triggered_animation = { + trigger = { + has_trait = cynical + } + animation = boredom + } + triggered_animation = { + trigger = { + has_personality_submissive_trigger = yes + } + animation = worry + } + triggered_animation = { + trigger = { + OR = { + learning >= high_skill_rating + has_trait = theologian + has_trait = zealous + has_lifestyle = learning_lifestyle + } + } + animation = interested + } + animation = prayer_standing + } + override_background = { reference = bedchamber } # Intentional, we talk about the private chapel + + immediate = { + if = { + limit = { scope:primary_heir = yes } + primary_heir = { save_scope_as = target_child } + } + else = { + random_relation = { + type = favorite_child + save_scope_as = target_child + } + } + scope:target_child = { set_variable = pam_mentor_sp_taken_var } + } + + option = { # Push them _more_ + name = pam_decision_events.0003.a + if = { + limit = { + NOT = { has_relation_grudge = scope:target_child } + } + scope:target_child = { + set_relation_grudge = { + target = root + reason = grudge_pressured_me_sp + } + } + } + scope:target_child = { + if = { + limit = { + is_available_quick = { + advanced_ruler = yes + } + } + change_spiritual_fulfillment = 50 + } + } + + ai_chance = { + base = 0 + modifier = { + has_trait = callous + add = 25 + } + } + } + + option = { # Listen, child + name = pam_decision_events.0003.b + scope:target_child = { + if = { + limit = { + is_available_quick = { + advanced_ruler = yes + } + } + change_spiritual_fulfillment = 25 + } + } + + ai_chance = { + base = 100 + } + } + + after = { + custom_tooltip = pam_decision_events.0003.after_tt + hidden_effect = { + random_list = { + 5 = { + trigger = { + scope:target_child = { + any_secret = { + NOT = { is_known_by = root } + } + } + } + modifier = { + scope:target_child = { has_any_good_relationship_with_root_trigger = yes } + add = 5 + } + send_interface_toast = { + title = pam_decision_events.0003.secret + right_icon = scope:target_child + scope:target_child = { + random_secret = { + limit = { + NOT = { is_known_by = root } + } + reveal_to = root + } + } + } + } + 1 = { + trigger = { + scope:target_child = { + NOT = { has_trait = lifestyle_mystic } + } + } + send_interface_toast = { + title = pam_decision_events.0003.mystic + right_icon = scope:target_child + scope:target_child = { add_trait = lifestyle_mystic } + } + } + 2 = { + modifier = { + scope:target_child = { has_lifestyle = learning_lifestyle } + add = 2 + } + send_interface_toast = { + title = pam_decision_events.0003.learning + right_icon = scope:target_child + scope:target_child = { add_learning_skill = 1 } + } + } + 3 = { + send_interface_toast = { + title = pam_decision_events.0003.education + right_icon = scope:target_child + scope:target_child = { gain_appropriate_lifestyle_medium_xp_effect = yes } + } + } + 3 = { + modifier = { + scope:target_child = { has_personality_emotional_trigger = yes } + add = 2 + } + send_interface_toast = { + title = pam_decision_events.0003.stress + right_icon = scope:target_child + scope:target_child = { add_stress = medium_stress_gain } + } + } + 5 = { + trigger = { + scope:target_child = { num_of_relation_lover > 0 } + } + modifier = { + scope:target_child = { + any_relation = { + type = lover + num_sinful_traits > 0 + } + } + } + send_interface_toast = { + title = pam_decision_events.0003.lover + right_icon = scope:target_child + scope:target_child = { + random_relation = { + type = lover + save_scope_as = lover_scope + } + remove_relation_lover = scope:lover_scope + } + } + } + 2 = { + trigger = { + num_sinful_traits > 0 + } + send_interface_toast = { + title = pam_decision_events.0003.trait + right_icon = scope:target_child + scope:target_child = { flip_sinful_trait_effect = yes } + } + } + } + } + } +} + +# Establish Theocratic Dynasty +pam_decision_events.0004 = { + type = character_event + title = pam_decision_events.0004.t + desc = pam_decision_events.0004.desc + theme = dynasty + + left_portrait = { + character = root + animation = acknowledging + } + override_effect_2d = { + reference = legend_glow + } + + immediate = { + create_dynasty = { + spread_to_descendants = yes + } + # CE3 achievement: The Father, the Son, and the Holy Grandson — the chain starts at dynasty establishment + if = { + limit = { + is_ai = no + any_held_title = { has_clerical_region = yes } + } + set_variable = { + name = ce3_theocrat_dynasty_chain + value = 1 + } + } + } + + option = { # Let's goooo + name = pam_decision_events.0004.a + custom_tooltip = pam_decision_events.0004.tt + pam_create_theocratic_dynasty_extra_effects = yes + ai_chance = { + base = 100 + } + } +} + +#Last Rites 0005-0007 +#Laurence Kennedy + +# Last Rites - My Final Hour +pam_decision_events.0005 = { + type = character_event + title = pam_decision_events.0005.t + window = big_event_window + theme = christian + override_background = { + trigger = { + is_travelling = no + } + reference = bedchamber + } + override_background = { + trigger = { + is_travelling = yes + } + reference = ep3_relaxing_tent + } + desc = { + triggered_desc = { + trigger = { + exists = scope:death_trait + } + desc = pam_decision_events.0005.desc.healthtrait + } + first_valid = { + triggered_desc = { + trigger = { + spiritual_fulfillment <= -50 + } + desc = pam_decision_events.0005.desc.bad + } + triggered_desc = { + trigger = { + spiritual_fulfillment >= 50 + } + desc = pam_decision_events.0005.desc.good + } + desc = pam_decision_events.0005.desc.neutral + } + + triggered_desc = { + trigger = { + exists = scope:fam_or_friend_1 + } + desc = pam_decision_events.0005.desc.notalone + } + triggered_desc = { + trigger = { + NOT = { + exists = scope:fam_or_friend_1 + } + } + desc = pam_decision_events.0005.desc.alone + } + desc = pam_decision_events.0005.desc.outro + } + + left_portrait = { + character = scope:fam_or_friend_1 + animation = crying + } + center_portrait = { + character = scope:soon_dead + triggered_animation = { + trigger = { + spiritual_fulfillment <= -50 + } + animation = poison + } + triggered_animation = { + trigger = { + spiritual_fulfillment <= -25 + } + animation = paranoia + } + animation = prayer + } + right_portrait = { + character = scope:confessor + animation = divine_gesture_3 + } + + #gathered loved ones + lower_left_portrait = { + character = scope:player_heir + } + lower_center_portrait = { + character = scope:fam_or_friend_2 + } + lower_right_portrait = { + character = scope:fam_or_friend_3 + } + + immediate = { + #Root + root = { save_scope_as = soon_dead } + #Find a priest + if = { + limit = { + cp:councillor_court_chaplain ?= { + basic_is_available_ai = yes + } + } + cp:councillor_court_chaplain ?= { save_scope_as = confessor } + } + #Find a different clergy member in the area + else_if = { + limit = { + NOT = { + exists = scope:confessor + } + } + random_pool_character = { + province = root.location + limit = { + faith = root.faith + is_clergy = yes + basic_is_available_ai = yes + } + save_scope_as = confessor + } + } + else = { + #make a priest + create_character = { + template = virtuous_priest_character_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith + rite = root.rite + save_scope_as = confessor + } + add_character_flag = { + flag = fake_confessor + days = 10 + } + } + #Find Player Heir + scope:soon_dead.player_heir ?= { save_scope_as = player_heir} + #Find Friends & Family + ordered_courtier = { + limit = { + NOT = { + this = scope:soon_dead.player_heir + } + OR = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:soon_dead } + is_close_family_of = scope:soon_dead + is_spouse_of = scope:soon_dead + } + } + + #Order by how much they like you, but still prioritize spouse + order_by = { + value = "opinion(root)" + if = { + limit = { + is_spouse_of = root + } + add = 100 + } + } + max = 3 + #always put this when there is a max or it will be unhappy who knows why + check_range_bounds = no + if = { + limit = { exists = scope:fam_or_friend_2 } + save_scope_as = fam_or_friend_3 + } + else_if = { + limit = { exists = scope:fam_or_friend_1 } + save_scope_as = fam_or_friend_2 + } + else = { save_scope_as = fam_or_friend_1 } + } + #Find a secret + random_secret = { + limit = { + NOT = { is_known_by = scope:confessor } + } + save_scope_as = my_secret + } + #Find a reason for your death + random_character_trait = { + limit = { + has_trait_category = health + has_trait_flag = lowers_health + } + save_scope_as = death_trait + } + + } + + option = { # Time for penance + name = pam_decision_events.0005.a + change_spiritual_fulfillment = major_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + base = minor_stress_impact_loss + zealous = medium_stress_impact_loss + humble = medium_stress_impact_loss + } + + trigger_event = { + id = pam_decision_events.0006 + } + ai_chance = { + base = 100 + } + } + option = { # No confession for me + trigger = { + OR = { + has_trait = cynical + any_secret = { type = secret_non_believer } + spiritual_fulfillment < -20 + } + } + name = pam_decision_events.0005.b + change_spiritual_fulfillment = medium_spiritual_fulfillment_loss + stress_and_fulfillment_impact = { + cynical = major_stress_impact_loss + paranoid = major_stress_impact_loss + } + trigger_event = { + id = pam_decision_events.0006 + } + ai_chance = { + base = 0 + } + } +} + +#Last Rites - Sacrament of Penance +pam_decision_events.0006 = { + type = character_event + title = pam_decision_events.0006.t + window = big_event_window + theme = christian + override_background = { + trigger = { + is_travelling = no + } + reference = bedchamber + } + override_background = { + trigger = { + is_travelling = yes + } + reference = ep3_relaxing_tent + } + desc = { + desc = pam_decision_events.0006.intro + first_valid = { + triggered_desc = { + trigger = { + spiritual_fulfillment <= -50 + } + desc = pam_decision_events.0006.desc.bad + } + triggered_desc = { + trigger = { + spiritual_fulfillment >= 50 + } + desc = pam_decision_events.0006.desc.good + } + desc = pam_decision_events.0006.desc.neutral + } + #Sin based on a sinful trait + triggered_desc = { + trigger = { + exists = scope:my_sinful_trait + } + desc = pam_decision_events.0006.desc.my_sinful_trait_sin + } + #Sin based on a sinful secret + triggered_desc = { + trigger = { + exists = scope:my_secret + } + desc = pam_decision_events.0006.desc.secret_sin + } + #Sin based on a criminal trait + triggered_desc = { + trigger = { + exists = scope:my_criminal_trait + } + desc = pam_decision_events.0006.desc.my_criminal_trait_sin + } + #Sin desc if you have neither of the above + triggered_desc = { + trigger = { + NOR = { + exists = scope:my_secret + exists = scope:my_sinful_trait + } + spiritual_fulfillment < 50 + } + desc = pam_decision_events.0006.desc.sin_default + } + #Sin desc if you have neither of the above + triggered_desc = { + trigger = { + NOR = { + exists = scope:my_secret + exists = scope:my_sinful_trait + } + spiritual_fulfillment >= 50 + } + desc = pam_decision_events.0006.desc.sin_default_good_sp + } + desc = pam_decision_events.0006.desc.outro + } + + left_portrait = { + character = scope:soon_dead + animation = beg + camera = camera_council + } + right_portrait = { + character = scope:confessor + animation = personality_zealous + camera = camera_body_left + } + + immediate = { + #Find HoR + scope:soon_dead.faith.religious_head = { save_scope_as = religious_head } + #Find a secret + random_secret = { + limit = { + NOT = { is_known_by = scope:confessor } + } + save_scope_as = my_secret + } + #Find a sinful trait + random_character_trait = { + limit = { + save_temporary_scope_as = temp_trait + root.rite = { + trait_is_sin_rite = scope:temp_trait + } + } + save_scope_as = my_sinful_trait + } + #Find Criminal trait + random_character_trait = { + limit = { + save_temporary_scope_as = temp_trait + root = { + trait_is_criminal_in_rite_trigger = { + TRAIT = scope:temp_trait + RITE = rite + GENDER_CHARACTER = root + } + } + } + save_scope_as = my_criminal_trait + } + } + + option = { # Confess + name = pam_decision_events.0006.a + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + base = minor_stress_impact_loss + zealous = medium_stress_impact_loss + humble = medium_stress_impact_loss + } + if = { + limit = { + exists = scope:my_secret + } + random = { + chance = 50 + scope:my_secret = { reveal_to = scope:confessor } + } + random = { + chance = 10 + scope:my_secret = { expose_secret = scope:soon_dead } + } + } + trigger_event = { + id = pam_decision_events.0007 + } + ai_chance = { + base = 100 + } + } + option = { # No need to share everything! + trigger = { + exists = scope:my_secret + } + name = pam_decision_events.0006.b + flavor = pam_decision_events.0006.b.flavor + + change_spiritual_fulfillment = major_spiritual_fulfillment_loss + stress_and_fulfillment_impact = { + base = minor_stress_impact_loss + zealous = major_stress_impact_gain + honest = major_stress_impact_gain + loyal = minor_stress_impact_loss + } + + trigger_event = { + id = pam_decision_events.0007 + } + ai_chance = { + base = 100 + } + } +} + +#Last Rites - Flesh, Blood and Wine (Viaticum and Extreme Unction) +pam_decision_events.0007 = { + type = character_event + title = pam_decision_events.0007.t + window = big_event_window + theme = christian + override_background = { + trigger = { + is_travelling = no + } + reference = bedchamber + } + override_background = { + trigger = { + is_travelling = yes + } + reference = ep3_relaxing_tent + } + override_effect_2d = { + trigger = { + spiritual_fulfillment >= 50 + } + reference = legend_glow + } + desc = { + desc = pam_decision_events.0007.intro + #Eucharist based on SP + first_valid = { + triggered_desc = { + trigger = { + spiritual_fulfillment <= -50 + } + desc = pam_decision_events.0007.desc.bad + } + triggered_desc = { + trigger = { + spiritual_fulfillment >= 50 + } + desc = pam_decision_events.0007.desc.good + } + desc = pam_decision_events.0007.desc.neutral + } + #Extreme Unction based on SP + desc = pam_decision_events.0007.desc.oil.intro + first_valid = { + triggered_desc = { + trigger = { + spiritual_fulfillment <= -50 + } + desc = pam_decision_events.0007.desc.oil.bad + } + triggered_desc = { + trigger = { + spiritual_fulfillment >= 50 + } + desc = pam_decision_events.0007.desc.oil.good + } + desc = pam_decision_events.0007.desc.oil.neutral + } + + desc = pam_decision_events.0007.desc.outro + } + + left_portrait = { + character = scope:soon_dead + + triggered_animation = { + trigger = { + spiritual_fulfillment >= 50 + } + animation = divine_ecstasy + } + triggered_animation = { + trigger = { + spiritual_fulfillment <= -30 + } + animation = worry + } + animation = prayer + camera = camera_event_center_close_to_right + } + right_portrait = { + character = scope:confessor + animation = prayer_crossing + } + + immediate = { + #Find HoR + scope:soon_dead.faith.religious_head = { save_scope_as = religious_head } + #Find holding to give to Monastic order + ordered_held_title = { + order_by = { + value = county.development_level + if = { + limit = { + title_province = { + is_county_capital = no + } + } + add = 100 + } + multiply = -1 + } + title_tier = barony + limit = { + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + save_scope_as = military_title_to_give + } + ordered_held_title = { + order_by = { + value = county.development_level + if = { + limit = { + title_province = { + is_county_capital = no + } + } + add = 100 + } + multiply = -1 + } + title_tier = barony + limit = { + barony_is_valid_for_monastic_order_lease_trigger = { CHARACTER = root } + } + save_scope_as = monastic_title_to_give + } + #Find a monastic order to donate to + #Ideally one that you patronize + faith = { + random_faith_holy_order = { + limit = { + holy_order_patron = root + leader = { government_has_flag = government_is_monastic_holy_order } + } + save_scope_as = monastic_order + } + } + #If not, find one that would realistically make sense to support + if = { + limit = { + NOT = { + exists = scope:monastic_order + } + } + faith = { + random_faith_holy_order = { + limit = { + holy_order_range_trigger = { CHARACTER = root } + leader = { government_has_flag = government_is_monastic_holy_order } + } + save_scope_as = monastic_order + } + } + } + #Find a military order to donate to + #Ideally one that you patronize...or should it only be one that you patronize? + faith = { + random_faith_holy_order = { + limit = { + holy_order_patron = root + leader = { government_has_flag = government_is_military_holy_order } + } + save_scope_as = military_order + } + } + #If not, find one that would realistically make sense to support + if = { + limit = { + NOT = { + exists = scope:military_order + } + } + faith = { + random_faith_holy_order = { + limit = { + holy_order_range_trigger = { CHARACTER = root } + leader = { government_has_flag = government_is_military_holy_order } + } + save_scope_as = military_order + } + } + } + } + + option = { #Option A) GIVE TO A MONASTIC ORDER + trigger = { + exists = scope:monastic_order + } + name = pam_decision_events.0007.a + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + if = { + limit = { + exists = scope:monastic_title_to_give + } + scope:monastic_title_to_give = { + lease_out_to_holy_order = scope:monastic_order + } + scope:player_heir ?= { + add_character_modifier = { + modifier = pam_last_rites_monastic_order_donation_modifier + years = 10 + } + } + + } + else = { + scope:monastic_order.leader = { + save_scope_as = recipient + } + save_scope_as = actor + donate_to_monastic_order_effect = yes + scope:player_heir = { + add_character_modifier = { + modifier = pam_last_rites_monastic_order_donation_modifier + years = 5 + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { #Option B) GIVE TO A MILITARY ORDER + trigger = { + exists = scope:military_order + } + name = pam_decision_events.0007.b + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + if = { + limit = { + exists = scope:military_title_to_give + } + scope:military_title_to_give = { + lease_out_to_holy_order = scope:military_order + } + scope:player_heir ?= { + add_character_modifier = { + modifier = pam_last_rites_military_order_donation_modifier + years = 10 + } + } + } + else = { + scope:military_order.leader = { + save_scope_as = recipient + } + save_scope_as = actor + donate_to_monastic_order_effect = yes + scope:player_heir = { + add_character_modifier = { + modifier = pam_last_rites_military_order_donation_modifier + years = 5 + } + } + } + ai_chance = { + base = 0 + } + } + + option = { #Option C) GIVE TO CHURCH + trigger = { + exists = scope:religious_head + scope:religious_head != root + } + name = pam_decision_events.0007.c + change_spiritual_fulfillment = major_spiritual_fulfillment_value + scope:player_heir ?= { + add_character_modifier = { + modifier = pam_last_rites_church_donation_modifier + years = 5 + } + } + pay_short_term_gold = { + gold = major_gold_value + target = scope:religious_head + } + + ai_chance = { + base = 100 + } + } + + option = { #Option D) Opt out + name = pam_decision_events.0007.d + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + ai_chance = { + base = 100 + } + } + after = { + scope:confessor ?= { + if = { + limit = { + has_character_flag = fake_confessor + root = { + is_ai = yes + } + } + silent_disappearance_effect = yes + } + } + } +} + +########################################## +# Levy the Tithes +########################################## +scripted_trigger pam_decision_events_0008_vassal_trigger = { + this != root.cp:councillor_court_chaplain + OR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_ecclesiastical + } +} + +pam_decision_events.0008 = { + type = character_event + title = pam_decision_events.0008.t + desc = { + desc = pam_decision_events.0008.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:chaplain } + desc = pam_decision_events.0008.desc.chaplain + } + desc = pam_decision_events.0008.desc.fallback + } + } + theme = christian + + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:chaplain + animation = anger + } + lower_left_portrait = { + character = scope:tithe_vassal_1 + } + lower_center_portrait = { + character = scope:tithe_vassal_2 + } + lower_right_portrait = { + character = scope:tithe_vassal_3 + } + + immediate = { + cp:councillor_court_chaplain ?= { save_scope_as = chaplain } + ordered_vassal = { + limit = { + pam_decision_events_0008_vassal_trigger = yes + } + order_by = primary_title.tier + save_scope_as = tithe_vassal_1 + } + + ordered_vassal = { + limit = { + pam_decision_events_0008_vassal_trigger = yes + NOT = { this = scope:tithe_vassal_1 } + } + order_by = primary_title.tier + save_scope_as = tithe_vassal_2 + } + + ordered_vassal = { + limit = { + pam_decision_events_0008_vassal_trigger = yes + NOR = { + this = scope:tithe_vassal_1 + this = scope:tithe_vassal_2 + } + } + order_by = primary_title.tier + save_scope_as = tithe_vassal_3 + } + } + + option = { + name = pam_decision_events.0008.a + pam_levy_the_tithes_decision_effects = yes + } +} + +# Feudal to theocracy +pam_decision_events.0009 = { + type = character_event + title = pam_decision_events.0009.t + desc = pam_decision_events.0009.desc + window = big_event_window + theme = realm + override_background = { reference = temple } + left_portrait = { + character = root + animation = preaching + } + center_portrait = { + character = scope:witness + animation = prayer_standing + camera = camera_event_right_crowner_crowning + } + right_portrait = { + character = scope:witness_1 + animation = prayer + camera = camera_event_very_right_looking_center_fov40 + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + cp:councillor_court_chaplain = { + save_scope_as = witness + } + if = { + limit = { + NOT = { exists = scope:witness } + } + random_courtier = { + limit = { + rite = root.rite + is_adult = yes + } + save_scope_as = witness + } + } + random_vassal = { + limit = { + rite = root.rite + this != scope:witness + is_adult = yes + } + save_scope_as = witness_1 + } + if = { + limit = { + NOT = { exists = scope:witness_1 } + } + random_courtier = { + limit = { + rite = root.rite + this != scope:witness + is_adult = yes + } + save_scope_as = witness_1 + } + } + change_government = theocracy_government + hidden_effect = { + every_liege_or_above = { + limit = { + NOT = { top_liege = this } + } + send_interface_message = { + type = event_stewardship_neutral_with_text + title = pam_decision_events.0009.liege_msg_title + desc = pam_decision_events.0009.liege_msg_desc + right_icon = root + } + } + } + if = { + limit = { + capital_province = { + NOT = { has_holding_type = church_holding } + } + } + ordered_sub_realm_barony = { + limit = { + county = { + faith = root.faith + holder = root + } + } + order_by = { + value = county.development_level + if = { + limit = { + title_province = { + OR = { + has_holding_type = church_holding + has_holding = no + } + } + } + add = 50 + } + if = { + limit = { + county = root.capital_county + } + add = 100 + } + if = { + limit = { + is_holy_site_of = root.faith + } + add = 200 + } + } + save_scope_as = new_capital + } + } + } + + option = { + name = pam_decision_events.0009.a + trigger = { + exists = scope:new_capital + } + change_spiritual_fulfillment = massive_spiritual_fulfillment_value + scope:new_capital = { + if = { + limit = { + title_province = { + has_holding = no + } + } + set_holding_type = church_holding + } + custom_tooltip = { + text = church_holding_as_new_capital + set_capital_barony = yes + root = { set_realm_capital = prev.county } + } + } + ai_will_select = { + value = 100 + } + } + option = { + name = pam_decision_events.0009.b + change_spiritual_fulfillment = major_spiritual_fulfillment_value + ai_will_select = { + value = 0 + } + } +} + +# Feudal to theocracy - letter to vassal +pam_decision_events.0010 = { + type = letter_event + opening = pam_decision_events.0010.opening + desc = pam_decision_events.0010.desc + sender = scope:theocratic_ruler + + option = { + name = pam_decision_events.0010.a + trigger = { government_type = scope:old_government } + change_government = theocracy_government + ai_will_select = { + value = 100 + if = { + limit = { + faith != scope:theocratic_ruler.faith + } + multiply = 0 + } + } + } + option = { + name = pam_decision_events.0010.b + scope:theocratic_ruler = { + add_opinion = { + modifier = rejected_becoming_theocracy_opinion + target = root + years = 10 + } + } + ai_will_select = { + value = 0 + if = { + limit = { + OR = { + faith != scope:theocratic_ruler.faith + rite != scope:theocratic_ruler.rite + } + } + add = 50 + } + } + } +} + +# Promulgate Word of Pious Deeds - Boost Papal Election Score +# Laurence Kennedy +pam_decision_events.0015 = { + type = character_event + title = pam_decision_events.0015.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:my_praiser + } + desc = pam_decision_events.0015.desc.intro.praiser + } + desc = pam_decision_events.0015.desc.intro.no_praiser + } + desc = pam_decision_events.0015.desc.intro + triggered_desc = { + trigger = { + exists = scope:my_virtuous_trait + } + desc = pam_decision_events.0015.desc.virtuoustrait + } + desc = pam_decision_events.0015.desc.mid + first_valid = { + triggered_desc = { + trigger = { + exists = scope:my_virtuous_tenet + } + desc = pam_decision_events.0015.desc.virtuoustenet + } + desc = pam_decision_events.0015.desc.novirtuoustenet + } + first_valid = { + triggered_desc = { + trigger = { + scope:praise_worthy_priest.spiritual_fulfillment <= -50 + } + desc = pam_decision_events.0015.desc.bad + } + triggered_desc = { + trigger = { + scope:praise_worthy_priest.spiritual_fulfillment >= 50 + } + desc = pam_decision_events.0015.desc.good + } + desc = pam_decision_events.0015.desc.neutral + } + desc = pam_decision_events.0015.desc.outro + } + + theme = christian + override_background = { + reference = pam_romanesque_church_exterior + } + left_portrait = { + character = scope:praise_worthy_priest + animation = prayer_standing_eyes + camera = camera_event_center_pointing_forward + } + right_portrait = { + trigger = { exists = scope:my_praiser } + character = scope:my_praiser + triggered_animation = { + trigger = { + is_clergy = yes + } + animation = preaching + camera = camera_event_center_close_to_right + } + animation = admiration + camera = camera_event_center_moved_left + } + override_effect_2d = { + reference = legend_glow + } + + immediate = { + save_scope_as = praise_worthy_priest + save_scope_as = actor + save_scope_as = recipient + random_character_trait = { + limit = { + save_temporary_scope_as = temp_trait + root.rite = { + trait_is_virtue_rite = scope:temp_trait + } + } + save_scope_as = my_virtuous_trait + } + random_personal_tenet = { + limit = { + save_temporary_scope_as = temp_tenet + scope:praise_worthy_priest.rite = { + has_at_least_tenet_status = { + tenet = scope:temp_tenet + status = permitted + } + } + } + save_scope_as = my_virtuous_tenet + } + faith = { + ordered_faith_ruler = { + limit = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:praise_worthy_priest } + highest_held_title_tier >= tier_duchy + rite = root.rite + this != scope:praise_worthy_priest + is_adult = yes + is_available = yes + } + order_by = { + value = primary_title.tier + multiply = piety_level + add = "opinion(root)" + if = { + limit = { + is_close_family_of = scope:praise_worthy_priest + } + multiply = 1.5 + } + } + save_scope_as = my_praiser + } + } + if = { + limit = { + NOT = { exists = scope:my_praiser } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available = yes + this != root + } + } + cp:councillor_court_chaplain = { save_scope_as = my_praiser } + } + if = { + limit = { + NOT = { exists = scope:my_praiser } + } + ordered_vassal = { + order_by = primary_title.tier + limit = { + government_has_flag = government_is_ecclesiastical + rite = root.rite + this != scope:praise_worthy_priest + is_adult = yes + is_available = yes + } + save_scope_as = my_praiser + } + } + } + + option = { #C) Papacy + name = pam_decision_events.0015.c + flavor = pam_decision_events.0015.c.flavor + custom_tooltip = pam_decision_events.0015.c.tt + add_prestige = medium_prestige_gain + set_variable = { + name = pam_propagate_word_of_my_piety + value = 30 + } + ai_chance = { + base = 50 + } + } + + option = { #D) Papacy, pressed hard enough to top the shortlist + name = pam_decision_events.0015.d + flavor = pam_decision_events.0015.d.flavor + trigger = { + pam_papabile_slot_open_to_trigger = { SLOT = theocratic_elective_populist } + piety >= pam_place_first_as_populist_piety_cost_value + } + show_as_unavailable = { + pam_papabile_slot_open_to_trigger = { SLOT = theocratic_elective_populist } + piety < pam_place_first_as_populist_piety_cost_value + } + custom_tooltip = pam_decision_events.0015.d.tt + add_piety = { + value = pam_place_first_as_populist_piety_cost_value + multiply = -1 + } + pam_place_first_as_populist_effect = { VALUE = pam_papabile_place_first_populist_value } + stress_and_fulfillment_impact = { + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + ambitious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 0 + } + } + + option = { #B) Sainthood + name = pam_decision_events.0015.b + flavor = pam_decision_events.0015.b.flavor + custom_tooltip = pam_decision_events.0015.b.tt + set_variable = { + name = pam_propagate_word_of_my_sainthood + } + ai_chance = { + base = 50 + } + } +} + +# HoF Tenet Stance letter +# Triggered from pam_permit_tenet_decision / pam_prohibit_tenet_decision +pam_decision_events.0011 = { + type = letter_event + opening = pam_decision_events.0011.opening + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:pam_tenet_stance_permit } + desc = pam_decision_events.0011.desc.permitted + } + triggered_desc = { + trigger = { exists = scope:pam_tenet_stance_prohibit } + desc = pam_decision_events.0011.desc.prohibited + } + desc = pam_decision_events.0011.desc.fallback + } + } + sender = scope:pam_tenet_stance_issuer + + option = { + trigger = { + NAND = { + exists = scope:pam_tenet_stance_prohibit + has_personal_tenet = scope:pam_tenet_stance_tenet + } + } + name = { + trigger = { + exists = scope:pam_tenet_stance_permit + has_personal_tenet = scope:pam_tenet_stance_tenet + } + text = pam_tenet_stance_judgement_personal_permit + } + name = { + trigger = { + exists = scope:pam_tenet_stance_permit + any_desired_tenet = { + this = scope:pam_tenet_stance_tenet + } + } + text = pam_tenet_stance_judgement_aligned_permit + } + name = { + trigger = { + exists = scope:pam_tenet_stance_prohibit + any_desired_tenet = { + this = scope:pam_tenet_stance_tenet + } + } + text = pam_tenet_stance_judgement_aligned_prohibit + } + name = { + trigger = { exists = scope:pam_tenet_stance_permit } + text = pam_tenet_stance_judgement_distant_permit + } + name = { + trigger = { exists = scope:pam_tenet_stance_prohibit } + text = pam_tenet_stance_judgement_distant_prohibit + } + name = pam_tenet_stance_judgement_neutral + + show_as_tooltip = { + if = { + limit = { + exists = scope:pam_tenet_stance_permit + } + faith = { + set_tenet_status = { + tenet = scope:selected_item + status = permitted + } + change_fervor = { + value = significant_fervor_loss + desc = fervor_loss_pam_tenet_permitted + } + } + } + else = { + faith = { + set_tenet_status = { + tenet = scope:selected_item + status = prohibited + } + change_fervor = { + value = notable_fervor_value + desc = fervor_gain_pam_tenet_prohibited + } + } + } + } + } + + option = { + trigger = { + exists = scope:pam_tenet_stance_prohibit + has_personal_tenet = scope:pam_tenet_stance_tenet + } + name = pam_decision_events.0011.b + + show_as_tooltip = { + faith = { + set_tenet_status = { + tenet = scope:selected_item + status = prohibited + } + change_fervor = { + value = notable_fervor_value + desc = fervor_gain_pam_tenet_prohibited + } + } + } + + add_stress = medium_stress_gain + } +} + +# HoF Rite Heresy letter - non Catholic +pam_decision_events.0012 = { + type = letter_event + opening = pam_decision_events.0012.opening + desc = pam_decision_events.0012.desc + sender = scope:bull_issuer + + option = { + name = pam_decision_events.0012.a + custom_tooltip = pam_declare_rite_heresy_effect_tt + } +} + +pam_decision_events.0013 = { + type = letter_event + opening = pam_decision_events.0013.opening + desc = { + desc = pam_decision_events.0013.desc.intro + desc = pam_decision_events.0013.desc.outro + } + sender = scope:bull_issuer + + option = { + name = pam_decision_events.0013.a + add_piety = medium_piety_gain + if = { + limit = { + is_available_quick = { + advanced_ruler = yes + } + } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + } + } + + option = { + name = pam_decision_events.0013.b + trigger = { + exists = scope:bull_issuer + exists = scope:bull_issuer.rite + } + set_character_rite = scope:bull_issuer.rite + if = { + limit = { has_trait = heresiarch } + remove_trait = heresiarch + add_trait = herald + } + add_prestige = medium_prestige_loss + stress_impact = { + arrogant = medium_stress_impact_gain + zealous = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + } +} + +# Khachkar decision maintenance event +pam_decision_events.0016 = { + hidden = yes + + trigger = { + has_pam_dlc_trigger = yes + player_heir ?= { + is_close_family_of = root + is_alive = yes + rite = { + rite_has_parameter = tenet_khachkar_decision_unlock + } + } + dynasty = player_heir.dynasty + } + + immediate = { + player_heir = { + set_variable = { + name = pam_khachkar_ancestral_ancestor + value = root + years = 5 + } + } + } +} + +# Khachkar confirmed event. +pam_decision_events.0017 = { + type = character_event + title = pam_decision_events.0017.t + desc = pam_decision_events.0017.desc + theme = christian + override_background = { + trigger = { exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_background = { reference = temple } + + left_portrait = { + character = root + animation = personality_zealous + } + lower_right_portrait = { + character = scope:khachkar_ancestor + animation = dead + } + + trigger = { + has_pam_dlc_trigger = yes + has_variable = pam_khachkar_ancestral_ancestor + } + + immediate = { + if = { + limit = { NOT = { exists = scope:khachkar_ancestor } } + var:pam_khachkar_ancestral_ancestor = { save_scope_as = khachkar_ancestor } + } + if = { + limit = { NOT = { exists = scope:khachkar_location } } + capital_county = { save_scope_as = khachkar_location } + } + scope:khachkar_location.title_province = { save_scope_as = background_terrain_scope } + } + + option = { + name = pam_decision_events.0017.a + trigger = { + scope:khachkar_location = { + NOT = { + has_county_modifier = pam_khachkar_ancestral_county + } + } + } + pam_apply_ancestral_khachkar_effects = { + LOCATION = scope:khachkar_location + ANCESTOR = scope:khachkar_ancestor + } + custom_description_no_bullet = { + text = pam_raise_khachkar_decision_warning + } + ai_chance = { + base = 100 + } + } + + option = { + name = pam_decision_events.0017.b + add_gold = medium_gold_value + remove_decision_cooldown = pam_raise_khachkar_decision + ai_chance = { + base = 0 + } + } +} + +# HoF Crusade Age core tenet letter event +pam_decision_events.0018 = { + type = letter_event + opening = pam_decision_events.0018.opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:hof_scope.faith = faith:catholic + } + desc = pam_decision_events.0018.desc.armed_pilgrimages + } + desc = pam_decision_events.0018.desc.struggle_submission + } + } + sender = scope:hof_scope + + option = { + name = pam_decision_events.0018.a + + show_as_tooltip = { + if = { + limit = { faith = faith:catholic } + faith = { + main_rite = { + add_rite_tenet = tenet_armed_pilgrimages + } + } + } + else = { + faith = { + main_rite = { + add_rite_tenet = tenet_struggle_submission + } + } + } + } + } +} + +# Secure Pilgrim Routes confirmation event +pam_decision_events.0019 = { + type = character_event + window = big_event_window + theme = christian + title = pam_decision_events.0019.t + desc = pam_decision_events.0019.desc + + override_effect_2d = { + reference = legend_glow + } + + widget = { + gui = "event_window_widget_rite" + container = "custom_widgets_container" + } + + left_portrait = { + character = root + animation = preaching + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + save_scope_as = hof_scope + pam_secure_pilgrim_routes_effect = yes + } + + option = { + name = pam_decision_events.0019.a + } + + after = { + faith = { + every_faith_character = { + limit = { + is_ruler = yes + this != scope:hof_scope + } + trigger_event = { id = pam_decision_events.0018 days = 1 } + } + } + } +} + + +pam_decision_events.0020 = { + type = character_event + title = pam_decision_events.0020.t + + desc = pam_decision_events.0020.desc + + theme = christian + override_background = { + reference = pam_romanesque_church_exterior + } + left_portrait = { + character = root + animation = preaching + camera = camera_event_center_pointing_forward + } + right_portrait = { + character = scope:portrait + triggered_animation = { + trigger = { + is_clergy = yes + } + animation = prayer_standing_eyes + } + animation = admiration + } + override_effect_2d = { + reference = legend_glow + } + + immediate = { + random_in_list = { + list = evangelized_subjects + save_scope_as = evangelized_subject + } + random_in_list = { + list = evangelized_clerical_region_rulers + save_scope_as = evangelized_clerical_region_ruler + } + if = { + limit = { + exists = scope:evangelized_clerical_region_ruler + } + scope:evangelized_clerical_region_ruler = { + save_scope_as = portrait + } + } + else = { + scope:evangelized_subject = { + save_scope_as = portrait + } + } + } + option = { + name = pam_decision_events.0020.a + trigger = { + list_size:evangelized_clerical_region_rulers > 0 + } + every_in_list = { + list = evangelized_clerical_region_rulers + custom = every_clerical_region_ruler_evangelized_personal_tenet_tt + random = { + chance = pam_evangelize_tenet_adoption_chance_value + save_temporary_scope_as = tenet_adopter + custom_tooltip = pam_evangelize_tenet_adopt_personal_tenet_tt + hidden_effect = { + root = { + send_interface_message = { + type = event_generic_good + title = pam_evangelize_tenet_adopted_message_title + left_icon = scope:tenet_adopter + scope:tenet_adopter = { + pam_replace_personal_tenet_effect = { TENET = scope:pam_evangelize_tenet } + } + } + } + } + } + } + ai_will_select = { + value = 10 + multiply = list_size:evangelized_clerical_region_rulers + } + } + option = { + name = pam_decision_events.0020.b + trigger = { + list_size:evangelized_subjects > 0 + } + every_in_list = { + list = evangelized_subjects + custom = every_subject_evangelized_personal_tenet_tt + random = { + chance = pam_evangelize_tenet_adoption_chance_value + save_temporary_scope_as = tenet_adopter + custom_tooltip = pam_evangelize_tenet_adopt_personal_tenet_tt + hidden_effect = { + root = { + send_interface_message = { + type = event_generic_good + title = pam_evangelize_tenet_adopted_message_title + left_icon = scope:tenet_adopter + scope:tenet_adopter = { + pam_replace_personal_tenet_effect = { TENET = scope:pam_evangelize_tenet } + } + } + } + } + } + } + ai_will_select = { + value = 10 + multiply = list_size:evangelized_subjects + } + } + + option = { + name = pam_decision_events.0020.c + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + ai_will_select = { + value = 0 + if = { + limit = { + spiritual_fulfillment <= 0 + } + add = 20 + } + } + } +} + +# Proclaim the Living Word - capstone of pam_proclaim_living_word_decision, fires after the herald trait is granted +pam_decision_events.0021 = { + type = character_event + window = big_event_window + title = pam_decision_events.0021.t + desc = pam_decision_events.0021.desc + theme = christian + override_background = temple + widgets = { + widget = { + gui = event_window_widget_vfx_godray + container = background_shader_vfx_container + } + } + + left_portrait = { + character = root + animation = preaching + } + + option = { # A shepherd's mercy for the gathered flock + name = pam_decision_events.0021.a + add_character_modifier = { + modifier = pam_herald_shepherd_of_the_faithful_modifier + } + show_as_tooltip = { + add_trait_force_tooltip = herald + } + stress_and_fulfillment_impact = { + sadistic = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = wrathful + } + } + } + } + + option = { # Turn the sermon into a call to arms + name = pam_decision_events.0021.b + add_character_modifier = { + modifier = pam_herald_fire_and_sword_modifier + } + show_as_tooltip = { + add_trait_force_tooltip = herald + } + stress_and_fulfillment_impact = { + compassionate = medium_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } +} + +#Consecrate Kingdom +pam_decision_events.0030 = { + type = letter_event + opening = pam_decision_events.0030.opening + desc = pam_decision_events.0030.desc + sender = scope:king_aspirant + + immediate = { + if = { + limit = { + scope:king_aspirant = { + any_held_title = { + tier = tier_duchy + kingdom.holder ?= { + religion = root.religion + NOT = { + this = root + } + } + } + } + } + scope:king_aspirant = { + every_held_title = { + limit = { + tier = tier_duchy + kingdom.holder ?= { + religion = root.religion + NOT = { + this = root + } + } + } + kingdom.holder = { + add_to_list = grateful_refusal_chars + } + } + } + } + } + + #Grant kingdom + option = { + name = pam_decision_events.0030.a + add_prestige = major_prestige_loss + scope:king_aspirant = { + consecrate_kingdom_player_cleric_effect = yes + consecrate_kingdom_effect = yes + } + + every_in_list = { + list = grateful_refusal_chars + add_opinion = { + target = root + modifier = gave_away_de_jure_lands_opinion + opinion = -50 + } + } + if = { + limit = { + scope:king_aspirant = { + is_independent_ruler = no + liege = { + NOR = { + is_in_list = grateful_refusal_chars + this = root + } + } + } + } + scope:king_aspirant.liege = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -50 + } + } + } + } + #Refuse + option = { + name = pam_decision_events.0030.b + scope:king_aspirant = { + send_interface_toast = { + type = event_toast_effect_bad + title = pam_decision_events.0030.b.decline + left_icon = scope:religious_authority + progress_towards_rival_effect = { + REASON = rival_refused_kingdom + CHARACTER = scope:religious_authority + OPINION = 0 + } + add_opinion = { + target = scope:religious_authority + modifier = refusal_opinion + opinion = -75 + } + add_piety_level = -1 + } + } + every_in_list = { + list = grateful_refusal_chars + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + if = { + limit = { + scope:king_aspirant = { + is_independent_ruler = no + liege = { + NOR = { + is_in_list = grateful_refusal_chars + this = root + } + } + } + } + scope:king_aspirant.liege = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + } + ai_chance = { + base = 0 + } + } +} +#I have had a new Kingdom consecrated +pam_decision_events.0031 = { + type = character_event + title = pam_decision_events.0031.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root = scope:religious_authority + } + desc = pam_decision_events.0031.desc.self_crowning + } + triggered_desc = { + trigger = { exists = scope:three_duchies } + desc = pam_decision_events.0031.desc_three_duchies + } + desc = pam_decision_events.0031.desc + } + + } + theme = coronation + override_background = { + reference = temple + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:oriental_orthodox_religion + } + } + animation = divine_gesture_3 + } + triggered_animation = { + trigger = { + OR = { + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:oriental_orthodox_religion + } + } + animation = scepter + } + animation = zealous_superior + camera = camera_event_right_wedding + } + right_portrait = { + character = scope:consecrator + triggered_animation = { + trigger = { + OR = { + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:oriental_orthodox_religion + } + } + animation = acknowledging_crozier + } + animation = wedding_priest + camera = camera_event_left_to_the_left + } + window = big_event_window + widget = { gui = event_window_widget_vfx_godray container = foreground_shader_vfx_container } + + immediate = { + if = { + limit = { + NOT = { + scope:religious_authority = root + } + } + scope:religious_authority = { + save_scope_as = consecrator + } + } + if = { + limit = { + OR = { + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:oriental_orthodox_religion + } + } + play_music_cue = "mx_cue_deus_hoc_vult" + } + else = { + play_music_cue = "mx_cue_epic_sacral_moment" + } + # If Kingdom is formed from three Duchies, specifically shout that out + if = { + limit = { + any_held_title = { + title_tier = duchy + count >= 3 + } + } + scope:old_title = { # Carried over from the decision + save_scope_as = duchy_1 + } + random_held_title = { + title_tier = duchy + limit = { + this != scope:duchy_1 + } + save_scope_as = duchy_2 + } + random_held_title = { + title_tier = duchy + limit = { + NOR = { + this = scope:duchy_1 + this = scope:duchy_2 + } + } + save_scope_as = duchy_3 + } + if = { # Safeguarding against loc-breaking here + limit = { + exists = scope:duchy_1 + exists = scope:duchy_2 + exists = scope:duchy_3 + } + save_scope_value_as = { + name = three_duchies + value = yes + } + } + } + show_as_tooltip = { + set_primary_title_to = scope:new_title + } + + } + + option = { + name = pam_decision_events.0031.a + custom_tooltip = major_decisions.1101.i_have_become_royal + } +} + +# Develop Clerical Court +pam_decision_events.0032 = { + type = character_event + title = pam_decision_events.0032.t + window = big_event_window + theme = christian + override_background = { + reference = temple + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_decision_events.0032.desc.intro.christian + } + desc = pam_decision_events.0032.desc.intro + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:pam_clerical_pupil } + desc = pam_decision_events.0032.desc.pupil + } + desc = pam_decision_events.0032.desc.no_pupil + } + triggered_desc = { + trigger = { exists = scope:pam_clerical_novice } + desc = pam_decision_events.0032.desc.novice + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + desc = pam_decision_events.0032.desc.outro.christian + } + desc = pam_decision_events.0032.desc.outro + } + } + + left_portrait = { + character = root + animation = preaching + } + center_portrait = { + character = scope:pam_clerical_novice + animation = prayer_standing_eyes + camera = camera_event_scheme_right + } + right_portrait = { + character = scope:pam_clerical_pupil + animation = prayer_standing + } + + immediate = { + save_scope_as = pam_clerical_patron + # The featured pupil: prefer a cleric with room to grow, fall back to an ordination candidate + if = { + limit = { + any_courtier = { pam_clerical_court_pupil_trigger = yes } + } + random_courtier = { + limit = { pam_clerical_court_pupil_trigger = yes } + save_scope_as = pam_clerical_pupil + } + } + else_if = { + limit = { + any_courtier = { pam_clerical_court_ordain_candidate_trigger = yes } + } + random_courtier = { + limit = { pam_clerical_court_ordain_candidate_trigger = yes } + save_scope_as = pam_clerical_pupil + } + } + if = { + limit = { + any_pool_character = { + province = root.location + pam_clerical_court_novice_trigger = { RULER = root } + } + } + random_pool_character = { + province = root.location + limit = { pam_clerical_court_novice_trigger = { RULER = root } } + save_scope_as = pam_clerical_novice + } + } + # Opportunity roll - most of the time nothing lands and the top option stays hidden + random_list = { + 100 = { + # No opportunity this time + } + 20 = { + save_scope_value_as = { name = pam_clerical_opportunity value = flag:piety } + } + 12 = { + trigger = { + exists = scope:pam_clerical_novice + any_courtier = { + count < pam_clerical_court_size_cap_value + is_clergy = yes + } + } + save_scope_value_as = { name = pam_clerical_opportunity value = flag:novice } + } + 10 = { + trigger = { + faith = { + OR = { + faith_has_monasticism_trigger = yes + any_faith_holy_order = { always = yes } + } + } + } + save_scope_value_as = { name = pam_clerical_opportunity value = flag:oblates } + } + 10 = { + trigger = { exists = scope:pam_clerical_pupil } + save_scope_value_as = { name = pam_clerical_opportunity value = flag:language } + } + 8 = { + save_scope_value_as = { name = pam_clerical_opportunity value = flag:relic } + } + 8 = { + save_scope_value_as = { name = pam_clerical_opportunity value = flag:scriptorium } + } + 6 = { + trigger = { + exists = scope:pam_clerical_pupil + scope:pam_clerical_pupil = { + OR = { + NOT = { has_trait = lifestyle_mystic } + has_trait_xp = { trait = lifestyle_mystic value < 100 } + } + } + } + save_scope_value_as = { name = pam_clerical_opportunity value = flag:miracle } + } + # Rare, and never while the court already houses a prodigy + 3 = { + trigger = { + exists = scope:pam_clerical_pupil + NOT = { + any_courtier = { has_character_flag = pam_clerical_prodigy_flag } + } + } + save_scope_value_as = { name = pam_clerical_opportunity value = flag:prodigy } + } + } + } + + # Opportunity: a prodigy reveals themselves + option = { + name = pam_decision_events.0032.prodigy + trigger = { + exists = scope:pam_clerical_opportunity + scope:pam_clerical_opportunity = flag:prodigy + } + scope:pam_clerical_pupil = { + add_character_flag = pam_clerical_prodigy_flag + add_learning_skill = { 4 6 } + if = { + limit = { has_trait = education_learning_3 } + hidden_effect = { remove_trait = education_learning_3 } + add_trait = education_learning_4 + } + else_if = { + limit = { has_trait = education_learning_2 } + hidden_effect = { remove_trait = education_learning_2 } + add_trait = education_learning_3 + } + else_if = { + limit = { has_trait = education_learning_1 } + hidden_effect = { remove_trait = education_learning_1 } + add_trait = education_learning_2 + } + } + add_piety = pam_clerical_court_piety_reward_value + ai_chance = { base = 100 } + } + + # Opportunity: a reputation as a patron of oblates + option = { + name = pam_decision_events.0032.oblates + trigger = { + exists = scope:pam_clerical_opportunity + scope:pam_clerical_opportunity = flag:oblates + } + add_character_modifier = { + modifier = pam_oblate_patron_modifier + years = 10 + } + add_piety = pam_clerical_court_piety_reward_value + ai_chance = { base = 100 } + } + + # Opportunity: a windfall of devotion + option = { + name = pam_decision_events.0032.piety + trigger = { + exists = scope:pam_clerical_opportunity + scope:pam_clerical_opportunity = flag:piety + } + add_piety = pam_clerical_court_piety_windfall_value + ai_chance = { base = 100 } + } + + # Opportunity: a gifted novice presents himself + option = { + name = pam_decision_events.0032.novice + trigger = { + exists = scope:pam_clerical_opportunity + scope:pam_clerical_opportunity = flag:novice + } + add_courtier = scope:pam_clerical_novice + scope:pam_clerical_novice = { + # Convert before the trait grant, so clergy enrollment lands on the right faith + if = { + limit = { + NOT = { faith = scope:pam_clerical_patron.faith } + } + set_character_faith = scope:pam_clerical_patron.faith + } + if = { + limit = { NOT = { rite = scope:pam_clerical_patron.rite } } + set_character_rite = scope:pam_clerical_patron.rite + } + if = { + limit = { learning < scope:pam_clerical_patron.pam_clerical_court_learning_cap_value } + add_learning_skill = pam_clerical_court_novice_learning_boost_value + } + if = { + limit = { NOT = { has_trait = cleric } } + # Trait's dynamic name uses pre-conversion faith in the tooltip + custom_tooltip = pam_clerical_court_joins_clergy_tt + hidden_effect = { + add_trait = cleric + } + } + } + add_piety = pam_clerical_court_piety_reward_value + ai_chance = { base = 100 } + } + + # Opportunity: a miracle worker emerges + option = { + name = pam_decision_events.0032.miracle + trigger = { + exists = scope:pam_clerical_opportunity + scope:pam_clerical_opportunity = flag:miracle + } + scope:pam_clerical_pupil = { + if = { + limit = { NOT = { has_trait = lifestyle_mystic } } + add_trait = lifestyle_mystic + } + else = { + add_trait_xp = { + trait = lifestyle_mystic + value = pam_clerical_court_trait_xp_gain_value + } + } + } + add_piety = pam_clerical_court_piety_reward_value + ai_chance = { base = 100 } + } + + # Opportunity: a holy text surfaces in the library + option = { + name = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + text = pam_decision_events.0032.relic.christian + } + name = { + # Valid name candidates are picked at random, so the fallback must exclude the branched case + trigger = { + NOT = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + } + text = pam_decision_events.0032.relic + } + trigger = { + exists = scope:pam_clerical_opportunity + scope:pam_clerical_opportunity = flag:relic + } + if = { + limit = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + create_christian_religious_artifact_effect = { + OWNER = root + CREATOR = root + } + } + else = { + # A lasting object for every faith - a sacred text of unknown, ancient authorship + random_dummy_gender_effect = yes + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:religious_text + SET_TOPIC = flag:no + } + } + add_piety = pam_clerical_court_piety_reward_value + ai_chance = { base = 100 } + } + + # Opportunity: a cleric masters the liturgical tongue + option = { + name = pam_decision_events.0032.language + trigger = { + exists = scope:pam_clerical_opportunity + scope:pam_clerical_opportunity = flag:language + } + scope:pam_clerical_pupil = { + if = { + limit = { + portrait_religious_western_christian_trigger = yes + NOT = { knows_language = language_latin } + } + learn_language = language_latin + } + else_if = { + limit = { + portrait_religious_orthodox_trigger = yes + NOT = { knows_language = language_greek } + } + learn_language = language_greek + } + else_if = { + limit = { NOT = { has_trait = lifestyle_scholar } } + add_trait = lifestyle_scholar + } + else = { + add_trait_xp = { + trait = lifestyle_scholar + value = pam_clerical_court_trait_xp_gain_value + } + } + } + add_piety = pam_clerical_court_piety_reward_value + ai_chance = { base = 100 } + } + + # Opportunity: the scriptorium flourishes + option = { + name = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + text = pam_decision_events.0032.scriptorium.christian + } + name = { + trigger = { + NOT = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + } + text = pam_decision_events.0032.scriptorium + } + trigger = { + exists = scope:pam_clerical_opportunity + scope:pam_clerical_opportunity = flag:scriptorium + } + add_character_modifier = { + modifier = pam_scriptorium_modifier + years = 10 + } + add_piety = pam_clerical_court_piety_reward_value + ai_chance = { base = 100 } + } + + # Ordain lay courtiers into the clergy + option = { + name = { + trigger = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + text = pam_decision_events.0032.a.christian + } + name = { + trigger = { + NOT = { + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + } + } + text = pam_decision_events.0032.a + } + trigger = { + any_courtier = { pam_clerical_court_ordain_candidate_trigger = yes } + } + custom_tooltip = pam_decision_events.0032.a.tt + add_piety = pam_clerical_court_piety_reward_value + hidden_effect = { + ordered_courtier = { + limit = { pam_clerical_court_ordain_candidate_trigger = yes } + order_by = learning + max = pam_clerical_court_batch_value + check_range_bounds = no + pam_clerical_court_ordain_effect = yes + } + } + ai_chance = { + base = 100 + # Always bank a rolled opportunity + modifier = { + factor = 0 + exists = scope:pam_clerical_opportunity + } + } + } + + # Instruct the clergy already at court + option = { + name = pam_decision_events.0032.b + trigger = { + any_courtier = { pam_clerical_court_pupil_trigger = yes } + } + custom_tooltip = pam_decision_events.0032.b.tt + add_piety = pam_clerical_court_piety_reward_value + hidden_effect = { + ordered_courtier = { + limit = { pam_clerical_court_pupil_trigger = yes } + order_by = learning + max = pam_clerical_court_batch_value + check_range_bounds = no + pam_clerical_court_instruct_effect = yes + } + } + ai_chance = { + base = 50 + # Always bank a rolled opportunity + modifier = { + factor = 0 + exists = scope:pam_clerical_opportunity + } + } + } + + # We call for nearby novices and hide this if none exist, never spawning one + # A named supplicant is recruited first + option = { + name = { + trigger = { exists = scope:pam_clerical_novice } + text = pam_decision_events.0032.c.named + } + name = { + trigger = { NOT = { exists = scope:pam_clerical_novice } } + text = pam_decision_events.0032.c + } + trigger = { + any_pool_character = { + province = root.location + pam_clerical_court_novice_trigger = { RULER = root } + } + } + custom_tooltip = pam_decision_events.0032.c.tt + add_piety = pam_clerical_court_piety_reward_value + hidden_effect = { + set_variable = { + name = pam_clerical_recruits_left + value = pam_clerical_court_batch_value + } + while = { + count = 4 # Hard bound matching the highest batch; the limits below are what actually end the loop + limit = { + var:pam_clerical_recruits_left > 0 + any_pool_character = { + province = root.location + pam_clerical_court_novice_trigger = { RULER = root } + } + } + pam_clerical_court_recruit_effect = yes + change_variable = { + name = pam_clerical_recruits_left + subtract = 1 + } + } + remove_variable = pam_clerical_recruits_left + } + ai_chance = { + base = 1 + modifier = { + add = 99 + any_courtier = { + count < pam_clerical_court_size_cap_value + is_clergy = yes + } + } + # Always bank a rolled opportunity + modifier = { + factor = 0 + exists = scope:pam_clerical_opportunity + } + } + } +} diff --git a/events/dlc/pam/pam_generic_events.txt b/events/dlc/pam/pam_generic_events.txt new file mode 100644 index 000000000..6d881c435 --- /dev/null +++ b/events/dlc/pam/pam_generic_events.txt @@ -0,0 +1,1909 @@ +namespace = pam_generic_events + +# Gain Religious Scholar +pam_generic_events.0001 = { + type = character_event + title = pam_generic_events.0001.t + desc = pam_generic_events.0001.desc + theme = christian + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chaplain + animation = reading + } + + cooldown = { years = 20 } + + trigger = { + is_available = yes + age >= 10 + NOT = { has_trait = lifestyle_scholar } + cp:councillor_court_chaplain ?= { + opinion = { + target = root + value > 10 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + government_is_religious_trigger = yes + add = 0.25 + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # Get trait + name = pam_generic_events.0001.a + add_trait = lifestyle_scholar + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + government_is_religious_trigger = yes + factor = 2 + } + } + } + + option = { # I'm good ty + name = pam_generic_events.0001.b + + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + } + } +} + +# Child doubts their goodness +scripted_trigger pam_generic_events_0002_valid_child_trigger = { + is_alive = yes + is_courtier_of = root + NOT = { has_relation_rival = root } + rite = root.rite + age > 5 + age < 19 + basic_is_available_ai = yes + OR = { + num_sinful_traits > 0 + spiritual_fulfillment < 0 + } +} + +pam_generic_events.0002 = { + type = character_event + title = pam_generic_events.0002.t + desc = { + desc = pam_generic_events.0002.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:sinful_trait } + desc = pam_generic_events.0002.desc.sin + } + desc = pam_generic_events.0002.desc.sp + } + desc = pam_generic_events.0002.desc.outro + } + theme = christian + override_background = { reference = bedchamber } + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_night_scene container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = worry + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:doubting_child + animation = crying + outfit_tags = { nightgown } + } + + cooldown = { years = 10 } + + trigger = { + has_pam_dlc_trigger = yes + is_available = yes + any_child = { + pam_generic_events_0002_valid_child_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + has_trait = compassionate + } + } + + immediate = { + random_child = { + limit = { + pam_generic_events_0002_valid_child_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 2 + num_sinful_traits > 0 + } + modifier = { + add = 1 + spiritual_fulfillment < 0 + } + } + save_scope_as = doubting_child + if = { + limit = { num_sinful_traits > 0 } + random_character_trait = { + limit = { + scope:doubting_child.rite = { + trait_is_sin_rite = prev + } + } + save_scope_as = sinful_trait + } + } + } + } + + option = { # Urge them to cast off the sin + name = pam_generic_events.0002.a + trigger = { + scope:doubting_child = { + num_sinful_traits > 0 + } + } + scope:doubting_child = { + flip_sinful_trait_effect = yes + stress_and_fulfillment_impact = { + base = massive_stress_impact_gain + } + } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + option = { # Comfort them + name = pam_generic_events.0002.b + progress_towards_friend_effect = { + CHARACTER = scope:doubting_child + REASON = friend_comforted_child_doubts + OPINION = default_friend_opinion + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = callous + } + } + } + + option = { # Pray together + name = pam_generic_events.0002.c + add_piety = medium_piety_gain + scope:doubting_child = { + add_piety = minor_piety_gain + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } +} +# Spouse worries about your sinful ways +scripted_trigger pam_generic_events_0003_valid_spouse_trigger = { + is_available_ai_adult = yes + NOT = { has_same_sinful_trait = root } +} + +pam_generic_events.0003 = { + type = character_event + title = pam_generic_events.0003.t + desc = pam_generic_events.0003.desc + theme = christian + override_background = { reference = garden } + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_night_scene container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = arrogant } + animation = dismissal + } + animation = sadness + } + right_portrait = { + character = scope:worried_spouse + animation = stress + } + + cooldown = { years = 10 } + + trigger = { + has_pam_dlc_trigger = yes + is_available = yes + num_sinful_traits > 0 + primary_spouse ?= { + pam_generic_events_0003_valid_spouse_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + primary_spouse ?= { has_trait = zealous } + } + modifier = { + add = 0.25 + num_sinful_traits >= 2 + } + } + + immediate = { + primary_spouse = { save_scope_as = worried_spouse } + random_character_trait = { + limit = { + root.rite = { + trait_is_sin_rite = prev + } + } + save_scope_as = sinful_trait + } + } + + option = { # Promise pilgrimage and change + name = pam_generic_events.0003.a + add_character_modifier = pilgrimage_promised_modifier + progress_towards_lover_effect = { + CHARACTER = scope:worried_spouse + REASON = lover_promised_to_change_ways + OPINION = default_lover_opinion + } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + scope:worried_spouse = { + if = { + limit = { is_playable_character = yes } # Only playable characters have spiritual fulfillment + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + } + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_zeal = 0.25 + } + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # Double down + name = pam_generic_events.0003.b + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + add_dread = medium_dread_gain + progress_towards_rival_effect = { + CHARACTER = scope:worried_spouse + REASON = rival_embraced_sinful_ways + OPINION = default_rival_opinion + } + stress_and_fulfillment_impact = { + arrogant = minor_stress_impact_loss + callous = minor_stress_impact_loss + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = -0.25 + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 0 + has_trait = humble + } + } + } + + option = { # Tell them to chill + name = pam_generic_events.0003.c + scope:worried_spouse = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + stress_and_fulfillment_impact = { + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_sociability = -0.25 + } + modifier = { + factor = 2 + has_trait = callous + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } +} + +# Friend/chaplain comforts you after a family death +scripted_trigger pam_generic_events_0004_recent_family_death_memory_trigger = { + OR = { + has_memory_type = relative_died + has_memory_type = spouse_died + } + memory_age_years < 5 + exists = memory_participant:dead_relation +} + +pam_generic_events.0004 = { + type = character_event + title = pam_generic_events.0004.t + desc = pam_generic_events.0004.desc + theme = christian + override_background = { reference = temple } + widgets = { + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_fog container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_night_scene container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:comforter + animation = personality_compassionate + outfit_tags = { no_headgear } + camera = camera_event_right_away_3_4 + } + lower_center_portrait = { + trigger = { exists = scope:deceased } + character = scope:deceased + animate_if_dead = yes + } + + cooldown = { years = 10 } + + trigger = { + has_pam_dlc_trigger = yes + is_available = yes + age >= 10 + any_memory = { + pam_generic_events_0004_recent_family_death_memory_trigger = yes + } + OR = { + any_relation = { + type = friend + is_available_ai_adult = yes + } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_relation = { + type = friend + } + } + modifier = { + add = 0.25 + any_secret = { + type = secret_murder + secret_target = { + is_alive = no + OR = { + is_close_family_of = root + is_spouse_of_even_if_dead = root + } + } + } + } + } + + immediate = { + # Prefer mourning someone you secretly murdered + if = { + limit = { + any_secret = { + type = secret_murder + secret_target ?= { + is_alive = no + time_since_death = { years <= 5 } + OR = { + is_close_family_of = root + is_spouse_of_even_if_dead = root + } + } + } + } + random_secret = { + type = secret_murder + limit = { + secret_target = { + is_alive = no + time_since_death = { years <= 5 } + OR = { + is_close_family_of = root + is_spouse_of_even_if_dead = root + } + } + } + save_scope_as = murder_secret + secret_target = { save_scope_as = deceased } + } + } + else_if = { + limit = { NOT = { exists = scope:deceased } } + random_memory = { + limit = { + pam_generic_events_0004_recent_family_death_memory_trigger = yes + } + memory_participant:dead_relation = { + save_scope_as = deceased + } + } + } + if = { + limit = { + any_relation = { + type = best_friend + is_available_ai_adult = yes + } + } + random_relation = { + type = best_friend + limit = { is_available_ai_adult = yes } + save_scope_as = comforter + } + } + else_if = { + limit = { + any_relation = { + type = friend + is_available_ai_adult = yes + } + } + random_relation = { + type = friend + limit = { is_available_ai_adult = yes } + save_scope_as = comforter + } + } + else = { + cp:councillor_court_chaplain = { save_scope_as = comforter } + } + } + + option = { # Confess the murder + name = pam_generic_events.0004.a + trigger = { + exists = scope:murder_secret + } + add_internal_flag = special + scope:murder_secret = { remove_secret = yes } + stress_and_fulfillment_impact = { + base = massive_stress_impact_gain + humble = minor_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + ai_compassion = 0.25 + } + modifier = { + factor = 2 + has_trait = humble + } + modifier = { + factor = 0 + has_trait = callous + } + modifier = { + factor = 0 + has_trait = sadistic + } + } + } + + option = { # Quote scripture + name = pam_generic_events.0004.b + trigger = { + OR = { + has_trait = lifestyle_scholar + has_trait = theologian + } + } + add_scholar_trait_or_xp_effect = { VALUE = 10 } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # Pray together + name = pam_generic_events.0004.c + trigger = { + NOR = { + has_trait = lifestyle_scholar + has_trait = theologian + } + } + add_piety = minor_piety_gain + scope:comforter = { + add_piety = minor_piety_gain + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # Drink together + name = pam_generic_events.0004.d + stress_and_fulfillment_impact = { + base = medium_stress_impact_loss + drunkard = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.25 + } + modifier = { + factor = 2 + has_trait = drunkard + } + modifier = { + factor = 0 + has_trait = temperate + } + } + } +} + +# Loyal vassal offers to thrash the clerical region holder after your excommunication +scripted_trigger pam_generic_events_0005_loyal_vassal_trigger = { + is_available_ai_adult = yes + is_travelling = no + opinion = { + target = root + value > 0 + } + NOT = { this = root.capital_county.clerical_region_title.holder } +} + +pam_generic_events.0005 = { + type = character_event + title = pam_generic_events.0005.t + desc = pam_generic_events.0005.desc + theme = christian + override_background = { reference = council_chamber } + + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:loyal_vassal + animation = aggressive_sword + } + lower_center_portrait = { + character = scope:clerical_holder + } + + cooldown = { years = 10 } + + trigger = { + has_pam_dlc_trigger = yes + is_available_adult = yes + has_trait = excommunicated + exists = capital_county.clerical_region_title.holder + capital_county.clerical_region_title.holder = { + is_ai = yes + this != root + } + any_vassal = { + pam_generic_events_0005_loyal_vassal_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_vassal = { + count >= 3 + pam_generic_events_0005_loyal_vassal_trigger = yes + } + } + } + + immediate = { + capital_county.clerical_region_title = { + save_scope_as = clerical_region + holder = { save_scope_as = clerical_holder } + } + random_vassal = { + limit = { pam_generic_events_0005_loyal_vassal_trigger = yes } + weight = { + base = 1 + modifier = { + add = 50 + opinion = { + target = root + value >= 50 + } + } + } + save_scope_as = loyal_vassal + } + } + + option = { # Send them + name = pam_generic_events.0005.a + custom_tooltip = pam_generic_events.0005.a.tt + scope:loyal_vassal = { + start_travel_plan = { + destination = scope:clerical_holder.capital_province + return_trip = yes + on_arrival_event = pam_generic_events.0006 + on_arrival_destinations = last + } + } + stress_and_fulfillment_impact = { + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.5 + } + modifier = { + factor = 2 + has_trait = wrathful + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + option = { # Scheme instead + name = pam_generic_events.0005.b + custom_tooltip = pam_generic_events.0005.b.tt + set_variable = { + name = pam_generic_0005_murder_target + value = scope:clerical_holder + years = 15 + } + stress_and_fulfillment_impact = { + deceitful = minor_stress_impact_loss + honest = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.25 + } + modifier = { + factor = 2 + has_trait = deceitful + } + modifier = { + factor = 2 + intrigue >= high_skill_rating + } + } + } + + option = { # Turn the other cheek + name = pam_generic_events.0005.c + custom_tooltip = pam_generic_events.0005.c.tt + custom_tooltip = pam_generic_events.0005.c.tt2 + set_variable = { + name = pam_turned_the_other_cheek_var + years = 10 + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = 0.25 + } + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 2 + has_trait = humble + } + modifier = { + factor = 0 + has_trait = wrathful + } + } + } +} + +# Letter: your vassal reports the beating +pam_generic_events.0006 = { # Needed so the event triggers for the liege + hidden = yes + + trigger = { + scope:clerical_holder = { is_alive = yes } + } + + immediate = { + save_scope_as = sender + liege = { + capital_county.clerical_region_title = { + holder = { save_scope_as = clerical_holder } + } + } + } + + option = { ai_chance = { base = 100 } } + + after = { + liege = { + trigger_event = { + id = pam_generic_events.0007 + days = 1 + } + } + } +} + +pam_generic_events.0007 = { + type = letter_event + opening = { + desc = pam_generic_events.0007.opening + } + desc = pam_generic_events.0007.desc + sender = { + character = scope:sender + animation = happiness + } + + immediate = { + scope:clerical_holder = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + + option = { + name = pam_generic_events.0007.a + add_dread = medium_dread_gain + every_vassal = { + limit = { + has_vassal_stance = belligerent + } + custom = every_belligerent_vassal + add_opinion = { + modifier = impressed_opinion + opinion = 15 + target = root + } + } + } +} + +# You hear the voice of god telling you how virtuous you are +pam_generic_events.0008 = { + type = character_event + title = pam_generic_events.0008.t + desc = pam_generic_events.0008.desc + theme = christian + override_background = { reference = corridor_night } + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_fog container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = sick + } + + cooldown = { years = 10 } + + trigger = { + has_pam_dlc_trigger = yes + is_available_adult = yes + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + num_virtuous_traits > 0 + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + has_trait = possessed + has_trait = witch + } + } + } + + immediate = { + random_character_trait = { + limit = { + root.rite = { + trait_is_virtue_rite = prev + } + } + save_scope_as = virtuous_trait + } + } + + option = { # Possessed + name = pam_generic_events.0008.a + trigger = { + OR = { + has_trait = possessed_1 + has_trait = possessed_genetic + } + } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + add_character_modifier = pam_religious_delirium_modifier + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } + + option = { # Neither possessed nor witch: believe it is God + name = pam_generic_events.0008.b + trigger = { + NOR = { + has_trait = possessed_1 + has_trait = possessed_genetic + has_trait = witch + } + } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + if = { + limit = { is_ai = no } + random = { + chance = 5 + add_trait = possessed_1 + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # Witch + name = pam_generic_events.0008.c + trigger = { + has_trait = witch + NOR = { + has_trait = possessed_1 + has_trait = possessed_genetic + } + } + add_character_modifier = pam_religious_delirium_modifier + random = { + chance = 10 + add_trait = possessed_1 + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_zeal = 0.25 + } + } + } + + option = { # I know exactly what this is + name = pam_generic_events.0008.d + trigger = { learning >= high_skill_rating } + show_as_unavailable = { + learning < high_skill_rating + } + if = { + limit = { NOT = { has_trait = lifestyle_physician } } + add_trait = lifestyle_physician + } + else = { + add_trait_xp = { + trait = lifestyle_physician + value = 10 + } + } + stress_and_fulfillment_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { # Speculate it was the food + name = pam_generic_events.0008.e + trigger = { learning < high_skill_rating } + add_learning_lifestyle_xp = minor_lifestyle_xp + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.25 + } + } + } + + option = { # Pray + name = pam_generic_events.0008.f + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + factor = 2 + has_trait = zealous + } + } + } +} + +# Clergy member has a hellish nightmare +scripted_trigger pam_generic_events_0009_comforting_courtier_trigger = { + is_available_ai_adult = yes + opinion = { + target = root + value > 0 + } +} + +pam_generic_events.0009 = { + type = character_event + title = pam_generic_events.0009.t + desc = pam_generic_events.0009.desc + theme = christian + override_background = { reference = bedchamber } + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = mental_anguish + outfit_tags = { nightgown } + } + + lower_right_portrait = { + trigger = { exists = scope:comforting_courtier } + character = scope:comforting_courtier + } + + cooldown = { years = 10 } + + trigger = { + has_pam_dlc_trigger = yes + is_available_adult = yes + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + pam_is_clergy_ruler_trigger = yes + num_sinful_traits > 0 + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + has_trait = flagellant + } + modifier = { + add = 0.25 + has_trait = zealous + } + } + + immediate = { + random_character_trait = { + limit = { + root.rite = { + trait_is_sin_rite = prev + } + } + save_scope_as = sinful_trait + } + if = { + limit = { + any_courtier = { + pam_generic_events_0009_comforting_courtier_trigger = yes + } + } + random_courtier = { + limit = { + pam_generic_events_0009_comforting_courtier_trigger = yes + } + save_scope_as = comforting_courtier + } + } + } + + option = { # Already flagellant: scourge yourself + name = pam_generic_events.0009.a + trigger = { has_trait = flagellant } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } + + option = { # Not flagellant: take up the scourge + name = pam_generic_events.0009.b + trigger = { + NOT = { has_trait = flagellant } + } + add_trait = flagellant + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + if = { + limit = { + NOT = { knows_tenet = tenet_mortification_of_the_flesh } + } + add_known_tenet = tenet_mortification_of_the_flesh + } + stress_and_fulfillment_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # Seek refuge in the scriptures + name = pam_generic_events.0009.c + trigger = { learning >= high_skill_rating } + add_scholar_trait_or_xp_effect = { VALUE = 10 } + stress_and_fulfillment_impact = { + base = minor_stress_impact_gain + zealous = minor_stress_impact_loss + diligent = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_zeal = 0.25 + } + modifier = { + factor = 2 + has_trait = lifestyle_scholar + } + } + } + + option = { # Seek refuge in a friend + name = pam_generic_events.0009.d + trigger = { exists = scope:comforting_courtier } + progress_towards_friend_effect = { + CHARACTER = scope:comforting_courtier + REASON = friend_comforted_hell_nightmare_reason + OPINION = default_friend_opinion + } + stress_and_fulfillment_impact = { + base = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.25 + } + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 0 + has_trait = shy + } + } + } + + option = { # Go back to sleep + name = pam_generic_events.0009.e + stress_and_fulfillment_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.25 + } + modifier = { + factor = 2 + has_trait = lazy + } + } + } +} + +# Meet a same-faith ruler hunting while travelling through their holding +scripted_trigger pam_generic_events_0010_hunting_ruler_trigger = { + is_available_ai_adult = yes + faith = root.faith + location = root.location + NOR = { + this = root + has_relation_rival = root + } +} + +pam_generic_events.0010 = { + type = character_event + title = pam_generic_events.0010.t + desc = pam_generic_events.0010.desc + theme = travel + override_background = { reference = terrain } + + left_portrait = { + character = root + animation = contemplating + } + right_portrait = { + character = scope:hunting_ruler + animation = horse_surveying + } + + cooldown = { years = 10 } + + trigger = { + has_pam_dlc_trigger = yes + is_available_travelling_adult = yes + is_location_valid_for_travel_event_on_land = yes + exists = location.province_owner + location.province_owner = { + pam_generic_events_0010_hunting_ruler_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + has_trait = lifestyle_hunter + } + modifier = { + add = 0.25 + has_trait = zealous + } + } + + immediate = { + location = { + province_owner = { save_scope_as = hunting_ruler } + } + } + + option = { # Pop off as a hunter + name = pam_generic_events.0010.a + trigger = { has_trait = lifestyle_hunter } + add_prestige = minor_prestige_gain + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = 10 + } + stress_and_fulfillment_impact = { + lifestyle_hunter = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + } + } + } + + option = { # Praise their hunting + name = pam_generic_events.0010.b + duel = { + skill = diplomacy + target = scope:hunting_ruler + 50 = { + desc = pam_generic_events.0010.b.success + compare_modifier = { + value = { + value = scope:duel_value + add = { + value = "scope:hunting_ruler.opinion(root)" + multiply = 0.25 + } + } + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_generic_events.0010.b.toast.success + left_icon = scope:hunting_ruler + right_icon = root + progress_towards_friend_effect = { + CHARACTER = scope:hunting_ruler + REASON = friend_praised_hunting_reason + OPINION = default_friend_opinion + } + if = { + limit = { + scope:hunting_ruler = { + NOT = { is_vassal_of = root } + highest_held_title_tier >= tier_county + } + } + custom_tooltip = pam_generic_events.0010.b.tt + scope:hunting_ruler = { + set_variable = { + name = pam_praised_hunting_alliance_var + value = root + years = 10 + } + } + } + } + } + 50 = { + desc = pam_generic_events.0010.b.failure + compare_modifier = { + value = { + value = scope:duel_value + add = { + value = "scope:hunting_ruler.opinion(root)" + multiply = 0.25 + } + } + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_generic_events.0010.b.toast.failure + left_icon = scope:hunting_ruler + right_icon = root + scope:hunting_ruler = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + } + } + } + stress_and_fulfillment_impact = { + gregarious = minor_stress_impact_loss + humble = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.25 + } + modifier = { + factor = 2 + has_trait = gregarious + } + } + } + + option = { # Praise God + name = pam_generic_events.0010.c + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # Ask for an escort + name = pam_generic_events.0010.d + trigger = { + current_travel_plan = { + NOT = { has_travel_plan_modifier = travel_guide_modifier } + } + } + current_travel_plan = { + add_travel_plan_modifier = travel_guide_modifier + } + stress_and_fulfillment_impact = { + greedy = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.25 + ai_rationality = 0.25 + } + } + } +} + +# Scold a courtier for their sins +scripted_trigger pam_generic_events_0011_valid_sinner_trigger = { + basic_is_available_ai = yes + age >= 16 + this != root + any_character_trait = { + has_trait_category = personality + NOT = { root = { has_trait = prev } } + root.rite = { trait_is_sin_rite = prev } + } +} + +pam_generic_events.0011 = { + type = character_event + title = pam_generic_events.0011.t + desc = pam_generic_events.0011.desc + theme = christian + override_background = { reference = study } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOR = { + has_trait = calm + has_trait = compassionate + } + } + animation = condemnation + } + animation = disapproval + } + right_portrait = { + character = scope:sinful_courtier + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + } + } + animation = dismissal + } + animation = shame + } + + cooldown = { years = 10 } + + trigger = { + has_pam_dlc_trigger = yes + is_available_adult = yes + OR = { # Someone that'd care + pam_is_clergy_ruler_trigger = yes + has_trait = theologian + has_trait = lifestyle_scholar + has_trait = zealous + } + any_courtier = { pam_generic_events_0011_valid_sinner_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + pam_is_clergy_ruler_trigger = yes + } + modifier = { + add = 0.25 + has_trait = zealous + } + } + + immediate = { + if = { + limit = { + any_child = { pam_generic_events_0011_valid_sinner_trigger = yes } + } + random_child = { + limit = { pam_generic_events_0011_valid_sinner_trigger = yes } + save_scope_as = sinful_courtier + } + } + else_if = { + limit = { + primary_spouse ?= { pam_generic_events_0011_valid_sinner_trigger = yes } + } + primary_spouse = { save_scope_as = sinful_courtier } + } + else_if = { + limit = { + any_close_family_member = { + is_courtier_of = root + pam_generic_events_0011_valid_sinner_trigger = yes + } + } + random_close_family_member = { + limit = { + is_courtier_of = root + pam_generic_events_0011_valid_sinner_trigger = yes + } + save_scope_as = sinful_courtier + } + } + else_if = { + limit = { + any_councillor = { pam_generic_events_0011_valid_sinner_trigger = yes } + } + random_councillor = { + limit = { pam_generic_events_0011_valid_sinner_trigger = yes } + save_scope_as = sinful_courtier + } + } + else_if = { + limit = { + any_court_position_holder = { pam_generic_events_0011_valid_sinner_trigger = yes } + } + random_court_position_holder = { + limit = { pam_generic_events_0011_valid_sinner_trigger = yes } + save_scope_as = sinful_courtier + } + } + else = { + random_courtier = { + limit = { pam_generic_events_0011_valid_sinner_trigger = yes } + save_scope_as = sinful_courtier + } + } + scope:sinful_courtier = { + random_character_trait = { + limit = { + has_trait_category = personality + NOT = { root = { has_trait = prev } } + root.rite = { trait_is_sin_rite = prev } + } + save_scope_as = sinful_trait + } + assign_quirk_effect = yes + } + } + + option = { # High dread: force them to flip + name = pam_generic_events.0011.a + trigger = { dread >= high_dread } + scope:sinful_courtier = { + flip_sinful_trait_effect = yes + stress_and_fulfillment_impact = { + base = major_stress_impact_gain + } + } + progress_towards_rival_effect = { + CHARACTER = scope:sinful_courtier + REASON = rival_called_out_sin + OPINION = default_rival_opinion + } + stress_and_fulfillment_impact = { + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + } + modifier = { + factor = 2 + has_trait = callous + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + option = { # Learning duel: make them understand + name = pam_generic_events.0011.b + duel = { + skill = learning + target = scope:sinful_courtier + 50 = { + desc = pam_generic_events.0011.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_generic_events.0011.b.toast.success + left_icon = scope:sinful_courtier + right_icon = root + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + add_scholar_trait_or_xp_effect = { VALUE = 5 } + scope:sinful_courtier = { + flip_sinful_trait_effect = yes + stress_and_fulfillment_impact = { + base = major_stress_impact_gain + } + } + } + } + 50 = { + desc = pam_generic_events.0011.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_generic_events.0011.b.toast.failure + left_icon = scope:sinful_courtier + right_icon = root + scope:sinful_courtier = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + theologian = minor_stress_impact_loss + diligent = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_zeal = 0.35 + ai_rationality = 0.35 + } + modifier = { + factor = 2 + OR = { + has_trait = lifestyle_scholar + has_trait = theologian + } + } + } + } + + option = { # Diplomacy duel: gently change their ways + name = pam_generic_events.0011.c + duel = { + skill = diplomacy + target = scope:sinful_courtier + 50 = { + desc = pam_generic_events.0011.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_generic_events.0011.c.toast.success + left_icon = scope:sinful_courtier + right_icon = root + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + scope:sinful_courtier = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + } + } + 50 = { + desc = pam_generic_events.0011.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_generic_events.0011.c.toast.failure + left_icon = scope:sinful_courtier + right_icon = root + scope:sinful_courtier = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + } + } + } + stress_and_fulfillment_impact = { + gregarious = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.25 + } + modifier = { + factor = 2 + has_trait = gregarious + } + } + } + + option = { # Actually it's not that bad + name = pam_generic_events.0011.d + scope:sinful_courtier = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + modifier = { + factor = 2 + OR = { + has_trait = cynical + has_trait = forgiving + } + } + modifier = { + factor = 0 + has_trait = zealous + } + } + } +} diff --git a/events/dlc/pam/pam_great_projects_events.txt b/events/dlc/pam/pam_great_projects_events.txt new file mode 100644 index 000000000..6eb60b0c8 --- /dev/null +++ b/events/dlc/pam/pam_great_projects_events.txt @@ -0,0 +1,3310 @@ +namespace = pam_great_projects_events + +########################### — By Laurence Kennedy +## pam_great_projects_events.0001 — Master mason joins court (hidden) +## pam_great_projects_events.0002 — Holy frescoes optional contribution (choose your holy scene) +## pam_great_projects_events.0003 — Stained glass optional contribution (choose your subject matter) +## pam_great_projects_events.0005 — The first stone laid (starting event after mandatory funding is done) +## pam_great_projects_events.0006 — Laid out with divine order (laying out the cathedral and proposing additions) +## pam_great_projects_events.0007 — The heaving ribs of heaven (inspired by the rib vaults) +## pam_great_projects_events.0008 — Casting the voice of God (bellcasting event chain start) +## pam_great_projects_events.0009 — And God spoke (bell cast success) +## pam_great_projects_events.0010 — A herald of doom (bell cast failure) +## pam_great_projects_events.0011 — As if by the Lord's hand (treadwheel crane) +## pam_great_projects_events.0012 — His unfailing love (west portal sermon) +## pam_great_projects_events.0013 — A different voice (cantoria) +## pam_great_projects_events.0020 — The crowning of the spires (completion of the GP) +############################ + +#Send master mason message, this keeps effect out of contribution tooltip +pam_great_projects_events.0001 = { + hidden = yes + immediate = { + send_interface_message = { + type = msg_great_project_reward + title = cathedral_master_mason_joins_title_tt + right_icon = scope:mason + add_courtier = scope:mason + } + } +} + +#Pick frescoes for your cathedral +pam_great_projects_events.0002 = { + type = character_event + title = pam_great_projects_events.0002.t + desc = pam_great_projects_events.0002.desc + left_portrait = { + character = root + animation = prayer_standing_eyes + } + right_portrait = { + trigger = { + exists = scope:religion_buddy + } + character = scope:religion_buddy + animation = page_flipping + camera = camera_event_left_forward + } + override_background = { reference = pam_cathedral_construction } + theme = christian + immediate = { + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + basic_is_available_ai = yes + } + } + cp:councillor_court_chaplain = { + save_scope_as = religion_buddy + } + } + } + + #mystic XP + option = { #option a + trigger = { + #These are triggered this way to avoid crowding option with trait icons + trigger_if = { + limit = { + OR = { + has_trait = lifestyle_mystic + has_trait = theologian + } + } + OR = { + has_trait = lifestyle_mystic + has_trait = theologian + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = possessed + has_trait = lunatic + } + } + OR = { + has_trait = possessed + has_trait = lunatic + } + } + trigger_else = { + OR = { + has_trait = eccentric + has_trait = witch + has_trait = zealous + } + } + } + name = pam_great_projects_events.0002.a + custom_tooltip = pam_great_projects_events.0002.mystic_xp + scope:province = { + set_variable = { + name = cathedral_mystic_xp + } + } + if = { + limit = { has_trait = lifestyle_mystic } + add_trait_xp = { + trait = lifestyle_mystic + value = { + value = lifestyle_mystic_xp_gain_medium_value + multiply = 1.5 + } + } + } + ai_chance = { + base = 500 + } + } + #scholar + option = { #option b + trigger = { + trigger_if = { + limit = { + OR = { + has_trait = lifestyle_scholar + has_trait = shrewd + } + } + OR = { + has_trait = lifestyle_scholar + has_trait = shrewd + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = devoted + has_trait = patient + } + } + OR = { + has_trait = devoted + has_trait = patient + } + } + trigger_else = { + OR = { + has_lifestyle = learning_lifestyle + has_trait = education_learning + } + } + + } + name = pam_great_projects_events.0002.b + custom_tooltip = pam_great_projects_events.0002.scholar_xp + scope:province = { + set_variable = { + name = cathedral_scholar_xp + } + } + if = { + limit = { has_trait = lifestyle_scholar } + add_trait_xp = { + trait = lifestyle_scholar + value = { + value = scholar_xp_gain_minor_value + multiply = 1.5 + } + } + } + ai_chance = { + base = 500 + } + } + #pilgrim XP + option = { #option c + trigger = { + trigger_if = { + limit = { + OR = { + has_trait = pilgrim + has_trait = lifestyle_traveler + } + } + OR = { + has_trait = pilgrim + has_trait = lifestyle_traveler + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = improvident + has_trait = holy_warrior + } + } + OR = { + has_trait = improvident + has_trait = holy_warrior + } + } + trigger_else = { + OR = { + has_trait = diligent + has_lifestyle = wanderer_lifestyle + } + } + } + name = pam_great_projects_events.0002.c + custom_tooltip = pam_great_projects_events.0002.pilgrim_xp + scope:province = { + set_variable = { + name = cathedral_pilgrim_xp + } + } + if = { + limit = { has_trait = pilgrim } + add_trait_xp = { + trait = pilgrim + value = { + value = pilgrim_xp_gain_minor_value + multiply = 1.5 + } + } + } + ai_chance = { + base = 500 + } + } + #piety + option = { #option d + name = pam_great_projects_events.0002.d + custom_tooltip = pam_great_projects_events.0002.piety + scope:province = { + set_variable = { + name = cathedral_piety + } + } + add_piety = { + value = point_of_interest_piety_value + multiply = 2 + } + ai_chance = { + base = 100 + } + } + #learning lifestyle xp gain + option = { #option e + name = pam_great_projects_events.0002.e + custom_tooltip = pam_great_projects_events.0002.learning_xp + scope:province = { + set_variable = { + name = cathedral_learning_xp + } + } + if = { + limit = { has_spiritual_fulfillment_type = christian_fulfillment } + add_poi_learning_experience_effect_minor = yes + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + } + else = { + add_poi_learning_experience_effect = yes + } + ai_chance = { + base = 100 + } + } + + #stress loss + option = { #option f + name = pam_great_projects_events.0002.f + custom_tooltip = pam_great_projects_events.0002.stress_loss + scope:province = { + set_variable = { + name = cathedral_stress_loss + } + } + stress_and_fulfillment_impact = { base = minor_stress_impact_loss } + ai_chance = { + base = 100 + } + } +} + +#Pick stained glass subject for your cathedral contribution +pam_great_projects_events.0003 = { + type = character_event + title = pam_great_projects_events.0003.t + desc = pam_great_projects_events.0003.desc + center_portrait = { + character = scope:religion_buddy + animation = admiration + camera = camera_activity_horse + } + left_portrait = { + character = root + animation = throne_room_conversation_4 + camera = camera_event_center_pointing_right + } + right_portrait = { + character = scope:glazier + animation = personality_bold + camera = camera_event_center_pointing_left + } + override_background = { reference = pam_cathedral_construction } + window = big_event_window + theme = christian + widgets = { + widget = { + gui = event_window_widget_vfx_stained_glass + container = background_shader_vfx_container + } + } + immediate = { + save_scope_as = contributor + #Priest: cathedral owner, else court chaplain if you are owner, else local clergy + if = { + limit = { + root != scope:owner + scope:owner = { + is_alive = yes + } + } + scope:owner = { + save_scope_as = religion_buddy + } + } + else_if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + basic_is_available_ai = yes + } + } + cp:councillor_court_chaplain = { + save_scope_as = religion_buddy + } + } + if = { + limit = { + NOT = { + exists = scope:religion_buddy + } + } + ordered_pool_character = { + province = scope:province + limit = { + is_clergy = yes + faith = scope:province.faith + basic_is_available_ai = yes + NOT = { + this = root + } + } + order_by = primary_title.tier + save_scope_as = religion_buddy + } + } + if = { + limit = { + NOT = { + exists = scope:religion_buddy + } + } + create_character = { + template = priest_character_template + dynasty = none + location = scope:province + culture = scope:province.culture + faith = scope:province.faith + rite = scope:province.rite + save_scope_as = religion_buddy + } + scope:religion_buddy = { + add_character_flag = { + flag = pam_great_projects_fake_priest + days = 10 + } + } + } + #Glazier: skilled local pool character, else temporary workshop hand + ordered_pool_character = { + province = scope:province + limit = { + learning >= high_skill_rating + culture = scope:province.culture + faith = scope:province.faith + is_available_ai_adult = yes + NOT = { + this = root + } + trigger_if = { + limit = { + exists = scope:religion_buddy + } + NOT = { + this = scope:religion_buddy + } + } + } + order_by = learning + save_scope_as = glazier + } + if = { + limit = { + NOT = { + exists = scope:glazier + } + } + create_character = { + template = generic_peasant_character + dynasty = none + location = scope:province + culture = scope:province.culture + faith = scope:province.faith + rite = scope:province.rite + learning = { + min_template_high_skill + max_template_high_skill + } + save_scope_as = glazier + } + scope:glazier = { + add_character_flag = { + flag = pam_great_projects_fake_glazier + days = 10 + } + } + } + character:saint_0001 = { + save_scope_as = blessed_mary + } + } + after = { + scope:glazier ?= { + if = { + limit = { + has_character_flag = pam_great_projects_fake_glazier + } + silent_disappearance_effect = yes + } + } + scope:religion_buddy ?= { + if = { + limit = { + has_character_flag = pam_great_projects_fake_priest + } + silent_disappearance_effect = yes + } + } + } + + #kingship / Tree of Jesse + option = { #option a + trigger = { + #These are triggered this way to avoid crowding option with trait icons + trigger_if = { + limit = { + OR = { + highest_held_title_tier >= tier_kingdom + legitimacy_level <= 3 + } + } + OR = { + highest_held_title_tier >= tier_kingdom + legitimacy_level <= 3 + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = ambitious + has_trait = august + has_trait = born_in_the_purple + } + } + OR = { + has_trait = ambitious + has_trait = august + has_trait = born_in_the_purple + } + } + trigger_else = { + OR = { + has_trait = diplomat + has_lifestyle = diplomacy_lifestyle + has_trait = education_diplomacy_4 + } + } + } + name = pam_great_projects_events.0003.a + flavor = pam_great_projects_events.0003.a.flavor + custom_tooltip = pam_great_projects_events.0003.a.tt + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + scope:province = { + set_variable = { + name = cathedral_glass_tree_of_jesse + } + } + if = { + limit = { exists = dynasty } + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + } + ai_chance = { + base = 500 + } + } + #donor portrait / dynasty + option = { #option b + trigger = { + dynasty ?= { + #These are triggered this way to avoid crowding option with trait icons + trigger_if = { + limit = { + root = { + OR = { + has_trait = arrogant + has_trait = gregarious + has_trait = lustful + } + } + } + root = { + OR = { + has_trait = arrogant + has_trait = gregarious + has_trait = lustful + } + } + } + trigger_else_if = { + limit = { + OR = { + dynasty_prestige_level >= 2 + root = { + is_dynast = yes + } + root = { + has_trait = family_first + } + } + } + OR = { + dynasty_prestige_level >= 2 + root = { + is_dynast = yes + } + root = { + has_trait = family_first + } + } + } + trigger_else = { + OR = { + root = { + has_trait = generous + } + dynasty_prestige_level >= 1 + } + } + } + } + name = pam_great_projects_events.0003.b + custom_tooltip = pam_great_projects_events.0003.b.tt + scope:province = { + set_variable = { + name = cathedral_glass_dynasty + } + } + add_prestige = minor_prestige_gain + ai_chance = { + base = 500 + } + } + #pilgrim miracles + option = { #option c + trigger = { + #These are triggered this way to avoid crowding option with trait icons + trigger_if = { + limit = { + OR = { + has_trait = pilgrim + } + } + OR = { + has_trait = pilgrim + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = improvident + has_trait = holy_warrior + } + } + OR = { + has_trait = improvident + has_trait = holy_warrior + } + } + trigger_else = { + OR = { + has_trait = diligent + has_trait = fickle + } + } + } + name = pam_great_projects_events.0003.c + custom_tooltip = pam_great_projects_events.0003.c.tt + scope:province = { + set_variable = { + name = cathedral_glass_pilgrim + } + } + if = { + limit = { has_trait = pilgrim } + add_trait_xp = { + trait = pilgrim + value = { + value = pilgrim_xp_gain_minor_value + multiply = 2 + } + } + add_piety = minor_piety_gain + } + ai_chance = { + base = 500 + } + } + #Marian light + option = { #option d + trigger = { + trigger_if = { + limit = { + OR = { + rite = { + rite_has_tenet = tenet_dulia + } + has_personal_tenet = tenet_dulia + } + } + OR = { + rite = { + rite_has_tenet = tenet_dulia + } + has_personal_tenet = tenet_dulia + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = devoted + has_trait = humble + } + } + OR = { + has_trait = devoted + has_trait = humble + } + } + trigger_else = { + OR = { + has_trait = temperate + piety_level >= 4 + } + } + } + name = pam_great_projects_events.0003.d + flavor = pam_great_projects_events.0003.d.flavor + custom_tooltip = pam_great_projects_events.0003.d.tt + custom_tooltip = pam_great_projects_events.0003.d.dulia.tt + scope:province = { + set_variable = { + name = cathedral_glass_marian_light + } + } + stress_and_fulfillment_impact = { base = minor_stress_impact_loss } + if = { + limit = { has_spiritual_fulfillment_type = christian_fulfillment } + if = { + limit = { has_personal_tenet = tenet_dulia } + change_spiritual_fulfillment = major_spiritual_fulfillment_value + } + else = { + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + } + } + ai_chance = { + base = 100 + } + } + #martyrdom cycle + option = { + trigger = { + #These are triggered this way to avoid crowding option with trait icons + trigger_if = { + limit = { + has_trait = zealous + } + has_trait = zealous + } + trigger_else_if = { + limit = { + OR = { + has_trait = brave + has_trait = stubborn + has_trait = contrite + } + } + OR = { + has_trait = brave + has_trait = stubborn + has_trait = contrite + } + } + trigger_else = { + has_trait = theologian + } + } + name = pam_great_projects_events.0003.e + custom_tooltip = pam_great_projects_events.0003.e.tt + scope:province = { + set_variable = { + name = cathedral_glass_martyrdom + } + } + if = { + limit = { + has_trait = zealous + has_spiritual_fulfillment_type = christian_fulfillment + } + add_piety = major_piety_gain + stress_and_fulfillment_impact = { base = minor_stress_impact_loss } + } + scope:owner ?= { + if = { + limit = { + this != root + } + send_interface_message = { + type = msg_great_project_reward + title = pam_great_projects_events.0003.e.owner_msg.title + desc = pam_great_projects_events.0003.e.owner_msg.desc + right_icon = scope:contributor + add_piety = medium_piety_gain + if = { + limit = { + has_spiritual_fulfillment_type = christian_fulfillment + } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + } + } + } + else = { + add_piety = medium_piety_gain + if = { + limit = { + has_spiritual_fulfillment_type = christian_fulfillment + } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = 200 + } + } + } +} + +# Building types are not event scopes, so the great project is saved for [cathedral_building.GetName] +scripted_effect pam_cathedral_save_finished_building_scope_effect = { + if = { + limit = { exists = scope:great_project } + scope:great_project = { + save_scope_as = cathedral_building + } + } + else = { + random_great_project = { + limit = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + OR = { + great_project_founder = root + great_project_owner = root + } + } + save_scope_as = great_project + save_scope_as = cathedral_building + } + } +} + +#Cathedral funded (starting event) +pam_great_projects_events.0005 = { + type = character_event + title = pam_great_projects_events.0005.t + desc = { + desc = pam_great_projects_events.0005.desc.intro + triggered_desc = { + trigger = { + exists = scope:optional_contributor + } + desc = pam_great_projects_events.0005.desc.contributor + } + desc = pam_great_projects_events.0005.desc.outro + } + center_portrait = { + character = scope:owner + animation = preaching + } + left_portrait = { + trigger = { + exists = scope:founder_not_owner + } + character = scope:founder_not_owner + animation = prayer_standing_eyes + camera = camera_event_center_pointing_right + } + right_portrait = { + trigger = { + exists = scope:contributor_or_realm_priest + scope:contributor_or_realm_priest != scope:owner + } + character = scope:contributor_or_realm_priest + animation = steward + camera = camera_event_center_pointing_left + } + override_background = { + reference = terrain_scope + } + window = big_event_window + theme = christian + immediate = { + play_music_cue = mx_cue_deus_hoc_vult + pam_cathedral_save_finished_building_scope_effect = yes + scope:province = { save_scope_as = background_terrain_scope } + scope:founder = { + if = { + limit = { + scope:owner != scope:founder + } + save_scope_as = founder_not_owner + } + } + if = { + limit = { + NOT = { + exists = scope:founder_not_owner + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + basic_is_available_ai = yes + } + } + cp:councillor_court_chaplain = { + save_scope_as = founder_not_owner + } + } + scope:great_project = { + every_contribution = { + limit = { + contribution_is_funded = yes + } + save_scope_as = contribution + contributor ?= { + if = { + limit = { + this != scope:owner + this != scope:founder + # The chaplain can stand in as founder_not_owner and also have funded a contribution; keep the portraits distinct + trigger_if = { + limit = { exists = scope:founder_not_owner } + this != scope:founder_not_owner + } + } + save_scope_as = optional_contributor + } + } + } + } + if = { + limit = { + exists = scope:optional_contributor + scope:optional_contributor != scope:owner + } + scope:optional_contributor = { + save_scope_as = contributor_or_realm_priest + } + } + else_if = { + limit = { + NOT = { + exists = scope:optional_contributor + } + exists = scope:founder_not_owner + scope:founder_not_owner != cp:councillor_court_chaplain + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + basic_is_available_ai = yes + } + cp:councillor_court_chaplain != scope:owner + } + cp:councillor_court_chaplain = { + save_scope_as = contributor_or_realm_priest + } + } + } + + #Option a) + option = { + name = pam_great_projects_events.0005.a + if = { + limit = { + root = scope:founder + } + trigger_event = { + id = pam_great_projects_events.0006 + days = 2 + } + } + } +} + +#Ongoing Cathedral Construction Events + +# Finds an architect type person to accompany you during cathedral construction events +scripted_effect pam_cathedral_save_architect_scope_effect = { + if = { + limit = { + employs_court_position = royal_architect_court_position + any_court_position_holder = { + type = royal_architect_court_position + } + } + random_court_position_holder = { + type = royal_architect_court_position + save_scope_as = architect + } + } + else_if = { + limit = { + exists = cp:councillor_steward + cp:councillor_steward = { + basic_is_available_ai = yes + } + } + cp:councillor_steward = { + save_scope_as = architect + } + } + else_if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + basic_is_available_ai = yes + } + } + cp:councillor_court_chaplain = { + save_scope_as = architect + } + } + else = { + ordered_courtier = { + limit = { + would_be_valid_for_court_position = { + employer = root + court_position = royal_architect_court_position + } + } + order_by = aptitude:royal_architect_court_position + save_scope_as = architect + } + } +} +scripted_trigger pam_cathedral_has_architect_character_trigger = { + OR = { + AND = { + employs_court_position = royal_architect_court_position + any_court_position_holder = { + type = royal_architect_court_position + } + } + AND = { + exists = cp:councillor_steward + cp:councillor_steward = { + basic_is_available_ai = yes + } + } + AND = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + basic_is_available_ai = yes + } + } + any_courtier = { + would_be_valid_for_court_position = { + employer = root + court_position = royal_architect_court_position + } + } + } +} +scripted_effect pam_cathedral_disappear_spare_event_npc_effect = { + $CHARACTER$ = { + if = { + limit = { + is_alive = yes + is_imprisoned = no + NOT = { + is_courtier_of = root + } + } + silent_disappearance_effect = yes + } + } +} +scripted_effect pam_cathedral_save_owner_scope_effect = { + if = { + limit = { + NOT = { + exists = scope:owner + } + } + random_great_project = { + limit = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + } + great_project_owner = { + save_scope_as = owner + } + } + } +} +#Cathedral Layout and building options +pam_great_projects_events.0006 = { + type = character_event + title = pam_great_projects_events.0006.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = pam_great_projects_events.0006.desc.intro_architect + } + desc = pam_great_projects_events.0006.desc.intro_no_architect + } + desc = pam_great_projects_events.0006.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:architect + stewardship >= scope:architect.stewardship + } + desc = pam_great_projects_events.0006.desc.steward_founder + } + triggered_desc = { + trigger = { + exists = scope:architect + scope:architect.stewardship > stewardship + } + desc = pam_great_projects_events.0006.desc.steward_architect + } + } + + triggered_desc = { + trigger = { + exists = scope:architect + scope:architect.stewardship > stewardship + } + desc = pam_great_projects_events.0006.desc.architect_explanation + } + desc = pam_great_projects_events.0006.desc.foundations + } + left_portrait = { + character = root + animation = survey + camera = camera_body_right + } + right_portrait = { + trigger = { + exists = scope:architect + } + character = scope:architect + animation = pointing + camera = camera_event_left_to_the_left_pointing_in + } + #show the owner/archbishop if he is not in the other portraits + lower_center_portrait = { + trigger = { + exists = scope:owner + scope:owner != root + trigger_if = { + limit = { + exists = scope:architect + } + scope:owner != scope:architect + } + } + character = scope:owner + animation = personality_honorable + } + override_background = { + reference = terrain_scope + } + window = big_event_window + theme = christian + immediate = { + scope:province = { save_scope_as = background_terrain_scope } + pam_cathedral_save_owner_scope_effect = yes + pam_cathedral_save_architect_scope_effect = yes + } + #Option a) + option = { + name = pam_great_projects_events.0006.a + trigger = { + root = scope:founder + scope:owner = { + domicile ?= { + is_domicile_type = ecclesiastical_domicile + domicile_building_has_free_internal_slot = ecclesiastical_domicile_main_01 + NOT = { has_domicile_building_or_higher = cathedral_crypt_01 } + # This option adds the crypt, so hide it when the cathedral has no room + domicile_building_has_free_internal_slot = cathedral_crypt_01 + } + } + } + custom_tooltip = pam_great_projects_events.0006.a.tt + scope:owner = { + domicile = { + add_domicile_building = cathedral_crypt_01 + } + } + if = { + limit = { + scope:owner != scope:founder + } + scope:founder = { + add_character_modifier = { + modifier = pam_cathedral_founder_crypt_modifier + years = 5 + } + } + } + ai_chance = { + base = 100 + modifier = { + add = 150 + government_has_flag = government_is_ecclesiastical + } + } + } + #Option b) + option = { + name = pam_great_projects_events.0006.b + custom_tooltip = pam_great_projects_events.0006.b.tt + scope:province = { + set_variable = { + name = cathedral_pilgrim_xp + } + set_variable = { + name = cathedral_extended_nave + } + } + ai_chance = { + base = 100 + modifier = { + add = 200 + OR = { + has_trait = pilgrim + has_trait = zealous + } + } + } + } + #Option c) + option = { + name = pam_great_projects_events.0006.c + add_piety = medium_piety_gain + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 50 + } + } +} + +#Ongoing Cathedral Building Events + +#Cathedral Rib vault construction +pam_great_projects_events.0007 = { + type = character_event + title = pam_great_projects_events.0007.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = pam_great_projects_events.0007.desc.intro_architect + } + desc = pam_great_projects_events.0007.desc.intro_no_architect + } + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = pam_great_projects_events.0007.desc.architect + } + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = pam_great_projects_events.0007.desc.architect_says + } + desc = pam_great_projects_events.0007.desc.outro + } + left_portrait = { + character = root + animation = throne_room_conversation_4 + camera = camera_body_right + } + right_portrait = { + trigger = { + exists = scope:architect + } + character = scope:architect + animation = admiration + camera = camera_body_left + } + override_background = { reference = pam_cathedral_construction } + window = big_event_window + theme = christian + trigger = { + any_great_project = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + NOT = { + has_variable = early_construction_event + } + } + } + } + immediate = { + save_scope_as = founder + random_great_project = { + limit = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + NOT = { + has_variable = early_construction_event + } + } + } + great_project_location ?= { + save_scope_as = province + set_variable = { + name = early_construction_event + } + } + } + pam_cathedral_save_architect_scope_effect = yes + } + #Option a) + option = { + name = pam_great_projects_events.0007.a + custom_tooltip = pam_great_projects_events.0007.a.tt + stress_and_fulfillment_impact = { + lifestyle_mystic = minor_stress_impact_loss + zealous = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + content = minor_stress_impact_gain + } + add_learning_lifestyle_xp = minor_lifestyle_xp + scope:province = { + set_variable = { + name = cathedral_mystic_xp + } + set_variable = { + name = cathedral_stars_vault + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = content + } + modifier = { + add = 150 + OR = { + has_trait = lifestyle_mystic + has_trait = zealous + } + } + modifier = { + add = 100 + has_trait = ambitious + } + } + } + #Option b) + option = { + name = pam_great_projects_events.0007.b + stress_and_fulfillment_impact = { + theologian = minor_stress_impact_loss + zealous = minor_stress_impact_loss + humble = minor_stress_impact_loss + content = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + faith = { + change_fervor = { + value = trivial_fervor_value + desc = fervor_gain_cathedral_jonah_sermon + } + } + + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = ambitious + } + } + modifier = { + add = 200 + OR = { + has_trait = theologian + has_trait = zealous + } + } + modifier = { + add = 100 + OR = { + has_trait = humble + has_trait = content + } + } + } + } + #Option c) + option = { + name = pam_great_projects_events.0007.c + add_piety = medium_piety_gain + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 50 + } + } +} + +#duel for option outcome of pam_great_projects_events.0008 +scripted_effect pam_cathedral_bell_casting_resolution_effect = { + scope:bell_maker_son = { + duel = { + skill = learning + value = high_skill_rating + localization = pam_cathedral_bell_casting_duel + 75 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + min = -74 + max = 15 + } + custom_tooltip = { + text = pam_great_projects_events.0008.duel.success + trigger_event = { + id = pam_great_projects_events.0009 + days = { 5 10 } + } + } + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + min = -24 + } + custom_tooltip = { + text = pam_great_projects_events.0008.duel.failure + trigger_event = { + id = pam_great_projects_events.0010 + days = { 5 10 } + } + } + } + } + } +} +#Cathedral Belltower construction +pam_great_projects_events.0008 = { + type = character_event + title = pam_great_projects_events.0008.t + desc = { + desc = pam_great_projects_events.0008.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = pam_great_projects_events.0008.desc.architect + } + desc = pam_great_projects_events.0008.desc.no_architect + } + desc = pam_great_projects_events.0008.desc.need_bell + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = cathedral_bell_tragedy_version + exists = scope:epidemic + } + desc = pam_great_projects_events.0008.desc.plague_named + } + triggered_desc = { + trigger = { + has_character_flag = cathedral_bell_tragedy_version + } + desc = pam_great_projects_events.0008.desc.plague_generic + } + desc = pam_great_projects_events.0008.desc.ordinary_body + } + triggered_desc = { + trigger = { + has_character_flag = cathedral_bell_tragedy_version + } + desc = pam_great_projects_events.0008.desc.outro + } + } + center_portrait = { + trigger = { + exists = scope:architect + } + character = scope:architect + animation = debating + camera = camera_activity_horse + } + left_portrait = { + character = root + animation = throne_room_conversation_4 + camera = camera_event_center_pointing_right + } + right_portrait = { + trigger = { + exists = scope:bell_maker_son + } + character = scope:bell_maker_son + animation = personality_bold + camera = camera_event_center_pointing_left + } + #show the owner/archbishop if he is not in the other portraits + lower_center_portrait = { + trigger = { + exists = scope:owner + scope:owner != root + trigger_if = { + limit = { + exists = scope:architect + } + scope:owner != scope:architect + } + trigger_if = { + limit = { + exists = scope:bell_maker_son + } + scope:owner != scope:bell_maker_son + } + } + character = scope:owner + animation = personality_honorable + } + override_background = { reference = pam_cathedral_construction } + window = big_event_window + theme = christian + trigger = { + any_great_project = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + NOT = { + has_variable = cathedral_bell_casting_event + } + } + great_project_owner = { + domicile ?= { + is_domicile_type = ecclesiastical_domicile + has_domicile_building_or_higher = ecclesiastical_domicile_main_01 + NOT = { has_domicile_building_or_higher = cathedral_belltower_01 } + # Every option here ends in a belltower, so don't offer the event with the cathedral full + domicile_building_has_free_internal_slot = cathedral_belltower_01 + } + } + } + } + immediate = { + save_scope_as = founder + random_great_project = { + limit = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + NOT = { + has_variable = cathedral_bell_casting_event + } + } + great_project_owner = { + domicile ?= { + is_domicile_type = ecclesiastical_domicile + has_domicile_building_or_higher = ecclesiastical_domicile_main_01 + NOT = { has_domicile_building_or_higher = cathedral_belltower_01 } + domicile_building_has_free_internal_slot = cathedral_belltower_01 + } + } + } + great_project_owner = { + save_scope_as = owner + } + great_project_location ?= { + save_scope_as = province + set_variable = { + name = cathedral_bell_casting_event + } + if = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic + } + } + } + save_scope_as = great_project + } + pam_cathedral_save_finished_building_scope_effect = yes + pam_cathedral_save_architect_scope_effect = yes + #find a bell_marker's son + ordered_pool_character = { + province = scope:province + limit = { + is_male = yes + age >= 14 + age <= 22 + learning >= high_skill_rating + culture = scope:province.culture + faith = scope:province.faith + is_available_ai_adult = yes + } + order_by = learning + save_scope_as = bell_maker_son + } + #make one if there is none to be found in the pool + if = { + limit = { + NOT = { + exists = scope:bell_maker_son + } + } + create_character = { + template = generic_peasant_character + age = { 14 22 } + gender = male + location = scope:province + culture = scope:province.culture + faith = scope:province.faith + rite = scope:province.rite + learning = { + min_template_high_skill + max_template_high_skill + } + save_scope_as = bell_maker_son + } + } + #80/20 tragedy vs ordinary craftsman framing; only the tragedy path spends the deceased-father story + random_list = { + 80 = {} + 20 = { + add_character_flag = { + flag = cathedral_bell_tragedy_version + days = 90 + } + } + } + } + + #Option aa) sadistic, whip his flesh off if he fails + option = { + name = pam_great_projects_events.0008.aa + trigger = { + has_trait = sadistic + } + trait = sadistic + custom_tooltip = pam_great_projects_events.0008.belltower_may.tt + add_dread = medium_dread_gain + add_intrigue_lifestyle_xp = minor_lifestyle_xp + stress_and_fulfillment_impact = { + sadistic = medium_stress_impact_loss + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + add_character_flag = { + flag = pam_cathedral_bell_dread_path + days = 90 + } + add_character_flag = { + flag = pam_cathedral_bell_flay_path + days = 90 + } + pam_cathedral_bell_casting_resolution_effect = yes + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + } + } + } + } + #Option a) kill him if he fails + option = { + name = pam_great_projects_events.0008.a + trigger = { + NOT = { + has_trait = sadistic + } + } + custom_tooltip = pam_great_projects_events.0008.a.tt + custom_tooltip = pam_great_projects_events.0008.belltower_may.tt + add_dread = medium_dread_gain + stress_and_fulfillment_impact = { + callous = minor_stress_impact_loss + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + add_character_flag = { + flag = pam_cathedral_bell_dread_path + days = 90 + } + pam_cathedral_bell_casting_resolution_effect = yes + ai_chance = { + base = 25 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + has_trait = honest + has_trait = forgiving + } + } + modifier = { + add = 150 + has_trait = callous + } + } + } + #Option b) + option = { + name = pam_great_projects_events.0008.b + custom_tooltip = pam_great_projects_events.0008.b.tt + custom_tooltip = pam_great_projects_events.0008.belltower_may.tt + flavor = pam_great_projects_events.0008.b.flavor + add_piety = massive_piety_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + humble = minor_stress_impact_loss + cynical = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + add_character_flag = { + flag = pam_cathedral_bell_faith_path + days = 90 + } + pam_cathedral_bell_casting_resolution_effect = yes + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + } + } + modifier = { + add = 200 + OR = { + has_trait = zealous + has_trait = humble + } + } + } + } + #Option c) + option = { + name = pam_great_projects_events.0008.c + trigger = { + scope:owner.domicile = { + domicile_building_has_free_internal_slot = ecclesiastical_domicile_main_01 + } + } + scope:owner = { + domicile = { + add_domicile_building = cathedral_belltower_01 + } + } + hidden_effect = { + pam_cathedral_disappear_spare_event_npc_effect = { CHARACTER = scope:bell_maker_son } + } + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 75 + modifier = { + add = 100 + has_trait = cynical + } + } + } +} + +#Cathedral bell successfully cast +pam_great_projects_events.0009 = { + type = character_event + title = pam_great_projects_events.0009.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = pam_great_projects_events.0009.desc.body.architect + } + desc = pam_great_projects_events.0009.desc.body + } + desc = pam_great_projects_events.0009.desc.success_end + } + center_portrait = { + trigger = { + exists = scope:architect + } + character = scope:architect + animation = admiration + } + left_portrait = { + character = root + animation = happiness + camera = camera_body_right + } + right_portrait = { + trigger = { + exists = scope:bell_maker_son + } + character = scope:bell_maker_son + animation = divine_ecstasy + camera = camera_body_left + } + override_background = { reference = pam_cathedral_construction } + window = big_event_window + theme = christian + trigger = { + exists = scope:bell_maker_son + scope:bell_maker_son = { + is_alive = yes + } + any_great_project = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + has_variable = cathedral_bell_casting_event + } + } + scope:owner.domicile = { + domicile_building_has_free_internal_slot = ecclesiastical_domicile_main_01 + } + } + immediate = { + pam_cathedral_save_architect_scope_effect = yes + } + after = { + remove_character_flag = pam_cathedral_bell_dread_path + remove_character_flag = pam_cathedral_bell_flay_path + remove_character_flag = pam_cathedral_bell_faith_path + pam_cathedral_disappear_spare_event_npc_effect = { CHARACTER = scope:bell_maker_son } + } + option = { + name = pam_great_projects_events.0009.a + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + add_stress = medium_stress_loss + scope:owner = { + domicile = { + add_domicile_building = cathedral_belltower_02 + } + } + + ai_chance = { + base = 100 + } + } +} + +#Cathedral bell casting failed +pam_great_projects_events.0010 = { + type = character_event + title = pam_great_projects_events.0010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = pam_great_projects_events.0009.desc.body.architect + } + desc = pam_great_projects_events.0009.desc.body + } + desc = pam_great_projects_events.0010.desc.failure_end + } + center_portrait = { + trigger = { + exists = scope:architect + } + character = scope:architect + animation = worry + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_character_flag = pam_cathedral_bell_flay_path + } + animation = whipping + } + triggered_animation = { + trigger = { + has_character_flag = pam_cathedral_bell_dread_path + NOT = { + has_character_flag = pam_cathedral_bell_flay_path + } + } + animation = chudan_no_kamae + } + animation = disgust + camera = camera_body_right + } + right_portrait = { + trigger = { + exists = scope:bell_maker_son + } + character = scope:bell_maker_son + animation = fear + camera = camera_body_left + } + override_background = { reference = pam_cathedral_construction } + window = big_event_window + theme = christian + trigger = { + exists = scope:bell_maker_son + scope:bell_maker_son = { + is_alive = yes + } + any_great_project = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + has_variable = cathedral_bell_casting_event + } + } + } + immediate = { + pam_cathedral_save_architect_scope_effect = yes + } + after = { + remove_character_flag = pam_cathedral_bell_dread_path + remove_character_flag = pam_cathedral_bell_flay_path + remove_character_flag = pam_cathedral_bell_faith_path + pam_cathedral_disappear_spare_event_npc_effect = { CHARACTER = scope:bell_maker_son } + } + #Option a) kill the boy + option = { + name = pam_great_projects_events.0010.a + trigger = { + has_character_flag = pam_cathedral_bell_dread_path + } + if = { + limit = { + has_character_flag = pam_cathedral_bell_flay_path + } + scope:bell_maker_son = { + death = { + killer = root + death_reason = death_torture + } + } + } + else = { + scope:bell_maker_son = { + death = { + killer = root + death_reason = death_execution + } + } + } + add_dread = major_dread_gain + stress_and_fulfillment_impact = { + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + add = 150 + has_trait = sadistic + } + } + } + #Option b) spare the boy + option = { + name = { + trigger = { + has_character_flag = pam_cathedral_bell_faith_path + } + text = pam_great_projects_events.0010.b.faith + } + name = pam_great_projects_events.0010.b + show_as_tooltip = { + add_courtier = scope:bell_maker_son + } + hidden_effect = { + if = { + limit = { + scope:bell_maker_son = { + NOT = { + is_courtier_of = root + } + } + } + add_courtier = scope:bell_maker_son + } + } + if = { + limit = { + exists = capital_county + } + capital_county = { + add_county_modifier = { + modifier = pam_cathedral_bell_cracked_lesson_modifier + years = 10 + } + } + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + just = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 200 + has_trait = compassionate + } + } + } + #Option c) bronze torture device + option = { + name = pam_great_projects_events.0010.c + trigger = { + has_character_flag = pam_cathedral_bell_dread_path + } + custom_tooltip = pam_great_projects_events.0010.c.tt + if = { + limit = { + OR = { + has_perk = dreadful_perk + has_character_flag = pam_cathedral_bell_dreadful_perk_reward + } + } + custom_tooltip = pam_great_projects_events.0010.c.intrigue_xp.tt + } + scope:bell_maker_son = { + death = { + killer = root + death_reason = death_torture + } + } + add_dread = massive_dread_gain + add_tyranny = medium_tyranny_gain + if = { + limit = { + NOT = { + has_perk = dreadful_perk + } + NOT = { + has_character_flag = pam_cathedral_bell_dreadful_perk_reward + } + } + add_perk = dreadful_perk + add_character_flag = pam_cathedral_bell_dreadful_perk_reward + } + else = { + add_intrigue_lifestyle_xp = major_lifestyle_xp + } + add_character_modifier = { + modifier = pam_cathedral_bell_bronze_torture_implements_modifier + years = 10 + } + stress_and_fulfillment_impact = { + sadistic = medium_stress_impact_loss + torturer = medium_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + add = 150 + OR = { + has_trait = sadistic + has_trait = torturer + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = honest + has_trait = forgiving + } + } + } + } + #Option d) faith path + option = { + name = pam_great_projects_events.0010.d + trigger = { + has_character_flag = pam_cathedral_bell_faith_path + } + add_piety = medium_piety_gain + add_stress = medium_stress_loss + stress_and_fulfillment_impact = { + zealous = medium_stress_impact_loss + humble = medium_stress_impact_loss + cynical = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + } + } + modifier = { + add = 200 + OR = { + has_trait = zealous + has_trait = humble + } + } + } + } +} + +#Cathedral Treadwheel Crane +pam_great_projects_events.0011 = { + type = character_event + title = pam_great_projects_events.0011.t + desc = { + desc = pam_great_projects_events.0011.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = pam_great_projects_events.0011.desc.architect + } + desc = pam_great_projects_events.0011.desc.no_architect + } + desc = pam_great_projects_events.0011.desc.outro + } + left_portrait = { + character = root + animation = survey + camera = camera_body_right + } + right_portrait = { + trigger = { + exists = scope:architect + } + character = scope:architect + animation = pointing + camera = camera_event_center_away_pointing_left_fov25 + } + override_background = { reference = pam_cathedral_construction } + window = big_event_window + theme = christian + trigger = { + any_great_project = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + NOT = { + has_variable = cathedral_treadwheel_crane_event + } + } + } + } + immediate = { + save_scope_as = founder + random_great_project = { + limit = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + NOT = { + has_variable = cathedral_treadwheel_crane_event + } + } + } + save_scope_as = great_project + great_project_location ?= { + save_scope_as = province + set_variable = { + name = cathedral_treadwheel_crane_event + } + } + } + pam_cathedral_save_finished_building_scope_effect = yes + pam_cathedral_save_architect_scope_effect = yes + if = { + limit = { + exists = capital_county + } + capital_county = { + save_scope_as = capital_county + } + } + } + option = { + name = pam_great_projects_events.0011.a + custom_tooltip = pam_great_projects_events.0011.a.tt + add_learning_lifestyle_xp = minor_lifestyle_xp + culture = { + add_fascination_progress = pam_cathedral_treadwheel_fascination_progress_value + } + stress_and_fulfillment_impact = { + architect = minor_stress_impact_loss + diligent = minor_stress_impact_loss + patient = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + add = 150 + OR = { + has_trait = architect + has_trait = diligent + } + } + modifier = { + add = 100 + learning >= high_skill_rating + } + } + } + option = { + name = pam_great_projects_events.0011.b + trigger = { + exists = scope:capital_county + } + add_stewardship_lifestyle_xp = minor_lifestyle_xp + scope:capital_county = { + add_county_modifier = { + modifier = pam_cathedral_treadwheel_crane_modifier + years = 10 + } + } + stress_and_fulfillment_impact = { + ambitious = minor_stress_impact_loss + greedy = minor_stress_impact_loss + content = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 150 + stewardship >= high_skill_rating + } + modifier = { + add = 100 + has_trait = ambitious + } + modifier = { + factor = 0 + has_trait = content + } + } + } + option = { + name = pam_great_projects_events.0011.c + add_piety = medium_piety_gain + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 50 + } + } +} + +#Cathedral cantoria / singing loft +pam_great_projects_events.0013 = { + type = character_event + title = pam_great_projects_events.0013.t + desc = pam_great_projects_events.0013.desc + + left_portrait = { + character = root + animation = throne_room_conversation_4 + camera = camera_event_center_pointing_right + } + center_portrait = { + character = scope:architect + animation = ecstasy + camera = camera_activity_horse + } + right_portrait = { + character = scope:choir_boy + animation = personality_bold + camera = camera_event_center_pointing_left + } + override_background = { + trigger = { + scope:great_project ?= { + OR = { + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + } + } + reference = pam_gothic_cathedral_interior + } + override_background = { reference = pam_romanesque_church_interior } + window = big_event_window + theme = christian + trigger = { + pam_cathedral_has_architect_character_trigger = yes + any_great_project = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + NOT = { + has_variable = cathedral_cantoria_event + } + } + great_project_owner = { + domicile ?= { + is_domicile_type = ecclesiastical_domicile + has_domicile_building_or_higher = ecclesiastical_domicile_main_01 + NOT = { has_domicile_building_or_higher = cathedral_cantoria_01 } + # The only option here adds the cantoria, so don't offer it with the cathedral full + domicile_building_has_free_internal_slot = cathedral_cantoria_01 + } + } + } + } + immediate = { + save_scope_as = founder + random_great_project = { + limit = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_founder = root + great_project_location ?= { + NOT = { + has_variable = cathedral_cantoria_event + } + } + great_project_owner = { + domicile ?= { + is_domicile_type = ecclesiastical_domicile + has_domicile_building_or_higher = ecclesiastical_domicile_main_01 + NOT = { has_domicile_building_or_higher = cathedral_cantoria_01 } + domicile_building_has_free_internal_slot = cathedral_cantoria_01 + } + } + } + save_scope_as = great_project + great_project_owner = { + save_scope_as = owner + } + great_project_location ?= { + save_scope_as = province + set_variable = { + name = cathedral_cantoria_event + } + } + } + pam_cathedral_save_architect_scope_effect = yes + #find a choir boy; family_castration cultures bias young enough for the castrato option to be valid + if = { + limit = { + culture = { has_cultural_parameter = family_castration } + } + ordered_pool_character = { + province = scope:province + limit = { + is_male = yes + age >= 8 + age <= 11 + diplomacy >= high_skill_rating + culture = scope:province.culture + faith = scope:province.faith + basic_is_available_ai = yes + } + order_by = diplomacy + save_scope_as = choir_boy + } + } + if = { + limit = { + NOT = { exists = scope:choir_boy } + } + ordered_pool_character = { + province = scope:province + limit = { + is_male = yes + age >= 8 + age <= 14 + diplomacy >= high_skill_rating + culture = scope:province.culture + faith = scope:province.faith + basic_is_available_ai = yes + } + order_by = diplomacy + save_scope_as = choir_boy + } + } + #make one if there is none to be found in the pool + if = { + limit = { + NOT = { exists = scope:choir_boy } + } + if = { + limit = { + culture = { has_cultural_parameter = family_castration } + } + create_character = { + template = generic_peasant_character + age = { 8 11 } + gender = male + location = scope:province + culture = scope:province.culture + faith = scope:province.faith + rite = scope:province.rite + trait = beauty_good_2 + diplomacy = { + min_template_high_skill + max_template_high_skill + } + learning = { + min_template_high_skill + max_template_high_skill + } + save_scope_as = choir_boy + } + } + else = { + create_character = { + template = generic_peasant_character + age = { 8 14 } + gender = male + location = scope:province + culture = scope:province.culture + faith = scope:province.faith + rite = scope:province.rite + trait = beauty_good_2 + diplomacy = { + min_template_high_skill + max_template_high_skill + } + learning = { + min_template_high_skill + max_template_high_skill + } + save_scope_as = choir_boy + } + } + } + } + option = { + name = pam_great_projects_events.0013.a + trigger = { + scope:owner.domicile = { + domicile_building_has_free_internal_slot = ecclesiastical_domicile_main_01 + } + } + scope:owner = { + domicile = { + add_domicile_building = cathedral_cantoria_01 + } + } + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + add = 150 + OR = { + has_trait = zealous + has_trait = ambitious + } + } + } + } + option = { + name = pam_great_projects_events.0013.b + show_as_tooltip = { + add_courtier = scope:choir_boy + } + hidden_effect = { + add_courtier = scope:choir_boy + } + if = { + limit = { + has_royal_court = yes + } + change_current_court_grandeur = minor_court_grandeur_gain + } + add_prestige = minor_prestige_gain + add_character_modifier = { + modifier = pam_cathedral_famed_choir_boy_modifier + years = 10 + } + stress_and_fulfillment_impact = { + gregarious = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 75 + modifier = { + add = 150 + OR = { + has_trait = gregarious + has_trait = ambitious + } + } + modifier = { + factor = 0 + has_trait = shy + } + } + } + #castrato: family_castration cultures may cut a young enough choir boy so his voice is preserved + option = { + name = pam_great_projects_events.0013.castrato + add_internal_flag = dangerous + custom_tooltip = pam_great_projects_events.0013.castrato.tt + trigger = { + culture = { + has_cultural_parameter = family_castration + } + exists = scope:choir_boy + scope:choir_boy = { + age < 12 + NOR = { + has_trait = eunuch + has_trait = beardless_eunuch + has_trait = eunuch_1 + } + } + } + save_scope_as = actor + scope:choir_boy = { + save_scope_as = recipient + } + scope:owner = { + domicile = { + add_domicile_building = cathedral_cantoria_01 + } + } + show_as_tooltip = { + add_courtier = scope:choir_boy + } + hidden_effect = { + add_courtier = scope:choir_boy + scope:choir_boy = { + ep3_child_castration_effect = yes + } + } + scope:choir_boy = { + add_stress = medium_stress_gain + } + add_piety = minor_piety_loss + stress_and_fulfillment_impact = { + callous = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + } + } + modifier = { + add = 150 + OR = { + has_trait = callous + has_trait = ambitious + has_trait = sadistic + } + } + } + } + option = { + name = pam_great_projects_events.0013.c + trigger = { + OR = { + has_trait = cynical + has_trait = sadistic + has_trait = callous + has_trait = deceitful + has_trait = paranoid + } + } + show_as_tooltip = { + if = { + limit = { + exists = scope:architect + } + imprison = { + target = scope:architect + type = dungeon + } + } + if = { + limit = { + exists = scope:choir_boy + } + imprison = { + target = scope:choir_boy + type = dungeon + } + } + } + hidden_effect = { + if = { + limit = { + exists = scope:architect + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:architect + IMPRISONER = root + } + } + if = { + limit = { + exists = scope:choir_boy + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:choir_boy + IMPRISONER = root + } + } + } + add_character_modifier = { + modifier = pam_cathedral_cantoria_scam_modifier + years = 5 + } + add_dread = medium_dread_gain + add_tyranny = minor_tyranny_gain + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 200 + OR = { + has_trait = cynical + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + } + } + } + } + option = { + name = pam_great_projects_events.0013.d + stress_impact = { + base = minor_stress_impact_loss + } + if = { + limit = { + has_spiritual_fulfillment_type = christian_fulfillment + } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + } + stress_and_fulfillment_impact = { + content = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + add = 100 + OR = { + has_trait = content + has_trait = humble + } + } + } + } + after = { + pam_cathedral_disappear_spare_event_npc_effect = { CHARACTER = scope:choir_boy } + } +} + +#Owner (archbishop) Events (the owner can also be the founder, but this is to insure some theocratic rulers always get a couple events during the course of the cathedral being built) +scripted_effect pam_cathedral_apply_archdiocese_sermon_effect = { + scope:archdiocese ?= { + every_county_in_clerical_region = { + limit = { + faith = scope:owner.faith + } + add_county_modifier = { + modifier = $COUNTY_MODIFIER$ + years = $DURATION$ + } + holder = { + if = { + limit = { + is_landed = yes + faith = scope:owner.faith + NOT = { + this = scope:owner + } + } + hidden_effect = { + add_character_modifier = { + modifier = $RULER_MODIFIER$ + years = $DURATION$ + } + if = { + limit = { + is_ai = no + } + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_cathedral_west_portal_sermon_toast + left_icon = scope:owner + right_icon = scope:province.barony + } + } + } + } + } + } + } +} + +#Cathedral west completed sermon (event for archbishop/owner) +pam_great_projects_events.0012 = { + type = character_event + title = pam_great_projects_events.0012.t + desc = pam_great_projects_events.0012.desc + left_portrait = { + character = root + animation = preaching + camera = camera_body_right + } + right_portrait = { + trigger = { + exists = scope:religion_buddy + } + character = scope:religion_buddy + animation = writing + camera = camera_event_center_close_to_right + } + override_background = { reference = pam_romanesque_church_exterior } + window = big_event_window + theme = christian + trigger = { + OR = { + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:oriental_orthodox_religion + } + any_great_project = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_location ?= { + NOT = { + has_variable = cathedral_west_portal_sermon_event + } + county ?= { + clerical_region_title ?= { + holder = root + } + } + } + } + } + immediate = { + save_scope_as = owner + random_great_project = { + limit = { + OR = { + great_project_type = pam_cathedral_01 + great_project_type = pam_cathedral_02 + great_project_type = pam_cathedral_03 + } + great_project_location ?= { + NOT = { + has_variable = cathedral_west_portal_sermon_event + } + county ?= { + clerical_region_title ?= { + holder = root + } + } + } + } + save_scope_as = great_project + great_project_founder = { + save_scope_as = founder + } + great_project_location ?= { + save_scope_as = province + set_variable = { + name = cathedral_west_portal_sermon_event + } + } + } + pam_cathedral_save_finished_building_scope_effect = yes + scope:province.county ?= { + clerical_region_title ?= { + save_scope_as = archdiocese + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + basic_is_available_ai = yes + } + } + cp:councillor_court_chaplain = { + save_scope_as = religion_buddy + } + } + } + option = { #option a) #sermon of peace + trigger = { + trigger_if = { + limit = { + OR = { + has_trait = just + has_trait = compassionate + } + } + OR = { + has_trait = just + has_trait = compassionate + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = calm + has_trait = forgiving + } + } + OR = { + has_trait = calm + has_trait = forgiving + } + } + trigger_else = { + has_trait = humble + } + } + name = pam_great_projects_events.0012.a + flavor = pam_great_projects_events.0012.a.flavor + custom_tooltip = pam_great_projects_events.0012.a.tt + hidden_effect = { + pam_cathedral_apply_archdiocese_sermon_effect = { + COUNTY_MODIFIER = pam_cathedral_sermon_peace_county_modifier + RULER_MODIFIER = pam_cathedral_sermon_peace_ruler_modifier + DURATION = 10 + } + } + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + just = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + calm = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 150 + OR = { + has_trait = just + has_trait = compassionate + } + } + modifier = { + add = 75 + OR = { + has_trait = calm + has_trait = forgiving + } + } + } + } + option = { + trigger = { + trigger_if = { + limit = { + OR = { + has_trait = diligent + has_trait = architect + } + } + OR = { + has_trait = diligent + has_trait = architect + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = education_stewardship + has_trait = patient + } + } + OR = { + has_trait = education_stewardship + has_trait = patient + } + } + trigger_else = { + has_lifestyle = stewardship_lifestyle + } + } + name = pam_great_projects_events.0012.b + flavor = pam_great_projects_events.0012.b.flavor + custom_tooltip = pam_great_projects_events.0012.b.tt + hidden_effect = { + pam_cathedral_apply_archdiocese_sermon_effect = { + COUNTY_MODIFIER = pam_cathedral_sermon_diligence_county_modifier + RULER_MODIFIER = pam_cathedral_sermon_diligence_ruler_modifier + DURATION = 10 + } + } + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + diligent = minor_stress_impact_loss + architect = minor_stress_impact_loss + patient = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 150 + OR = { + has_trait = diligent + has_trait = architect + } + } + modifier = { + add = 75 + OR = { + has_trait = education_stewardship + has_trait = patient + } + } + } + } + option = { + trigger = { + trigger_if = { + limit = { + OR = { + has_trait = gregarious + has_trait = trusting + } + } + OR = { + has_trait = gregarious + has_trait = trusting + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = diplomat + has_trait = education_diplomacy + } + } + OR = { + has_trait = diplomat + has_trait = education_diplomacy + } + } + trigger_else = { + OR = { + has_lifestyle = diplomacy_lifestyle + has_trait = honest + } + } + } + name = pam_great_projects_events.0012.c + flavor = pam_great_projects_events.0012.c.flavor + custom_tooltip = pam_great_projects_events.0012.c.tt + hidden_effect = { + pam_cathedral_apply_archdiocese_sermon_effect = { + COUNTY_MODIFIER = pam_cathedral_sermon_unity_county_modifier + RULER_MODIFIER = pam_cathedral_sermon_unity_ruler_modifier + DURATION = 10 + } + } + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 150 + OR = { + has_trait = gregarious + has_trait = trusting + } + } + modifier = { + add = 75 + OR = { + has_trait = diplomat + has_trait = education_diplomacy + } + } + } + } + option = { + trigger = { + trigger_if = { + limit = { + has_trait = content + } + has_trait = content + } + trigger_else_if = { + limit = { + has_trait = temperate + } + has_trait = temperate + } + trigger_else = { + has_trait = chaste + } + } + name = pam_great_projects_events.0012.d + flavor = pam_great_projects_events.0012.d.flavor + custom_tooltip = pam_great_projects_events.0012.d.tt + hidden_effect = { + pam_cathedral_apply_archdiocese_sermon_effect = { + COUNTY_MODIFIER = pam_cathedral_sermon_rejoice_county_modifier + RULER_MODIFIER = pam_cathedral_sermon_rejoice_ruler_modifier + DURATION = 10 + } + } + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + content = minor_stress_impact_loss + temperate = minor_stress_impact_loss + chaste = minor_stress_impact_loss + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 150 + has_trait = content + } + modifier = { + add = 75 + has_trait = temperate + } + } + } + option = { + trigger = { + trigger_if = { + limit = { + OR = { + has_trait = zealous + has_trait = theologian + } + } + OR = { + has_trait = zealous + has_trait = theologian + } + } + trigger_else_if = { + limit = { + OR = { + has_trait = lifestyle_mystic + has_trait = brave + } + } + OR = { + has_trait = lifestyle_mystic + has_trait = brave + } + } + trigger_else = { + OR = { + has_lifestyle = learning_lifestyle + has_trait = ambitious + } + } + } + name = pam_great_projects_events.0012.e + flavor = pam_great_projects_events.0012.e.flavor + custom_tooltip = pam_great_projects_events.0012.e.tt + hidden_effect = { + pam_cathedral_apply_archdiocese_sermon_effect = { + COUNTY_MODIFIER = pam_cathedral_sermon_perseverance_county_modifier + RULER_MODIFIER = pam_cathedral_sermon_perseverance_ruler_modifier + DURATION = 10 + } + } + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + theologian = minor_stress_impact_loss + brave = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 150 + OR = { + has_trait = zealous + has_trait = theologian + } + } + modifier = { + add = 75 + OR = { + has_trait = lifestyle_mystic + has_trait = brave + } + } + } + } + option = { + name = pam_great_projects_events.0012.f + flavor = pam_great_projects_events.0012.f.flavor + custom_tooltip = pam_great_projects_events.0012.f.tt + hidden_effect = { + pam_cathedral_apply_archdiocese_sermon_effect = { + COUNTY_MODIFIER = pam_cathedral_sermon_charity_county_modifier + RULER_MODIFIER = pam_cathedral_sermon_charity_ruler_modifier + DURATION = 10 + } + } + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 150 + OR = { + has_trait = compassionate + has_trait = generous + } + } + modifier = { + add = -40 + OR = { + has_trait = greedy + has_trait = callous + } + } + } + } +} + +#Cathedral Building Conclusion Event +pam_great_projects_events.0020 = { + type = character_event + title = pam_great_projects_events.0020.t + desc = pam_great_projects_events.0020.desc + center_portrait = { + character = scope:owner + animation = prayer_crossing + } + left_portrait = { + trigger = { + exists = scope:founder_not_owner + } + character = scope:founder_not_owner + animation = prayer_standing_eyes + camera = camera_event_center_close_to_right + } + right_portrait = { + trigger = { + exists = scope:contributor_or_realm_priest + scope:contributor_or_realm_priest != scope:owner + } + character = scope:contributor_or_realm_priest + animation = divine_ecstasy + camera = camera_event_center_pointing_left + } + override_background = { reference = pam_romanesque_church_exterior } + window = big_event_window + theme = christian + immediate = { + play_music_cue = mx_cue_deus_hoc_vult + pam_cathedral_save_finished_building_scope_effect = yes + scope:founder = { + if = { + limit = { + scope:owner != scope:founder + is_alive = yes + } + save_scope_as = founder_not_owner + } + } + if = { + limit = { + NOT = { + exists = scope:founder_not_owner + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + basic_is_available_ai = yes + } + } + cp:councillor_court_chaplain = { + save_scope_as = founder_not_owner + } + } + scope:great_project = { + every_contribution = { + limit = { + contribution_is_funded = yes + } + save_scope_as = contribution + contributor ?= { + if = { + limit = { + this != scope:owner + this != scope:founder + } + save_scope_as = optional_contributor + } + } + } + } + if = { + limit = { + exists = scope:optional_contributor + scope:optional_contributor != scope:owner + is_alive = yes + } + scope:optional_contributor = { + save_scope_as = contributor_or_realm_priest + } + } + else_if = { + limit = { + NOT = { + exists = scope:optional_contributor + } + exists = scope:founder_not_owner + scope:founder_not_owner != cp:councillor_court_chaplain + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + basic_is_available_ai = yes + } + cp:councillor_court_chaplain != scope:owner + } + cp:councillor_court_chaplain = { + save_scope_as = contributor_or_realm_priest + } + } + } + + #Option a) + option = { + name = pam_great_projects_events.0020.a + } +} + diff --git a/events/dlc/pam/pam_interactions_events.txt b/events/dlc/pam/pam_interactions_events.txt new file mode 100644 index 000000000..6ed88a400 --- /dev/null +++ b/events/dlc/pam/pam_interactions_events.txt @@ -0,0 +1,5575 @@ +namespace = pam_interactions_events + +#Request Legitimacy response events +#Yes to legitimacy +pam_interactions_events.0001 = { + type = letter_event + opening = { + desc = pam_interactions_events.0001.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:education_hook = yes + } + desc = pam_interactions_events.0001.hook_intro + } + desc = pam_interactions_events.0001.intro + } + desc = pam_interactions_events.0001 + first_valid = { + triggered_desc = { + trigger = { + scope:offer_hook = yes + } + desc = pam_interactions_events.0001.hook + } + triggered_desc = { + trigger = { + scope:tithe = yes + } + desc = pam_interactions_events.0001.tithe + } + triggered_desc = { + trigger = { + scope:donate_faith = yes + } + desc = pam_interactions_events.0001.donate + } + triggered_desc = { + trigger = { + scope:monastic_support = yes + } + desc = pam_interactions_events.0001.monks + } + desc = pam_interactions_events.0001.normal + } + desc = pam_interactions_events.0001.mid + first_valid = { + triggered_desc = { + trigger = { + OR = { + character_considered_wicked_trigger = { RITE = scope:recipient.rite } + scope:recipient = { + has_relation_rival = scope:puppet_or_actor + } + tyranny > medium_tyranny + has_trait = excommunicated + } + scope:recipient = { + opinion = { + target = scope:puppet_or_actor + value < 50 + } + NOT = { + has_dread_level_towards = { + target = scope:puppet_or_actor + level >= 2 + } + } + } + } + desc = pam_interactions_events.0001_disgust + } + triggered_desc = { + trigger = { + OR = { + character_considered_morally_dubious_trigger = { RITE = scope:recipient.rite } + scope:recipient = { + is_ai = yes + opinion = { + target = scope:puppet_or_actor + value <= -50 + } + } + tyranny >= low_tyranny + } + scope:recipient = { + opinion = { + target = scope:puppet_or_actor + value < 50 + } + } + } + desc = pam_interactions_events.0001_disapprove + } + triggered_desc = { + trigger = { + OR = { + piety_level >= 4 + has_trait = saint + has_trait = herald + has_trait = saoshyant_descendant + has_trait = order_member + has_trait = faith_warrior + has_trait = saoshyant + has_trait = paragon + has_trait = savior + has_trait = crusader_king + has_trait = zealous + has_trait = theologian + has_trait = divine_blood + has_trait = consecrated_blood + has_trait = sayyid + } + } + desc = pam_interactions_events.0001_approve + } + triggered_desc = { + trigger = { + scope:offer_hook = yes + } + desc = pam_interactions_events.0001_offer_hook_end + } + } + } + sender = scope:recipient + + immediate = { + request_legitimacy_interaction_effect = yes + notify_puppeteer_of_outcome_effect = { + TYPE = event_toast_effect_good + TITLE = pam_interactions_events.0001.toast_puppeteer + } + } + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + ai_zeal < low_negative_ai_value + } + desc = pam_interactions_events.0001.a.low_zeal + } + triggered_desc = { + trigger = { + ai_zeal > low_positive_ai_value + } + desc = pam_interactions_events.0001.a.high_zeal + } + desc = pam_interactions_events.0001.a + } + } + } + } +} + +#No to legitimacy (multiplayer only) +pam_interactions_events.0002 = { + type = letter_event + opening = { + desc = pam_interactions_events.0002.opening + } + desc = { + desc = pam_interactions_events.0002 + } + sender = scope:recipient + + immediate = { + add_legitimacy = medium_legitimacy_loss + notify_puppeteer_of_outcome_effect = { + TYPE = event_toast_effect_bad + TITLE = pam_interactions_events.0002.toast_puppeteer + } + } + option = { + name = pam_interactions_events.0002.a + } +} +#Strengthen claim response events +pam_interactions_events.0010 = { + type = letter_event + opening = { + desc = pam_interactions_events.0010.opening + } + desc = pam_interactions_events.0010 + sender = scope:recipient + + immediate = { + strengthen_claim_interaction_effect = yes + notify_puppeteer_of_outcome_effect = { + TYPE = event_toast_effect_good + TITLE = pam_interactions_events.0010.toast_puppeteer + } + } + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + ai_zeal < low_negative_ai_value + } + desc = pam_interactions_events.0010.a.low_zeal + } + triggered_desc = { + trigger = { + ai_zeal > low_positive_ai_value + } + desc = pam_interactions_events.0010.a.high_zeal + } + desc = pam_interactions_events.0010.a + } + } + } + } +} +#No to claim pressing (multiplayer only) +pam_interactions_events.0011 = { + type = letter_event + opening = { + desc = pam_interactions_events.0011.opening + } + desc = { + desc = pam_interactions_events.0011 + } + sender = scope:recipient + + immediate = { + notify_puppeteer_of_outcome_effect = { + TYPE = event_toast_effect_bad + TITLE = pam_interactions_events.0011.toast_puppeteer + } + } + option = { + name = pam_interactions_events.0011.a + } +} + +#Beseech claim response events +pam_interactions_events.0020 = { + type = letter_event + opening = { + desc = pam_interactions_events.0020.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:threaten_priest = yes + } + desc = pam_interactions_events.0020_threatened + } + triggered_desc = { + trigger = { + scope:offer_hook = yes + } + desc = pam_interactions_events.0020_offer_hook + } + triggered_desc = { + trigger = { + OR = { + scope:use_hook = yes + scope:donate_faith = yes + } + } + desc = pam_interactions_events.0020_indebted + } + desc = pam_interactions_events.0020 + } + desc = pam_interactions_events.0020_end + } + + sender = scope:secondary_recipient + + immediate = { + ecclesiastic_grant_claim_interaction_effect = yes + notify_puppeteer_of_outcome_effect = { + TYPE = event_toast_effect_good + TITLE = pam_interactions_events.0020.toast_puppeteer + } + } + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + ai_zeal < low_negative_ai_value + } + desc = pam_interactions_events.0020.a.low_zeal + } + triggered_desc = { + trigger = { + ai_zeal > low_positive_ai_value + } + desc = pam_interactions_events.0020.a.high_zeal + } + desc = pam_interactions_events.0020.a + } + } + } + } +} +#No to claim pressing (multiplayer only) +pam_interactions_events.0021 = { + type = letter_event + opening = { + desc = pam_interactions_events.0021.opening + } + desc = { + desc = pam_interactions_events.0021 + } + sender = scope:secondary_recipient + + immediate = { + notify_puppeteer_of_outcome_effect = { + TYPE = event_toast_effect_bad + TITLE = pam_interactions_events.0021.toast_puppeteer + } + } + option = { + name = pam_interactions_events.0021.a + } +} +#Letter event for claim's holder +pam_interactions_events.0022 = { + type = letter_event + opening = { + desc = pam_interactions_events.0022.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:puppet_or_actor.highest_held_title_tier < scope:target.tier + + } + desc = pam_interactions_events.0022_shrimp + } + triggered_desc = { + trigger = { + scope:puppet_or_actor.highest_held_title_tier_minus_one > scope:target.tier + } + desc = pam_interactions_events.0022_shark + } + desc = pam_interactions_events.0022 + } + desc = pam_interactions_events.0022_end + } + sender = scope:puppet_or_actor + + immediate = { + show_as_tooltip = { + scope:puppet_or_actor = { + add_pressed_claim = scope:target + } + } + } + option = { + name = pam_interactions_events.0022.a + } +} +#Letter event for player clergy to grant claim +pam_interactions_events.0023 = { + type = letter_event + opening = { + desc = pam_interactions_events.0023.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:puppet_or_actor.highest_held_title_tier < scope:target.tier + + } + desc = pam_interactions_events.0023_shrimp + } + triggered_desc = { + trigger = { + scope:puppet_or_actor.highest_held_title_tier_minus_one > scope:target.tier + } + desc = pam_interactions_events.0023_shark + } + desc = pam_interactions_events.0023 + } + desc = pam_interactions_events.0023_end + } + sender = scope:puppet_or_actor + + immediate = { + } + #Yes + option = { + name = pam_interactions_events.0023.a + scope:puppet_or_actor = { + ecclesiastic_grant_claim_interaction_effect = yes + trigger_event = pam_interactions_events.0020 + scope:recipient = { + #Event where they're informed + trigger_event = pam_interactions_events.0022 + } + } + if = { + limit = { + scope:puppet_or_actor = { clerical_hesitation_claim_interaction_value >= -2 } + } + stress_impact = { + zealous = medium_stress_impact_gain + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + } + else = { + stress_impact = { + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + } + } + #No + option = { + name = pam_interactions_events.0023.b + scope:puppet_or_actor = { + trigger_event = pam_interactions_events.0021 + #Ex. a king trying to claim a county + if = { + limit = { + highest_held_title_tier_minus_one > scope:target.tier + } + add_opinion = { + modifier = refusal_opinion + target = scope:secondary_recipient + opinion = -15 + } + } + #Ex. a king trying to claim a duchy + if = { + limit = { + highest_held_title_tier > scope:target.tier + } + add_opinion = { + modifier = refusal_opinion + target = scope:secondary_recipient + opinion = -25 + } + } + #Ex. a king trying to claim a kingdom + if = { + limit = { + highest_held_title_tier = scope:target.tier + } + add_opinion = { + modifier = refusal_opinion + target = scope:secondary_recipient + opinion = -30 + } + } + #Ex. a king trying to claim an empire + if = { + limit = { + highest_held_title_tier < scope:target.tier + } + add_opinion = { + modifier = refusal_opinion + target = scope:secondary_recipient + opinion = -35 + } + } + root = { + if = { + limit = { + scope:target.tier > root.highest_held_title_tier + } + add_piety = medium_piety_gain + } + else_if = { + limit = { + scope:target.tier < root.highest_held_title_tier_minus_one + } + add_piety = miniscule_piety_gain + } + else = { + add_piety = minor_piety_gain + } + } + } + scope:recipient = { + add_opinion = { + opinion = { + value = 5 + if = { + limit = { + highest_held_title_tier = scope:target.tier + } + multiply = 6 + } + else_if = { + limit = { + highest_held_title_tier_minus_one = scope:target.tier + } + multiply = 4 + } + else_if = { + limit = { + highest_held_title_tier_minus_two = scope:target.tier + } + multiply = 3 + } + } + modifier = grateful_opinion + target = scope:secondary_recipient + } + } + if = { + limit = { + OR = { + scope:puppet_or_actor.highest_held_title_tier_minus_one > scope:target.tier + scope:threaten_priest = yes + } + } + stress_impact = { + craven = minor_stress_impact_gain + } + } + else = { + stress_impact = { + generous = minor_stress_impact_gain + } + } + } +} + +#Events around transferring land from interaction +#Actor chooses negotiation method to use after recipient doesn't instantly accept +pam_interactions_events.0030 = { + type = character_event + title = pam_interactions_events.0030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:representative = root + } + } + desc = pam_interactions_events.0030.desc_intro_envoy + } + desc = pam_interactions_events.0030.desc_intro + } + desc = pam_interactions_events.0030.desc + first_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:recipient = scope:target.holder + } + } + desc = pam_interactions_events.0030.desc_vassal + } + desc = pam_interactions_events.0030.desc_target + } + } + theme = vassal + override_background = { + reference = holy_site_generic + } + left_portrait = { + character = scope:representative + triggered_animation = { + trigger = { + ai_compassion <= 0 + } + animation = villain + } + animation = zealous_superior + camera = camera_event_very_left + } + right_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:actor } + ai_compassion >= low_positive_ai_value + } + animation = sadness + } + triggered_animation = { + trigger = { + scope:recipient = { + opinion = { + target = scope:actor + value >= 60 + } + } + } + animation = contemplating + } + animation = war_defender + camera = camera_event_very_right + } + lower_center_portrait = scope:actor_non_present + lower_right_portrait = scope:vassal + trigger = { + is_alive = yes + is_imprisoned = no + is_ruler = yes + scope:recipient = { + is_ruler = yes + is_alive = yes + trigger_if = { + limit = { + is_imprisoned = yes + } + imprisoner = { + OR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + } + scope:target.holder ?= { + OR = { + this = scope:recipient + is_vassal_or_below_of = scope:recipient + } + } + } + immediate = { + if = { + limit = { + scope:target.holder = { + NOT = { + this = scope:recipient + } + } + } + scope:target.holder = { save_scope_as = vassal } + } + #when root is high tier negotiating with low tier, flavor feels better with priest serving as envoy + if = { + limit = { + highest_held_title_tier >= tier_kingdom + scope:recipient.highest_held_title_tier <= tier_duchy + scope:secondary_recipient = { + is_available_quick = { + alive = yes + incapable = no + } + trigger_if = { + limit = { + is_imprisoned = yes + } + imprisoner = { + OR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + has_contagious_deadly_disease_trigger = no + } + } + scope:secondary_recipient = { + save_scope_as = representative + } + } + else = { + save_scope_as = representative + #We want to show clergy at bottom only in this circumstance + scope:secondary_recipient = { + save_scope_as = actor_non_present + } + } + #save forceable relation scope so that changing relations doesn't mess with outcome later + if = { + limit = { + pam_negotiate_land_forced_relation_trigger = yes + } + save_scope_as = forceable_relation + } + } + #use hook + option = { + trigger = { + OR = { + pam_negotiate_land_forced_hook_trigger = yes + pam_negotiate_land_possible_hook_trigger = yes + } + } + name = pam_interactions_events.0030.a + flavor = pam_interactions_events.0030.a.flavor + save_scope_as = method_hook + show_as_tooltip = { + if = { + limit = { + pam_negotiate_land_forced_hook_trigger = yes + } + add_internal_flag = special + custom_tooltip = pam_forced_negotiate_land_hook_tt + custom_tooltip = clergy_land_interaction_recipient_forced_tt + } + else = { + if = { + limit = { + scope:recipient = { + is_ai = yes + ai_honor > medium_positive_ai_value + } + } + custom_tooltip = clergy_land_increased_possibility_hook_tt + } + custom_tooltip = clergy_land_interaction_recipient_possible_tt + pam_negotiate_land_hook_effect = yes + ecclesiastic_transfer_land_interaction_transfer_effect = yes + custom_tooltip = clergy_land_interaction_recipient_refuse_tt + clergy_land_refusal_legitimacy_piety_effect = yes + } + } + if = { + limit = { + pam_negotiate_land_forced_hook_trigger = yes + } + save_scope_as = forced_acceptance + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = -0.5 + } + modifier = { + add = 25 + NOT = { is_vassal_of = scope:recipient } + } + modifier = { + add = 25 + scope:recipient = { + ai_honor > medium_positive_ai_value + } + } + modifier = { + add = 25 + scope:recipient = { + ai_honor > 0 + } + } + modifier = { + factor = 10 + pam_negotiate_land_forced_hook_trigger = yes + } + } + } + #Destroy relations + option = { + trigger = { + OR = { + pam_negotiate_land_forced_relation_trigger = yes + pam_negotiate_land_possible_relation_trigger = yes + } + } + name = pam_interactions_events.0030.b + flavor = pam_interactions_events.0030.b.flavor + save_scope_as = method_relation + show_as_tooltip = { + if = { + limit = { + scope:recipient = { is_ai = yes } + pam_negotiate_land_forced_relation_trigger = yes + } + add_internal_flag = special + custom_tooltip = clergy_land_interaction_recipient_forced_tt + show_as_tooltip = { + pam_negotiate_land_relation_effect = yes + ecclesiastic_transfer_land_interaction_transfer_effect = yes + } + } + else = { + if = { + limit = { + scope:recipient = { + is_ai = yes + ai_compassion > medium_positive_ai_value + } + } + custom_tooltip = clergy_land_increased_possibility_relation_tt + } + custom_tooltip = clergy_land_interaction_recipient_possible_tt + pam_negotiate_land_relation_accept_effect = yes + ecclesiastic_transfer_land_interaction_transfer_effect = yes + custom_tooltip = clergy_land_interaction_recipient_refuse_tt + pam_negotiate_land_relation_effect = yes + clergy_land_refusal_legitimacy_piety_effect = yes + } + } + if = { + limit = { + pam_negotiate_land_forced_relation_trigger = yes + } + save_scope_as = forced_acceptance + } + stress_impact = { + deceitful = minor_stress_impact_loss + fickle = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + trusting = medium_stress_impact_gain + generous = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = -0.5 + } + modifier = { + add = 50 + NOT = { is_allied_to = scope:recipient } + half_current_military_strength >= scope:recipient.twice_current_military_strength + spiritual_fulfillment >= 0 + } + modifier = { + add = 25 + scope:recipient = { + ai_compassion > medium_positive_ai_value + } + } + modifier = { + add = 25 + scope:recipient = { + ai_compassion > 0 + } + } + modifier = { + factor = 10 + pam_negotiate_land_forced_relation_trigger = yes + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = trusting + has_trait = generous + has_trait = forgiving + } + } + } + } + #Sabotage piety levels + option = { + trigger = { + OR = { + pam_negotiate_land_forced_piety_level_trigger = yes + pam_negotiate_land_possible_piety_level_trigger = yes + } + } + name = pam_interactions_events.0030.c + flavor = pam_interactions_events.0030.c.tt + save_scope_as = method_piety + show_as_tooltip = { + if = { + limit = { + scope:recipient = { is_ai = yes } + pam_negotiate_land_forced_piety_level_trigger = yes + } + add_internal_flag = special + custom_tooltip = clergy_land_interaction_recipient_forced_tt + pam_negotiate_land_piety_effect = yes + ecclesiastic_transfer_land_interaction_transfer_effect = yes + } + else = { + if = { + limit = { + scope:recipient = { + is_ai = yes + ai_zeal > medium_positive_ai_value + } + } + custom_tooltip = clergy_land_increased_possibility_piety_tt + } + custom_tooltip = clergy_land_interaction_recipient_possible_tt + ecclesiastic_transfer_land_interaction_transfer_effect = yes + custom_tooltip = clergy_land_interaction_recipient_refuse_tt + pam_negotiate_land_piety_effect = yes + clergy_land_refusal_legitimacy_piety_effect = yes + } + } + if = { + limit = { + pam_negotiate_land_forced_piety_level_trigger = yes + } + save_scope_as = forced_acceptance + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = -0.5 + ai_sociability = -0.5 + } + modifier = { + add = 50 + piety_level >= 5 + } + modifier = { + add = 25 + scope:recipient = { + ai_zeal > medium_positive_ai_value + } + } + modifier = { + add = 25 + scope:recipient = { + ai_zeal > 0 + } + } + modifier = { + factor = 10 + pam_negotiate_land_forced_piety_level_trigger = yes + } + modifier = { + factor = 0 + has_trait = zealous + } + } + } + #Sabotage legitimacy levels + option = { + trigger = { + OR = { + pam_negotiate_land_forced_legitimacy_level_trigger = yes + pam_negotiate_land_possible_legitimacy_level_trigger = yes + } + } + name = pam_interactions_events.0030.d + flavor = pam_interactions_events.0030.d.flavor + save_scope_as = method_legitimacy + show_as_tooltip = { + if = { + limit = { + scope:recipient = { is_ai = yes } + pam_negotiate_land_forced_legitimacy_level_trigger = yes + } + add_internal_flag = special + custom_tooltip = clergy_land_interaction_recipient_forced_tt + pam_negotiate_land_legitimacy_effect = yes + ecclesiastic_transfer_land_interaction_transfer_effect = yes + } + else = { + if = { + limit = { + scope:recipient = { + is_ai = yes + ai_boldness < medium_negative_ai_value + } + } + custom_tooltip = clergy_land_increased_possibility_legitimacy_tt + } + custom_tooltip = clergy_land_interaction_recipient_possible_tt + ecclesiastic_transfer_land_interaction_transfer_effect = yes + custom_tooltip = clergy_land_interaction_recipient_refuse_tt + pam_negotiate_land_legitimacy_effect = yes + clergy_land_refusal_legitimacy_piety_effect = yes + } + } + if = { + limit = { + pam_negotiate_land_forced_legitimacy_level_trigger = yes + } + save_scope_as = forced_acceptance + } + stress_impact = { + vengeful = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + modifier = { + add = 50 + legitimacy_level >= 5 + NOT = { + any_targeting_faction = { + exists = this + } + } + } + modifier = { + add = 20 + scope:recipient = { + ai_boldness < medium_negative_ai_value + } + } + modifier = { + add = 20 + scope:recipient = { + ai_boldness > 0 + } + } + modifier = { + factor = 10 + pam_negotiate_land_forced_legitimacy_level_trigger = yes + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = just + } + } + } + } + #offer gold + option = { + trigger = { + OR = { + pam_negotiate_land_forced_gold_trigger = yes + pam_negotiate_land_possible_gold_trigger = yes + } + } + name = pam_interactions_events.0030.e + save_scope_as = method_gold + show_as_tooltip = { + if = { + limit = { + scope:recipient = { is_ai = yes } + pam_negotiate_land_forced_gold_trigger = yes + } + add_internal_flag = special + custom_tooltip = clergy_land_interaction_recipient_forced_tt + pam_negotiate_land_gold_effect = yes + ecclesiastic_transfer_land_interaction_transfer_effect = yes + } + else = { + if = { + limit = { + scope:recipient = { + is_ai = yes + ai_greed > medium_positive_ai_value + } + } + custom_tooltip = clergy_land_increased_possibility_gold_tt + } + custom_tooltip = clergy_land_interaction_recipient_possible_tt + pam_negotiate_land_gold_effect = yes + ecclesiastic_transfer_land_interaction_transfer_effect = yes + custom_tooltip = clergy_land_interaction_recipient_refuse_tt + clergy_land_refusal_legitimacy_piety_effect = yes + } + } + if = { + limit = { + pam_negotiate_land_forced_gold_trigger = yes + } + save_scope_as = forced_acceptance + } + stress_impact = { + generous = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + add = 50 + treasury_or_gold >= pam_transfer_land_times_10_gold_value + } + modifier = { + add = 20 + scope:recipient = { + ai_greed > medium_positive_ai_value + } + } + modifier = { + add = 20 + scope:recipient = { + ai_greed > 0 + } + } + modifier = { + factor = 10 + pam_negotiate_land_forced_gold_trigger = yes + } + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + #Don't try anything... maybe they will still accept + option = { + name = pam_interactions_events.0030.f + save_scope_as = method_none + if = { + limit = { + NOT = { + pam_clergy_land_interaction_likely_acceptance_no_methods_trigger = yes + } + } + custom_tooltip = clergy_land_no_method_warning_tt + } + else = { + custom_tooltip = clergy_land_no_method_warning_soft_tt + } + show_as_tooltip = { + custom_tooltip = clergy_land_interaction_recipient_possible_tt + ecclesiastic_transfer_land_interaction_transfer_effect = yes + custom_tooltip = clergy_land_interaction_recipient_refuse_tt + clergy_land_refusal_legitimacy_piety_effect = yes + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + modifier = { + add = 30 + scope:actor = { pam_clergy_land_interaction_likely_acceptance_no_methods_trigger = yes } + } + } + } + after = { + #Recipient receives chosen negotiation method + scope:recipient = { + trigger_event = { + id = pam_interactions_events.0034 + days = 1 + } + } + } +} +#player cleric refuses +pam_interactions_events.0031 = { + type = letter_event + opening = { + desc = pam_interactions_events.0031.opening + } + desc = pam_interactions_events.0031.desc + + sender = scope:secondary_recipient + + immediate = { + } + #Yes + option = { + name = pam_interactions_events.0031.a + show_as_tooltip = { + scope:secondary_recipient = { + if = { + limit = { + scope:target.tier > root.highest_held_title_tier + } + add_piety = major_piety_gain + } + else_if = { + limit = { + scope:target.tier < root.highest_held_title_tier_minus_one + } + add_piety = minor_piety_gain + } + else = { + add_piety = medium_piety_gain + } + } + } + } +} +#Recipient receives request and either immediately accepts, goes to negotiate or refuses (if player) +pam_interactions_events.0032 = { + type = letter_event + opening = { + desc = pam_interactions_events.0032.opening + } + desc = { + + desc = pam_interactions_events.0032_intro + #What is claim based on? + first_valid = { + triggered_desc = { + trigger = { + scope:actor = { + any_held_title = { + any_in_de_jure_hierarchy = { + this = scope:target + } + } + } + } + desc = pam_interactions_events.0032_de_jure + } + desc = pam_interactions_events.0032_claim + } + } + sender = scope:secondary_recipient + + immediate = { + if = { + limit = { + exists = scope:clergy_forced_acceptance + } + custom_tooltip = clergy_forced_transfer_acceptance_tt + if = { + limit = { + scope:target = { + this = scope:recipient.primary_title + } + } + set_relation_rival = { + target = scope:recipient + reason = rival_quarreled_over_land + } + } + else = { + set_relation_potential_rival = { + target = scope:recipient + reason = rival_quarreled_over_land + } + } + } + #Pope is trying to take your lands? You can now declare an antipope + if = { + limit = { + scope:target.tier >= tier_kingdom + is_landed = yes + pam_is_antipope_sponsor_trigger = no + pam_is_antipope_trigger = no + faith.religious_head ?= scope:secondary_recipient + faith = { has_doctrine_parameter = spiritual_head_of_faith } + NOT = { + rite = { rite_has_parameter = no_head_of_faith } + } + } + if = { + limit = { + government_has_flag = government_is_theocracy + } + custom_tooltip = land_threatened_self_antipope_requirement_tt + } + else = { + custom_tooltip = land_threatened_antipope_requirement_tt + } + set_variable = antipope_squabble_unlock + } + } + #I, a scholar, will both refuse and big-brain you into leaving it alone + option = { + trigger = { + #Should only be possible against AI bc players are extra special + scope:actor = { is_ai = yes } + has_trait = lifestyle_scholar + has_trait_xp = { + trait = lifestyle_scholar + value >= 60 + } + NOT = { exists = scope:clergy_forced_acceptance } + } + name = pam_interactions_events.0032.aa + flavor = pam_interactions_events.0032.aa.flavor + add_internal_flag = special + custom_tooltip = clergy_interaction_scholar_block_tt + pam_negotiate_land_tracking_variable_effect = yes + add_piety = { + value = minor_piety_gain + multiply = scope:target.tier + } + add_stress = { + value = miniscule_stress_loss + multiply = scope:target.tier + } + scope:actor = { + add_stress = medium_stress_impact_gain + add_piety_experience = { + value = medium_piety_loss + multiply = scope:target.tier + } + } + scope:secondary_recipient = { + add_stress = medium_stress_impact_gain + add_piety_experience = { + value = medium_piety_loss + multiply = scope:target.tier + } + } + ai_chance = { + base = 1000 + } + } + #Yes, I will just agree point blank to give up the title + option = { + name = pam_interactions_events.0032.a + add_piety = { + value = medium_piety_value + if = { + limit = { + scope:target = scope:recipient.primary_title + } + add = massive_piety_value + } + else_if = { + limit = { + scope:target.tier = scope:recipient.highest_held_title_tier + } + add = { + value = medium_piety_value + multiply = 3 + } + } + else_if = { + limit = { + scope:target.tier = scope:recipient.highest_held_title_tier_minus_one + } + add = { + value = medium_piety_value + multiply = 2 + } + } + else_if = { + limit = { + scope:target.tier = scope:recipient.highest_held_title_tier_minus_two + } + add = medium_piety_value + } + } + #Mark as dangerous option if it is your primary title + if = { + limit = { + scope:target = { + OR = { + this = root.primary_title + any_de_jure_county = { + this = root.capital_county + } + any_in_de_jure_hierarchy = { + this = root.primary_title + } + AND = { + this = root.capital_county + root.domain_size = 1 + } + } + } + } + add_internal_flag = dangerous + } + show_as_tooltip = { + ecclesiastic_transfer_land_interaction_transfer_effect = yes + } + pam_negotiate_land_tracking_variable_effect = yes + scope:actor = { + trigger_event = pam_interactions_events.0035 + } + stress_impact = { + zealous = medium_stress_impact_loss + humble = minor_stress_impact_loss + trusting = minor_stress_impact_loss + + cynical = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 0 + + #Major personality reason + modifier = { + add = 10 + OR = { + ai_zeal > high_positive_ai_value + ai_greed < high_negative_ai_value + ai_boldness < high_negative_ai_value + ai_energy < high_negative_ai_value + } + } + + #Minor personality reason + modifier = { + add = 5 + OR = { + ai_zeal >= low_positive_ai_value + ai_greed <= low_negative_ai_value + ai_boldness <= low_negative_ai_value + ai_energy <= low_negative_ai_value + } + } + + #Major military strength reason + modifier = { + add = 10 + twice_current_military_strength <= scope:actor.half_current_military_strength + } + + #High church authority + modifier = { + add = 5 + scope:secondary_recipient = { + has_realm_law = church_authority_3 + } + } + modifier = { + add = 2 + scope:secondary_recipient = { + has_realm_law = church_authority_2 + } + } + modifier = { + add = 1 + scope:secondary_recipient = { + has_realm_law = church_authority_1 + } + } + + #Minor military strength reason + modifier = { + add = 5 + current_military_strength <= scope:actor.half_current_military_strength + } + + #reduce for inappropriate personality + modifier = { + factor = 0.5 + OR = { + ai_zeal <= low_negative_ai_value + ai_greed >= low_positive_ai_value + ai_boldness >= low_positive_ai_value + ai_honor >= low_positive_ai_value + } + } + #reduce for weak military + modifier = { + factor = 0.5 + current_military_strength > scope:actor.current_military_strength + } + + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + has_trait = stubborn + has_trait = ambitious + has_trait = greedy + ai_zeal <= high_negative_ai_value + ai_greed >= high_positive_ai_value + ai_boldness >= high_positive_ai_value + ai_honor >= high_positive_ai_value + ai_energy >= high_positive_ai_value + half_current_military_strength >= scope:actor.current_military_strength + } + } + + #Instant acceptance is meant to make this option always happen + modifier = { + add = 1000 + pam_instant_negotiate_land_success_trigger = yes + } + } + } + #I refuse. Because they will not follow through on their threats... or I don't care that they will + option = { + trigger = { + #Instance acceptance blocks AI saying no + pam_instant_negotiate_land_success_trigger = no + NOT = { exists = scope:clergy_forced_acceptance } + } + name = pam_interactions_events.0032.b + flavor = pam_interactions_events.0032.b.tt + scope:actor = { + trigger_event = pam_interactions_events.0030 + } + save_scope_as = recipient_event + show_as_tooltip = { + scope:actor = { + custom_tooltip = clerical_land_transfer_actor_attempt_tt + pam_available_negotiation_methods_tooltip_effect = yes + } + } + + stress_impact = { + zealous = medium_stress_impact_gain + humble = minor_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} +#player cleric decides whether to approve +pam_interactions_events.0033 = { + type = letter_event + opening = { + desc = pam_interactions_events.0033.opening + } + desc = { + #What is claim based on? + first_valid = { + triggered_desc = { + trigger = { + scope:actor = { + any_held_title = { + any_in_de_jure_hierarchy = { + this = scope:target + } + } + } + } + desc = pam_interactions_events.0033_de_jure + } + desc = pam_interactions_events.0033_claim + } + #What's the biggest offer made to clergy? + first_valid = { + #threaten priest + triggered_desc = { + trigger = { + scope:threaten_priest = yes + } + desc = pam_interactions_events.0033_threaten + } + #Promise succession + triggered_desc = { + trigger = { + scope:promise_church_succession = yes + } + desc = pam_interactions_events.0033_succession + } + #Offer pilgrimage + triggered_desc = { + trigger = { + scope:offer_pilgrimage = yes + } + desc = pam_interactions_events.0033_pilgrimage + } + #Use hook + triggered_desc = { + trigger = { + scope:use_hook = yes + } + desc = pam_interactions_events.0033_use_hook + } + #Offer hook + triggered_desc = { + trigger = { + scope:offer_hook = yes + } + desc = pam_interactions_events.0033_offer_hook + } + #Offer gold + triggered_desc = { + trigger = { + scope:donate_faith = yes + } + desc = pam_interactions_events.0033_donate + } + desc = pam_interactions_events.0033_fallback + } + } + sender = scope:actor + + immediate = { + save_scope_as = cleric + } + #Yes and I will use my powers to make this happen + option = { + trigger = { + #Has highest church authority level + has_realm_law_flag = clergy_force_land_transfers + piety_level >= 3 + } + show_as_unavailable = { + has_realm_law_flag = clergy_force_land_transfers + piety_level < 3 + } + name = pam_interactions_events.0033.aa + custom_tooltip = high_church_authority_unlock_land_transfer_tt + add_internal_flag = special + if = { + limit = { + highest_held_title_tier < scope:target.tier + } + add_prestige = massive_prestige_gain + } + else = { + add_prestige = medium_prestige_gain + } + show_as_tooltip = { + if = { + limit = { + scope:target = { + this = scope:recipient.primary_title + } + } + set_relation_rival = { + target = scope:recipient + reason = rival_quarreled_over_land + } + } + else = { + set_relation_potential_rival = { + target = scope:recipient + reason = rival_quarreled_over_land + } + } + } + save_scope_as = clergy_forced_acceptance + scope:target.holder = { + add_opinion = { + target = scope:secondary_recipient + modifier = demanded_my_title_opinion + opinion = -30 + } + } + if = { + limit = { + scope:target.holder = { + NOT = { + this = scope:recipient + } + } + } + scope:recipient = { + add_opinion = { + target = scope:secondary_recipient + modifier = demanded_my_title_opinion + opinion = -20 + } + } + } + scope:recipient = { + trigger_event = pam_interactions_events.0032 + } + if = { + limit = { + scope:actor = { clerical_hesitation_claim_interaction_value >= -2 } + } + stress_impact = { + zealous = medium_stress_impact_gain + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + } + } + #Yes + option = { + name = pam_interactions_events.0033.a + flavor = pam_interactions_events.0033.a.tt + scope:actor = { + if = { + limit = { + pam_forced_negotiate_land_success_trigger = no + pam_instant_negotiate_land_success_trigger = no + } + root = { + custom_tooltip = clergy_land_inform_priest_might_fail_tt + } + } + else_if = { + limit = { + pam_instant_negotiate_land_success_trigger = no + } + root = { + custom_tooltip = clergy_land_inform_priest_can_force_tt + } + } + else = { + root = { + custom_tooltip = clergy_land_inform_priest_will_happen_tt + } + } + ecclesiastic_transfer_land_interaction_immediate_effect = yes + } + scope:target.holder = { + add_opinion = { + target = scope:secondary_recipient + modifier = demanded_my_title_opinion + opinion = -30 + } + } + if = { + limit = { + scope:target.holder = { + NOT = { + this = scope:recipient + } + } + } + scope:recipient = { + add_opinion = { + target = scope:secondary_recipient + modifier = demanded_my_title_opinion + opinion = -20 + } + } + } + scope:recipient = { + trigger_event = pam_interactions_events.0032 + } + if = { + limit = { + scope:actor = { clerical_hesitation_claim_interaction_value >= -2 } + } + stress_impact = { + zealous = medium_stress_impact_gain + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + } + } + #No + option = { + name = pam_interactions_events.0033.b + flavor = pam_interactions_events.0033.b.tt + scope:actor = { + trigger_event = pam_interactions_events.0031 + #Ex. a king trying to claim a county + if = { + limit = { + highest_held_title_tier_minus_one > scope:target.tier + } + add_opinion = { + modifier = refusal_opinion + target = scope:secondary_recipient + opinion = -20 + } + } + #Ex. a king trying to claim a duchy + if = { + limit = { + highest_held_title_tier > scope:target.tier + } + add_opinion = { + modifier = refusal_opinion + target = scope:secondary_recipient + opinion = -30 + } + } + #Ex. a king trying to claim a kingdom + if = { + limit = { + highest_held_title_tier = scope:target.tier + } + add_opinion = { + modifier = refusal_opinion + target = scope:secondary_recipient + opinion = -40 + } + } + #Ex. a king trying to claim an empire + if = { + limit = { + highest_held_title_tier < scope:target.tier + } + add_opinion = { + modifier = refusal_opinion + target = scope:secondary_recipient + opinion = -50 + } + } + } + #Gain opinion with recipient you favored + scope:recipient = { + add_opinion = { + opinion = { + value = 10 + if = { + limit = { + highest_held_title_tier = scope:target.tier + } + multiply = 5 + } + else_if = { + limit = { + highest_held_title_tier_minus_one = scope:target.tier + } + multiply = 3 + } + else_if = { + limit = { + highest_held_title_tier_minus_two = scope:target.tier + } + multiply = 2 + } + } + modifier = grateful_opinion + target = scope:secondary_recipient + } + } + if = { + limit = { + OR = { + scope:actor.highest_held_title_tier_minus_one > scope:target.tier + scope:threaten_priest = yes + } + } + stress_impact = { + craven = minor_stress_impact_gain + } + } + else = { + stress_impact = { + generous = minor_stress_impact_gain + } + } + } +} +#Recipient receives actor's chosen negotiation method +pam_interactions_events.0034 = { + type = character_event + title = pam_interactions_events.0034.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:representative = scope:actor + } + } + desc = pam_interactions_events.0034.desc_intro_envoy + } + desc = pam_interactions_events.0034.desc_intro + } + first_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:recipient = scope:target.holder + } + } + desc = pam_interactions_events.0034.desc_vassal + } + desc = pam_interactions_events.0034.desc_target + } + desc = pam_interactions_events.0034.desc + + first_valid = { + triggered_desc = { + trigger = { + exists = scope:method_hook + } + desc = pam_interactions_events.0034.desc_method_hook + } + triggered_desc = { + trigger = { + exists = scope:method_relation + } + desc = pam_interactions_events.0034.desc_method_relation + } + triggered_desc = { + trigger = { + exists = scope:method_piety + } + desc = pam_interactions_events.0034.desc_method_piety + } + triggered_desc = { + trigger = { + exists = scope:method_legitimacy + } + desc = pam_interactions_events.0034.desc_method_legitimacy + } + triggered_desc = { + trigger = { + exists = scope:method_gold + } + desc = pam_interactions_events.0034.desc_method_gold + } + desc = pam_interactions_events.0034.desc_no_method + } + } + theme = vassal + override_background = { + reference = holy_site_generic + } + left_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:actor } + ai_compassion >= low_positive_ai_value + } + animation = sadness + } + animation = war_defender + camera = camera_event_very_left + } + right_portrait = { + character = scope:representative + triggered_animation = { + trigger = { + ai_compassion <= 0 + } + animation = villain + } + animation = zealous_superior + camera = camera_event_very_right + } + lower_right_portrait = scope:recipient_non_present + lower_left_portrait = scope:vassal + trigger = { + is_alive = yes + is_ruler = yes + trigger_if = { + limit = { + is_imprisoned = yes + } + imprisoner = { + OR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + scope:actor = { + is_alive = yes + is_imprisoned = no + is_ruler = yes + } + scope:representative = { + is_alive = yes + is_imprisoned = no + } + scope:target.holder ?= { + OR = { + this = scope:recipient + is_vassal_or_below_of = scope:recipient + } + } + } + immediate = { + #Save the non-rep to show at the bottom + if = { + limit = { + scope:representative = scope:actor + } + scope:secondary_recipient = { + save_scope_as = recipient_non_present + } + } + else = { + scope:actor = { + save_scope_as = recipient_non_present + } + } + } + #Accept + option = { + name = pam_interactions_events.0034.a + #Mark as dangerous option if it is your primary title + if = { + limit = { + scope:target = { + OR = { + this = root.primary_title + any_de_jure_county = { + this = root.capital_county + } + any_in_de_jure_hierarchy = { + this = root.primary_title + } + AND = { + this = root.capital_county + root.domain_size = 1 + } + } + } + } + add_internal_flag = dangerous + } + show_as_tooltip = { + scope:actor = { + if = { + limit = { + exists = scope:method_hook + } + pam_negotiate_land_hook_effect = yes + } + if = { + limit = { + exists = scope:method_relation + } + pam_negotiate_land_relation_accept_effect = yes + } + if = { + limit = { + exists = scope:method_gold + } + pam_negotiate_land_gold_effect = yes + } + } + ecclesiastic_transfer_land_interaction_transfer_effect = yes + } + pam_negotiate_land_tracking_variable_effect = yes + #success event for actor + scope:actor = { trigger_event = pam_interactions_events.0035 } + if = { + limit = { + exists = scope:method_hook + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = minor_stress_impact_gain + } + } + else_if = { + limit = { + exists = scope:method_relation + } + stress_impact = { + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + else_if = { + limit = { + exists = scope:method_piety + } + stress_impact = { + stubborn = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = minor_stress_impact_gain + } + } + else_if = { + limit = { + exists = scope:method_legitimacy + } + stress_impact = { + stubborn = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + else_if = { + limit = { + exists = scope:method_gold + } + stress_impact = { + stubborn = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + } + else = { + stress_impact = { + stubborn = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = -1 + } + #Peace of God: yielding to the Church's arbitration is preferable to the war that would follow + modifier = { + add = 40 + rite ?= { + rite_has_parameter = tenet_peace_of_god_clergy_peacemaking + } + } + #High church authority + modifier = { + add = 25 + scope:secondary_recipient = { + has_realm_law = church_authority_3 + } + } + modifier = { + add = 10 + scope:secondary_recipient = { + has_realm_law = church_authority_2 + } + } + modifier = { + add = 5 + scope:secondary_recipient = { + has_realm_law = church_authority_1 + } + } + modifier = { + add = 40 + OR = { + exists = scope:method_hook + exists = scope:method_relation + exists = scope:method_piety + exists = scope:method_legitimacy + exists = scope:method_gold + } + } + modifier = { + add = 40 + OR = { + AND = { + exists = scope:method_hook + ai_honor > low_negative_ai_value + } + AND = { + exists = scope:method_relation + ai_compassion > low_negative_ai_value + } + AND = { + exists = scope:method_piety + ai_zeal > low_negative_ai_value + } + AND = { + exists = scope:method_legitimacy + ai_boldness < low_positive_ai_value + } + AND = { + exists = scope:method_gold + ai_greed > low_negative_ai_value + } + } + } + modifier = { + add = 40 + OR = { + AND = { + exists = scope:method_hook + scope:actor = { has_strong_hook = scope:recipient } + } + AND = { + exists = scope:method_relation + #can't take the punishment + spiritual_fulfillment < spiritual_fulfillment_minus_2 + } + AND = { + exists = scope:method_piety + piety_level <= 2 + } + AND = { + exists = scope:method_legitimacy + legitimacy_level <= 2 + } + AND = { + exists = scope:method_gold + treasury_or_gold < medium_gold_value + } + } + } + modifier = { + factor = 0.5 + primary_title = scope:target + NOT = { + scope:target.holder.highest_held_title_tier < scope:actor.highest_held_title_tier + } + } + modifier = { + factor = 0.75 + capital_county = scope:target + #Not just getting vassalized + NOT = { + scope:target.holder.primary_title ?= scope:target + scope:target.holder.highest_held_title_tier < scope:actor.highest_held_title_tier + } + } + #Acceptance should be more likely when it's a matter of vassalage, not title loss + modifier = { + scope:target.holder.primary_title ?= scope:target + scope:target.holder.highest_held_title_tier < scope:actor.highest_held_title_tier + factor = 2 + } + modifier = { + factor = 0.25 + highest_held_title_tier = scope:target.tier + } + modifier = { + factor = 0.5 + highest_held_title_tier_minus_one = scope:target.tier + } + modifier = { + factor = 0.75 + highest_held_title_tier_minus_two = scope:target.tier + } + modifier = { + factor = 0.5 + trigger_if = { + limit = { + exists = scope:method_hook + } + OR = { + has_trait = arrogant + has_trait = ambitious + } + } + trigger_else_if = { + limit = { + exists = scope:method_relation + } + OR = { + has_trait = ambitious + has_trait = greedy + } + } + trigger_else_if = { + limit = { + exists = scope:method_piety + } + OR = { + has_trait = arrogant + has_trait = ambitious + } + } + trigger_else_if = { + limit = { + exists = scope:method_legitimacy + } + OR = { + has_trait = stubborn + has_trait = greedy + } + } + trigger_else_if = { + limit = { + exists = scope:method_gold + } + OR = { + has_trait = stubborn + has_trait = arrogant + } + } + trigger_else = { + OR = { + has_trait = stubborn + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + } + } + } + #Refuse + option = { + trigger = { + #Sorry AI... they can force you out of using this option + NAND = { + scope:recipient = { is_ai = yes } + exists = scope:forced_acceptance + } + } + name = pam_interactions_events.0034.b + show_as_tooltip = { + scope:actor = { + if = { + limit = { + exists = scope:method_relation + } + pam_negotiate_land_relation_effect = yes + } + if = { + limit = { + exists = scope:method_piety + } + pam_negotiate_land_piety_effect = yes + } + if = { + limit = { + exists = scope:method_legitimacy + } + pam_negotiate_land_legitimacy_effect = yes + } + } + clergy_land_refusal_legitimacy_piety_effect = yes + } + #failure event for actor + if = { + limit = { + NOT = { + exists = scope:method_none + } + } + scope:actor = { + add_opinion = { + target = scope:recipient + modifier = refusal_opinion + opinion = { + value = -10 + if = { + limit = { + scope:actor.highest_held_title_tier <= scope:target.tier + } + multiply = 4 + } + else_if = { + limit = { + scope:actor.highest_held_title_tier_minus_one = scope:target.tier + } + multiply = 3 + } + else_if = { + limit = { + scope:actor.highest_held_title_tier_minus_two = scope:target.tier + } + multiply = 2 + } + } + } + } + } + scope:actor = { trigger_event = pam_interactions_events.0036 } + + if = { + limit = { + exists = scope:method_hook + } + stress_impact = { + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + trusting = major_stress_impact_gain + generous = minor_stress_impact_gain + + just = major_stress_impact_gain + } + } + else_if = { + limit = { + exists = scope:method_relation + } + stress_impact = { + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + trusting = medium_stress_impact_gain + generous = major_stress_impact_gain + forgiving = medium_stress_impact_gain + + compassionate = major_stress_impact_gain + } + } + else_if = { + limit = { + exists = scope:method_piety + } + stress_impact = { + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + + zealous = major_stress_impact_gain + } + } + else_if = { + limit = { + exists = scope:method_legitimacy + } + stress_impact = { + craven = major_stress_impact_gain + humble = minor_stress_impact_gain + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + + shy = minor_stress_impact_gain + } + } + else_if = { + limit = { + exists = scope:method_gold + } + stress_impact = { + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + trusting = minor_stress_impact_gain + + greedy = medium_stress_impact_gain + } + } + else = { + stress_impact = { + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + } + ai_chance = { + base = 80 + + modifier = { + ai_boldness < medium_positive_ai_value + current_military_strength < scope:actor.current_military_strength + factor = 0.5 + } + modifier = { + OR = { + AND = { + ai_boldness < medium_positive_ai_value + twice_current_military_strength < scope:actor.current_military_strength + } + AND = { + ai_boldness < medium_negative_ai_value + current_military_strength < scope:actor.current_military_strength + } + } + factor = 0.5 + } + modifier = { + OR = { + AND = { + ai_boldness < medium_positive_ai_value + twice_current_military_strength < scope:actor.half_current_military_strength + } + AND = { + ai_boldness < medium_negative_ai_value + twice_current_military_strength < scope:actor.current_military_strength + } + } + factor = 0.5 + } + + #Reduce based on personality (forecasted in prior event) + modifier = { + factor = 0.1 + trigger_if = { + limit = { + exists = scope:method_hook + } + OR = { + has_trait = trusting + has_trait = just + ai_honor > medium_positive_ai_value + } + } + trigger_else_if = { + limit = { + exists = scope:method_relation + } + OR = { + has_trait = trusting + has_trait = generous + has_trait = forgiving + has_trait = compassionate + ai_compassion > medium_positive_ai_value + } + } + trigger_else_if = { + limit = { + exists = scope:method_piety + } + OR = { + has_trait = zealous + ai_zeal > medium_positive_ai_value + } + } + trigger_else_if = { + limit = { + exists = scope:method_legitimacy + } + OR = { + has_trait = craven + ai_zeal < medium_negative_ai_value + } + } + trigger_else_if = { + limit = { + exists = scope:method_gold + } + OR = { + has_trait = greedy + ai_greed > medium_positive_ai_value + } + } + trigger_else = { + always = no + } + } + } + } +} +#SUCCESS EVENT! For actor +pam_interactions_events.0035 = { + type = character_event + title = pam_interactions_events.0035.t + + desc = { + desc = pam_interactions_events.0035.desc_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:method_hook + } + desc = pam_interactions_events.0035.desc_hook + } + triggered_desc = { + trigger = { + exists = scope:method_relation + } + desc = pam_interactions_events.0035.desc_relation + } + triggered_desc = { + trigger = { + exists = scope:method_piety + } + desc = pam_interactions_events.0035.desc_piety + } + triggered_desc = { + trigger = { + exists = scope:method_legitimacy + } + desc = pam_interactions_events.0035.desc_legitimacy + } + triggered_desc = { + trigger = { + exists = scope:method_gold + } + desc = pam_interactions_events.0035.desc_gold + } + desc = pam_interactions_events.0035.desc_fallback + } + first_valid = { + triggered_desc = { + trigger = { + scope:vassal ?= scope:target.holder + } + desc = pam_interactions_events.0035.desc_vassal + } + desc = pam_interactions_events.0035.desc + } + + } + theme = vassal + override_background = { + reference = holy_site_generic + } + left_portrait = { + character = scope:representative + triggered_animation = { + trigger = { + scope:secondary_recipient = scope:representative + OR = { + scope:representative.faith.religion = religion:catholic_religion + scope:representative.faith.religion = religion:eastern_orthodox_religion + scope:representative.faith.religion = religion:protestant_religion + scope:representative.faith.religion = religion:oriental_orthodox_religion + } + } + animation = divine_gesture_1 + } + triggered_animation = { + trigger = { + scope:actor = { + is_liege_or_above_of = scope:recipient + } + OR = { + scope:representative.faith.religion = religion:catholic_religion + scope:representative.faith.religion = religion:eastern_orthodox_religion + scope:representative.faith.religion = religion:protestant_religion + scope:representative.faith.religion = religion:oriental_orthodox_religion + } + } + animation = divine_gesture_2 + } + animation = reception_groom_left + camera = camera_event_very_left + } + right_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + OR = { + scope:recipient = { + is_vassal_or_below_of = scope:actor + } + scope:recipient.highest_held_title_tier <= scope:actor.highest_held_title_tier_minus_two + } + } + animation = obsequious_bow + } + triggered_animation = { + trigger = { + scope:recipient.faith.religion = religion:islam_religion + } + animation = prayer_muslim + } + animation = prayer_standing + } + lower_center_portrait = scope:actor_non_present + lower_right_portrait = scope:vassal + trigger = { + is_alive = yes + is_imprisoned = no + is_ruler = yes + scope:recipient = { + is_ruler = yes + is_alive = yes + trigger_if = { + limit = { + is_imprisoned = yes + } + imprisoner = { + OR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + } + scope:target.holder ?= { + OR = { + this = scope:recipient + is_vassal_or_below_of = scope:recipient + } + } + } + + immediate = { + #Notify involved vassals before the transfer so the message tooltip still matches + hidden_effect = { + scope:actor = { + every_vassal_or_below = { + limit = { + is_ai = no + NOT = { + this = scope:vassal + } + } + send_interface_message = { + type = msg_liege_gained_title + title = clergy_transfer_land_third_person_tt + left_icon = scope:actor + right_icon = scope:target + scope:actor = { + show_as_tooltip = { ecclesiastic_transfer_land_interaction_transfer_effect = yes } + } + } + } + } + scope:recipient = { + every_vassal_or_below = { + limit = { + is_ai = no + NOT = { + this = scope:vassal + } + } + send_interface_message = { + type = msg_liege_ceded_title + title = clergy_transfer_land_third_person_tt + left_icon = scope:actor + right_icon = scope:target + scope:actor = { + show_as_tooltip = { ecclesiastic_transfer_land_interaction_transfer_effect = yes } + } + } + } + } + scope:secondary_recipient = { + send_interface_message = { + type = msg_accomplice_gained_title + title = clergy_transfer_land_third_person_tt + left_icon = scope:actor + right_icon = scope:target + scope:actor = { + show_as_tooltip = { ecclesiastic_transfer_land_interaction_transfer_effect = yes } + } + } + } + } + if = { + limit = { + exists = scope:method_hook + } + pam_negotiate_land_hook_effect = yes + } + if = { + limit = { + exists = scope:method_relation + } + pam_negotiate_land_relation_accept_effect = yes + } + #Forcing success has a cost + if = { + limit = { + exists = scope:method_piety + pam_negotiate_land_forced_piety_level_trigger = yes + } + pam_negotiate_land_piety_effect = yes + } + #Forcing success has a cost + if = { + limit = { + exists = scope:method_legitimacy + pam_negotiate_land_forced_legitimacy_level_trigger = yes + } + pam_negotiate_land_legitimacy_effect = yes + } + if = { + limit = { + exists = scope:method_gold + } + pam_negotiate_land_gold_effect = yes + } + ecclesiastic_transfer_land_interaction_transfer_effect = yes + if = { + limit = { + exists = scope:clergy_forced_acceptance + } + custom_tooltip = clergy_forced_transfer_acceptance_actor_tt + } + } + option = { + name = pam_interactions_events.0035.a + } +} +#FAIL EVENT! For actor +pam_interactions_events.0036 = { + type = character_event + title = pam_interactions_events.0036.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + OR = { + ai_boldness <= medium_negative_ai_value + AND = { + ai_boldness <= medium_positive_ai_value + current_military_strength < scope:actor.half_current_military_strength + } + } + OR = { + government_has_flag = government_is_republic + government_has_mechanic = administrative + } + } + } + desc = pam_interactions_events.0036.desc_intro_admin + } + triggered_desc = { + trigger = { + scope:recipient = { + OR = { + ai_boldness <= medium_negative_ai_value + AND = { + ai_boldness <= medium_positive_ai_value + current_military_strength < scope:actor.half_current_military_strength + } + } + } + } + desc = pam_interactions_events.0036.desc_intro_afraid + } + triggered_desc = { + trigger = { + scope:recipient = { + ai_zeal >= medium_positive_ai_value + } + } + desc = pam_interactions_events.0036.desc_intro_pious + } + triggered_desc = { + trigger = { + scope:recipient = { + OR = { + government_has_flag = government_is_republic + government_has_mechanic = administrative + } + } + } + desc = pam_interactions_events.0036.desc_intro_admin + } + desc = pam_interactions_events.0036.desc_intro + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:method_hook + } + desc = pam_interactions_events.0036.desc_hook + } + triggered_desc = { + trigger = { + exists = scope:method_relation + } + desc = pam_interactions_events.0036.desc_relation + } + triggered_desc = { + trigger = { + exists = scope:method_piety + } + desc = pam_interactions_events.0036.desc_piety + } + triggered_desc = { + trigger = { + exists = scope:method_legitimacy + } + desc = pam_interactions_events.0036.desc_legitimacy + } + triggered_desc = { + trigger = { + exists = scope:method_gold + } + desc = pam_interactions_events.0036.desc_gold + } + desc = pam_interactions_events.0036.desc_fallback + } + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + OR = { + ai_boldness <= medium_negative_ai_value + AND = { + ai_boldness <= medium_positive_ai_value + current_military_strength < scope:actor.half_current_military_strength + } + } + } + } + desc = pam_interactions_events.0036.desc_afraid + } + triggered_desc = { + trigger = { + scope:recipient = { + ai_zeal >= medium_positive_ai_value + } + } + desc = pam_interactions_events.0036.desc_pious + } + desc = pam_interactions_events.0036.desc + } + } + theme = war + override_background = { + reference = holy_site_generic + } + left_portrait = { + character = scope:representative + triggered_animation = { + trigger = { + scope:actor = { + OR = { + current_military_strength >= scope:representative.twice_current_military_strength + ai_boldness >= medium_positive_ai_value + } + NOT = { + ai_compassion >= medium_positive_ai_value + } + } + } + animation = rage + } + animation = disappointed + camera = camera_event_very_left + } + right_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + scope:recipient = { + OR = { + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:oriental_orthodox_religion + } + OR = { + ai_zeal > medium_positive_ai_value + ai_compassion > medium_positive_ai_value + ai_boldness < low_negative_ai_value + } + current_military_strength < scope:actor.current_military_strength + } + } + animation = prayer_crossing + } + animation = dismissal + } + lower_center_portrait = scope:actor_non_present + lower_right_portrait = scope:vassal + trigger = { + is_alive = yes + is_imprisoned = no + is_ruler = yes + scope:recipient = { + is_ruler = yes + is_alive = yes + trigger_if = { + limit = { + is_imprisoned = yes + } + imprisoner = { + OR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + } + scope:target.holder ?= { + OR = { + this = scope:recipient + is_vassal_or_below_of = scope:recipient + } + } + } + immediate = { + hidden_effect = { + scope:secondary_recipient = { + send_interface_message = { + type = msg_accomplice_gained_title + title = clergy_transfer_land_refused_tt + left_icon = scope:recipient + right_icon = scope:target + custom_tooltip = msg_accomplice_denied_title + } + } + } + #save most important county in target held by recipient + if = { + limit = { + scope:target = { + tier = tier_county + } + } + scope:target = { + random_county_province = { + limit = { + is_county_capital = yes + } + save_scope_as = target_capital + } + } + } + else_if = { + limit = { + scope:target = { + any_de_jure_county = { + this = scope:recipient.capital_county + } + } + } + scope:recipient.capital_county = { + random_county_province = { + limit = { + is_county_capital = yes + } + save_scope_as = target_capital + } + } + } + else_if = { + limit = { + scope:target = { + title_capital_county = { + holder = { + OR = { + this = scope:recipient + any_liege_or_above = { + this = scope:recipient + } + } + } + } + } + } + scope:target = { + title_capital_county = { + random_county_province = { + limit = { + is_county_capital = yes + } + save_scope_as = target_capital + } + } + } + } + else = { + scope:target = { + ordered_de_jure_county = { + order_by = development_level + limit = { + OR = { + holder = scope:recipient + holder = { + any_liege_or_above = { + this = scope:recipient + } + } + } + } + random_county_province = { + limit = { + is_county_capital = yes + } + save_scope_as = target_capital + } + } + } + } + scope:recipient = { custom_tooltip = clergy_land_transfer_refusal_tt } + if = { + limit = { + exists = scope:method_relation + } + pam_negotiate_land_relation_effect = yes + } + if = { + limit = { + exists = scope:method_piety + } + pam_negotiate_land_piety_effect = yes + } + if = { + limit = { + exists = scope:method_legitimacy + } + pam_negotiate_land_legitimacy_effect = yes + } + clergy_land_refusal_legitimacy_piety_effect = yes + } + option = { + name = { + trigger = { + exists = scope:method_relation + } + text = pam_interactions_events.0036.a_relation + } + name = { + trigger = { + NOT = { exists = scope:method_relation } + } + text = pam_interactions_events.0036.a + } + } +} +#Non-recipient holder of target title is informed they're being transferred +pam_interactions_events.0037 = { + type = letter_event + opening = { + desc = pam_interactions_events.0037.opening + } + sender = scope:recipient + desc = pam_interactions_events.0037.desc + + immediate = { + custom_tooltip = pam_interactions_events.0037_new_liege_tt + } + #I can refuse! (player only) + option = { + trigger = { + scope:recipient = { + NOT = { has_realm_law = crown_authority_3 } + } + NOT = { + government_has_mechanic = administrative + } + } + show_as_unavailable = { + always = yes + } + name = pam_interactions_events.0037.a + flavor = pam_interactions_events.0037.a.tt + + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = yes + } + becomes_independent = { + change = scope:change + } + resolve_title_and_vassal_change = scope:change + + add_piety = clergy_land_refusal_small_piety_value + add_piety_experience = clergy_land_refusal_small_piety_value + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = clergy_land_refusal_small_legitimacy_vassal_value + } + else = { + add_prestige = clergy_land_refusal_small_prestige_vassal_value + } + reverse_add_opinion = { + modifier = refused_vassal_transfer + target = scope:secondary_recipient + opinion = -50 + } + reverse_add_opinion = { + modifier = refused_vassal_transfer + target = scope:actor + opinion = -80 + } + reverse_add_opinion = { + modifier = refused_vassal_transfer + target = scope:recipient + opinion = -20 + } + scope:actor = { + progress_towards_rival_effect = { + REASON = rival_refused_vassal_transfer + CHARACTER = root + OPINION = 0 + } + } + set_variable = { + name = refused_transfer_target + value = scope:actor + years = 10 + } + set_variable = { + name = refused_transfer_liege + value = scope:recipient + years = 10 + } + + + stress_impact = { + arrogant = medium_stress_impact_loss + fickle = medium_stress_impact_loss + stubborn = minor_stress_impact_loss + + zealous = major_stress_impact_gain + trusting = major_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + option = { + name = pam_interactions_events.0037.b + flavor = pam_interactions_events.0037.b.tt + } +} +#fire toast from clergy land interaction for actor +pam_interactions_events.0038 = { + hidden = yes + immediate = { + send_interface_toast = { + type = event_toast_effect_neutral + title = clergy_land_transfer_acceptance_tt + left_icon = scope:secondary_recipient + show_as_tooltip = { + #You promised the church could inherit this title if it is ever without heirs + if = { + limit = { + scope:promise_church_succession = yes + } + scope:actor = { + set_fallback_succession_title = scope:secondary_recipient.primary_title + } + } + if = { + limit = { + scope:donate_faith = yes + } + pay_short_term_gold = { + target = scope:secondary_recipient + gold = scope:actor.medium_gold_value + } + } + if = { + limit = { + scope:use_hook = yes + has_usable_hook = scope:secondary_recipient + } + use_hook = scope:secondary_recipient + } + if = { + limit = { + scope:offer_hook = yes + } + scope:secondary_recipient = { + add_hook = { + type = strong_obligation_hook + target = scope:actor + } + } + } + if = { + limit = { + scope:offer_pilgrimage = yes + } + scope:actor = { + add_character_modifier = { + modifier = promised_pilgrimage_to_clergy_modifier + years = 10 + } + } + } + if = { + limit = { + scope:threaten_priest = yes + } + if = { + limit = { + scope:secondary_recipient = { + this = scope:actor.faith.religious_head + } + } + change_spiritual_fulfillment = massive_spiritual_fulfillment_loss + add_piety_experience = massive_piety_loss + custom_tooltip = hof_increase_piety_sp_fulfillment_loss_secondary_tt + } + else = { + change_spiritual_fulfillment = major_spiritual_fulfillment_loss + add_piety_experience = major_piety_loss + } + scope:secondary_recipient = { + add_opinion = { + modifier = threatened_church_opinion + target = scope:actor + opinion = -50 + } + } + } + } + } + } +} +#Non-recipient holder of target title is informed their admin governorship is revoked and transferred +pam_interactions_events.0039 = { + type = letter_event + opening = { + desc = pam_interactions_events.0039.opening + } + sender = scope:recipient + desc = pam_interactions_events.0039.desc + + immediate = { + custom_tooltip = pam_interactions_events.0039_revoked_governorship_tt + custom_tooltip = pam_interactions_events.0039_governorship_transfer_tt + } + option = { + name = pam_interactions_events.0039.a + } +} +#Delayed rivalry gain from title granting controversy +pam_interactions_events.0040 = { + hidden = yes + trigger = { + is_alive = yes + OR = { + AND = { + has_variable_list = denied_hegemony + any_in_list = { + variable = denied_hegemony + this = scope:puppet_or_actor + } + } + AND = { + has_variable_list = denied_empire + any_in_list = { + variable = denied_empire + this = scope:puppet_or_actor + } + } + AND = { + has_variable_list = denied_kingdom + any_in_list = { + variable = denied_kingdom + this = scope:puppet_or_actor + } + } + AND = { + has_variable_list = denied_duchy + any_in_list = { + variable = denied_duchy + this = scope:puppet_or_actor + } + } + AND = { + has_variable_list = denied_county + any_in_list = { + variable = denied_county + this = scope:puppet_or_actor + } + } + } + } + immediate = { + save_scope_as = rival_claimant + + if = { + limit = { + has_relation_potential_rival = scope:puppet_or_actor + } + scope:puppet_or_actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = claim_granting_rivalry.t + left_icon = root + + root = { + progress_towards_rival_effect = { + REASON = rival_gave_away_my_claim + CHARACTER = scope:puppet_or_actor + OPINION = 0 + } + } + custom_tooltip = ignored_claimant_tt + } + } + + } + else = { + progress_towards_rival_effect = { + REASON = rival_gave_away_my_claim + CHARACTER = scope:puppet_or_actor + OPINION = 0 + } + } + } +} + +#Post divorce refusal event +pam_interactions_events.0050 = { + type = letter_event + opening = { + desc = pam_interactions_events.0050.opening + } + sender = scope:puppet_or_actor + desc = pam_interactions_events.0050.desc + + #Become celibate, obviously + option = { + trigger = { + learning > extremely_high_skill_rating + scope:puppet_or_actor = { is_ai = yes } + NOR = { + rite = { + trait_is_virtue_rite = lustful + } + rite = { + trait_is_sin_rite = chaste + } + scope:puppet_or_actor = { + has_trait = lustful + } + } + } + name = pam_interactions_events.0050.aa + flavor = pam_interactions_events.0050.aa.tt + add_learning_lifestyle_xp = minor_lifestyle_xp + + scope:puppet_or_actor = { + add_trait = celibate + if = { + limit = { + NOR = { + has_trait = gregarious + has_trait = reclusive + } + } + random = { + chance = { + value = 10 + if = { + limit = { + ai_sociability <= high_negative_ai_value + } + add = 20 + } + if = { + limit = { + ai_sociability < 0 + } + add = 20 + } + } + add_trait = reclusive + } + } + + } + stress_impact = { + lustful = major_stress_impact_gain + gregarious = minor_stress_impact_gain + } + } + + #God wants you to give your love another chance (good) + option = { + trigger = { + OR = { + diplomacy >= very_high_skill_rating + has_trait = family_first + piety_level >= 5 + } + scope:puppet_or_actor = { + is_imprisoned = no + is_incapable = no + } + scope:secondary_recipient = { + is_imprisoned = no + is_incapable = no + } + } + name = pam_interactions_events.0050.a + flavor = pam_interactions_events.0050.a.tt + + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + + scope:puppet_or_actor = { + if = { + limit = { + is_ai = yes + } + if = { + limit = { + NOT = { has_relation_lover = scope:secondary_recipient } + scope:secondary_recipient = { + is_ai = yes + } + } + set_relation_lover = { + target = scope:secondary_recipient + reason = lover_rekindled_marriage + } + } + else = { + add_opinion = { + target = scope:secondary_recipient + modifier = loyalty_opinion + opinion = 50 + } + reverse_add_opinion = { + target = scope:secondary_recipient + modifier = loyalty_opinion + opinion = 50 + } + } + + + add_opinion = { + target = scope:recipient + modifier = grateful_opinion + opinion = 40 + } + add_character_modifier = { + modifier = rekindled_marriage_modifier + years = 10 + desc = rekindled_marriage_compassion_tt + } + custom_tooltip = rekindled_marriage_compassion_tt + } + else = { + add_character_modifier = { + modifier = rekindled_marriage_modifier + years = 10 + } + } + } + scope:secondary_recipient = { + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:recipient + modifier = grateful_opinion + opinion = 40 + } + add_character_modifier = { + modifier = rekindled_marriage_modifier + years = 10 + desc = rekindled_marriage_compassion_tt + } + custom_tooltip = rekindled_marriage_compassion_tt + } + else = { + add_character_modifier = { + modifier = rekindled_marriage_modifier + years = 10 + } + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + fickle = medium_stress_impact_gain + } + } + #God wants you to give your love another chance (normal) + option = { + trigger = { + NOR = { + diplomacy >= very_high_skill_rating + has_trait = family_first + piety_level >= 5 + } + scope:puppet_or_actor = { + is_imprisoned = no + is_incapable = no + } + scope:secondary_recipient = { + is_imprisoned = no + is_incapable = no + } + } + name = pam_interactions_events.0050.b + + change_spiritual_fulfillment = miniscule_spiritual_fulfillment_value + + scope:puppet_or_actor = { + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:secondary_recipient + modifier = loyalty_opinion + opinion = 30 + } + add_opinion = { + target = scope:recipient + modifier = grateful_opinion + opinion = 15 + } + add_character_modifier = { + modifier = rekindled_marriage_modifier_small + years = 10 + desc = rekindled_marriage_compassion_small_tt + } + custom_tooltip = rekindled_marriage_compassion_small_tt + } + else = { + add_character_modifier = { + modifier = rekindled_marriage_modifier_small + years = 10 + } + } + } + scope:secondary_recipient = { + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:puppet_or_actor + modifier = loyalty_opinion + opinion = 30 + } + add_opinion = { + target = scope:recipient + modifier = grateful_opinion + opinion = 15 + } + add_character_modifier = { + modifier = rekindled_marriage_modifier_small + years = 5 + desc = rekindled_marriage_compassion_small_tt + } + custom_tooltip = rekindled_marriage_compassion_small_tt + } + else = { + add_character_modifier = { + modifier = rekindled_marriage_modifier_small + years = 5 + } + } + } + stress_impact = { + compassionate = miniscule_stress_impact_loss + forgiving = miniscule_stress_impact_loss + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + fickle = medium_stress_impact_gain + } + } + #you are a sinful liar and deserve your misery + option = { + name = pam_interactions_events.0050.c + + if = { + limit = { + OR = { + scope:divorce_justified ?= yes + exists = scope:ai_divorce_justified + } + } + add_piety = { + value = major_piety_gain + } + scope:puppet_or_actor = { + add_piety_level = -1 + } + } + else = { + add_piety = { + value = minor_piety_gain + } + scope:puppet_or_actor = { + add_piety_experience = medium_piety_loss + } + } + progress_towards_rival_effect = { + REASON = rival_called_out_sin + CHARACTER = scope:puppet_or_actor + OPINION = 0 + } + scope:puppet_or_actor = { + add_opinion = { + target = scope:recipient + modifier = angry_opinion + opinion = -20 + } + } + scope:secondary_recipient = { + add_opinion = { + target = scope:puppet_or_actor + modifier = hate_opinion + opinion = -50 + } + } + stress_impact = { + zealous = minor_stress_impact_loss + just = minor_stress_impact_loss + forgiving = major_stress_impact_gain + compassionate = medium_stress_impact_gain + } + } + #Just sort your life out + option = { + name = pam_interactions_events.0050.d + } +} + +#Cleric is granting divorce, but can pick side effects +pam_interactions_events.0060 = { + type = character_event + title = pam_interactions_events.0060.t + + desc = pam_interactions_events.0060.desc + theme = marriage + override_background = { + reference = relaxing_room + } + left_portrait = { + character = scope:puppet_or_actor + + triggered_animation = { + trigger = { + scope:puppet_or_actor = { + opinion = { + target = scope:secondary_recipient + value >= 50 + } + } + } + animation = sadness + } + animation = dismissal + camera = camera_event_center_pointing_left + } + right_portrait = { + character = scope:secondary_recipient + triggered_animation = { + trigger = { + scope:secondary_recipient = { + opinion = { + target = scope:puppet_or_actor + value >= 100 + } + } + } + animation = mental_anguish + } + triggered_animation = { + trigger = { + scope:secondary_recipient = { + opinion = { + target = scope:puppet_or_actor + value >= 50 + } + } + } + animation = grief + } + animation = stress + camera = camera_event_right_pointing_left + } + lower_center_portrait = scope:forcing_divorce + lower_left_portrait = scope:lease_order.leader + immediate = { + scope:divorcer = { + save_scope_as = puppet_or_actor + } + scope:puppet_or_actor = { + save_scope_as = bg_override_char + } + #set up order to lease land to + if = { + limit = { + scope:puppet_or_actor = { + divorce_can_cause_holy_order_lease_trigger = yes + } + } + #military order + if = { + limit = { + scope:puppet_or_actor = { + any_held_title = { + title_tier = county + any_county_province = { + barony = { + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = scope:puppet_or_actor } + } + } + } + faith = { + any_faith_holy_order = { + leader ?= { + government_has_flag = government_is_military_holy_order + } + holy_order_range_trigger = { CHARACTER = scope:recipient } + } + } + } + } + scope:puppet_or_actor.faith = { + random_faith_holy_order = { + limit = { + holy_order_patron ?= scope:recipient + leader ?= { + government_has_flag = government_is_military_holy_order + } + holy_order_range_trigger = { CHARACTER = scope:recipient } + } + alternative_limit = { + leader ?= { + government_has_flag = government_is_military_holy_order + } + holy_order_range_trigger = { CHARACTER = scope:recipient } + } + save_scope_as = lease_order + } + } + scope:puppet_or_actor = { + random_held_title = { + title_tier = county + limit = { + any_county_province = { + barony = { + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = scope:puppet_or_actor } + } + } + NOT = { + this = scope:puppet_or_actor.capital_county + } + } + alternative_limit = { + any_county_province = { + barony = { + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = scope:puppet_or_actor } + } + } + } + random_county_province = { + limit = { + barony = { + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = scope:puppet_or_actor } + } + } + barony = { + save_scope_as = barony_to_lease + } + } + } + } + } + #monastic order + if = { + limit = { + NOT = { + exists = scope:lease_order + } + } + scope:puppet_or_actor.faith = { + random_faith_holy_order = { + limit = { + holy_order_patron ?= scope:recipient + holy_order_range_trigger = { CHARACTER = scope:recipient } + } + alternative_limit = { + holy_order_range_trigger = { CHARACTER = scope:recipient } + } + save_scope_as = lease_order + } + } + scope:puppet_or_actor = { + random_held_title = { + title_tier = county + limit = { + any_county_province = { + barony = { + barony_is_valid_for_monastic_order_lease_trigger = { CHARACTER = scope:puppet_or_actor } + } + } + NOT = { + this = scope:puppet_or_actor.capital_county + } + } + alternative_limit = { + any_county_province = { + barony = { + barony_is_valid_for_monastic_order_lease_trigger = { CHARACTER = scope:puppet_or_actor } + } + } + } + random_county_province = { + limit = { + barony = { + barony_is_valid_for_monastic_order_lease_trigger = { CHARACTER = scope:puppet_or_actor } + } + } + barony = { + save_scope_as = barony_to_lease + } + } + } + } + } + } + #Set up order to accept divorcee (but you get them as courtier) + if = { + limit = { + scope:puppet_or_actor = { divorce_can_put_spouse_in_monastery_trigger = yes } + } + if = { + limit = { + scope:lease_order ?= { + leader = { + government_has_flag = government_is_monastic_holy_order + trigger_if = { + limit = { + scope:secondary_recipient = { + is_male = yes + } + } + NOT = { + has_realm_law = female_monastic_holy_order_succession_law + } + } + trigger_else = { + NOT = { + has_realm_law = male_monastic_holy_order_succession_law + } + } + } + } + } + scope:lease_order = { + save_scope_as = divorcee_joining_order + leader.primary_title = { + save_scope_as = joining_order_title + } + } + } + else = { + scope:puppet_or_actor.faith = { + random_faith_holy_order = { + limit = { + holy_order_patron ?= scope:recipient + holy_order_range_trigger = { CHARACTER = scope:recipient } + leader ?= { + government_has_flag = government_is_monastic_holy_order + } + } + alternative_limit = { + holy_order_range_trigger = { CHARACTER = scope:recipient } + leader ?= { + government_has_flag = government_is_monastic_holy_order + trigger_if = { + limit = { + scope:secondary_recipient = { + is_male = yes + } + } + NOT = { + has_realm_law = female_monastic_holy_order_succession_law + } + } + trigger_else = { + NOT = { + has_realm_law = male_monastic_holy_order_succession_law + } + } + } + } + save_scope_as = divorcee_joining_order + leader.primary_title = { + save_scope_as = joining_order_title + } + } + } + } + } + } + #house feud + option = { + trigger = { + scope:puppet_or_actor = { + divorce_can_cause_house_feud_trigger = yes + } + } + name = pam_interactions_events.0060.a + flavor = pam_interactions_events.0060.a.tt + show_as_tooltip = { + divorce_house_feud_effect = yes + } + scope:puppet_or_actor = { + add_opinion = { + target = scope:recipient + modifier = outraged_opinion + opinion = -50 + } + } + scope:secondary_recipient = { + add_opinion = { + target = scope:recipient + modifier = outraged_opinion + opinion = -50 + } + } + scope:puppet_or_actor.house.house_head = { + if = { + limit = { + NOR = { + this = scope:puppet_or_actor + this = scope:recipient + } + } + add_opinion = { + target = scope:recipient + modifier = outraged_opinion + opinion = -50 + } + } + } + scope:secondary_recipient.house.house_head = { + if = { + limit = { + NOR = { + this = scope:secondary_recipient + this = scope:recipient + } + } + add_opinion = { + target = scope:recipient + modifier = outraged_opinion + opinion = -50 + } + } + } + custom_tooltip = divorce_cleric_perspective_tt + save_scope_as = price_feud + stress_impact = { + zealous = miniscule_stress_impact_loss + content = minor_stress_impact_gain + craven = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 50000 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + ai_boldness = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:puppet_or_actor + multiplier = -2 + } + opinion_modifier = { + who = root + opinion_target = scope:secondary_recipient + multiplier = -2 + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = compassionate + has_trait = forgiving + has_trait = craven + has_trait = humble + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:puppet_or_actor } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:secondary_recipient } + } + } + } + } + #holy order lease + option = { + trigger = { + exists = scope:lease_order + scope:puppet_or_actor = { + divorce_can_cause_holy_order_lease_trigger = yes + } + } + if = { + limit = { + scope:lease_order.leader = { + government_has_flag = government_is_monastic_holy_order + } + } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + } + add_piety = medium_piety_gain + name = pam_interactions_events.0060.b + flavor = pam_interactions_events.0060.b.tt + show_as_tooltip = { + divorce_holy_order_lease_effect = yes + } + scope:puppet_or_actor = { + add_opinion = { + target = scope:recipient + modifier = audacity_opinion + opinion = -25 + } + } + custom_tooltip = divorce_cleric_perspective_tt + save_scope_as = price_lease + stress_impact = { + zealous = miniscule_stress_impact_loss + content = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_zeal = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:puppet_or_actor + multiplier = -1.5 + } + opinion_modifier = { + who = root + opinion_target = scope:secondary_recipient + multiplier = 0.5 + } + modifier = { + add = -50 + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:puppet_or_actor } + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = forgiving + } + } + } + } + #hook + option = { + trigger = { + scope:puppet_or_actor = { + divorce_can_cause_hook_trigger = yes + } + } + name = pam_interactions_events.0060.c + show_as_tooltip = { + divorce_get_hook_effect = yes + } + if = { + limit = { + exists = scope:forcing_divorce + } + scope:forcing_divorce = { + add_opinion = { + target = scope:recipient + modifier = audacity_opinion + opinion = -25 + } + } + } + else = { + scope:puppet_or_actor = { + add_opinion = { + target = scope:recipient + modifier = audacity_opinion + opinion = -25 + } + } + } + + custom_tooltip = divorce_cleric_perspective_tt + save_scope_as = price_hook + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + generous = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 125 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_greed = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:puppet_or_actor + multiplier = -0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:secondary_recipient + multiplier = 0.5 + } + modifier = { + add = 40 + exists = scope:forcing_divorce + scope:forcing_divorce.highest_held_title_tier_minus_two > scope:puppet_or_actor.highest_held_title_tier + } + modifier = { + add = 20 + exists = scope:forcing_divorce + scope:forcing_divorce.highest_held_title_tier_minus_one > scope:puppet_or_actor.highest_held_title_tier + } + modifier = { + add = 10 + exists = scope:forcing_divorce + scope:forcing_divorce.highest_held_title_tier > scope:puppet_or_actor.highest_held_title_tier + } + modifier = { + add = 50 + exists = scope:forcing_divorce + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:forcing_divorce } + } + modifier = { + add = -50 + exists = scope:forcing_divorce + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:forcing_divorce } + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = content + has_trait = humble + has_trait = forgiving + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:secondary_recipient } + } + } + } + } + #monk/nun + option = { + trigger = { + exists = scope:divorcee_joining_order + scope:puppet_or_actor = { + divorce_can_put_spouse_in_monastery_trigger = yes + } + } + name = pam_interactions_events.0060.d + flavor = pam_interactions_events.0060.d.tt + if = { + limit = { + scope:secondary_recipient.house.house_head ?= { + highest_held_title_tier >= tier_barony + } + } + add_piety = { + value = minor_piety_gain + multiply = { + value = scope:secondary_recipient.house.house_head.highest_held_title_tier + subtract = 1 + } + } + } + else = { + add_piety = miniscule_piety_gain + } + show_as_tooltip = { + divorce_put_spouse_in_monastery_effect = yes + } + scope:secondary_recipient = { + add_opinion = { + target = scope:recipient + modifier = confusion_opinion + opinion = -25 + } + } + custom_tooltip = divorce_cleric_perspective_tt + save_scope_as = price_vows + stress_impact = { + chaste = minor_stress_impact_loss + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_greed = -1 + } + opinion_modifier = { + who = root + opinion_target = scope:puppet_or_actor + multiplier = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:secondary_recipient + multiplier = -2 + } + modifier = { + add = -50 + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:secondary_recipient } + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:puppet_or_actor } + } + } + } + } + #no extra effects + option = { + name = pam_interactions_events.0060.e + custom_tooltip = divorce_cleric_perspective_tt + if = { + limit = { + exists = scope:forcing_divorce + } + scope:forcing_divorce = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + else = { + scope:puppet_or_actor = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + + save_scope_as = price_none + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -1 + ai_boldness = -1 + ai_zeal = -1 + ai_greed = -1 + } + opinion_modifier = { + who = root + opinion_target = scope:puppet_or_actor + multiplier = 1.5 + } + opinion_modifier = { + who = root + opinion_target = scope:secondary_recipient + multiplier = 1.5 + } + } + } + after = { + #Divorce might have been caused by House Head, who is bearing the brunt of it + if = { + limit = { + exists = scope:forcing_divorce + } + scope:forcing_divorce = { + trigger_event = religious_interaction.6 + } + } + else = { + scope:puppet_or_actor = { + trigger_event = religious_interaction.1 + } + } + } +} + +#Incite holy war event for character being incited +pam_interactions_events.0070 = { + type = character_event + title = pam_interactions_events.0070.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:puppet_or_actor.religion = { is_in_family = rf_pagan } + } + scope:recipient.religion = { is_in_family = rf_pagan } + } + desc = pam_interactions_events.0070.desc_intro_pagan + } + triggered_desc = { + trigger = { + scope:recipient.religion = scope:puppet_or_actor.religion + } + desc = pam_interactions_events.0070.desc_intro_heretic + } + triggered_desc = { + trigger = { + scope:puppet_or_actor.religion = religion:islam_religion + } + desc = pam_interactions_events.0070.desc_intro_infidel + } + desc = pam_interactions_events.0070.desc_intro_heathen + } + desc = pam_interactions_events.0070.desc + first_valid = { + triggered_desc = { + trigger = { + scope:join_war ?= yes + } + desc = pam_interactions_events.0070.desc_outro_joining_war + } + triggered_desc = { + trigger = { + scope:fund_war ?= yes + } + desc = pam_interactions_events.0070.desc_outro_funding_war + } + } + } + theme = war + override_background = { + reference = temple + } + left_portrait = { + character = scope:puppet_or_actor + animation = condemnation + camera = camera_torso_scheme_player + } + widgets = { + widget = { + is_shown = { + OR = { + root.faith.religion = religion:catholic_religion + root.faith.religion = religion:protestant_religion + root.faith.religion = religion:eastern_orthodox_religion + root.faith.religion = religion:oriental_orthodox_religion + } + } + gui = event_window_widget_vfx_stained_glass + container = background_shader_vfx_container + } + widget = { + is_shown = { + OR = { + root.faith.religion = religion:catholic_religion + root.faith.religion = religion:protestant_religion + root.faith.religion = religion:eastern_orthodox_religion + root.faith.religion = religion:oriental_orthodox_religion + } + } + gui = "event_window_widget_vfx_conclusion_smoke" + container = "background_shader_vfx_container" + } + } + lower_right_portrait = scope:recipient + immediate = { + play_music_cue = "mx_cue_anathema" + scope:puppet_or_actor = { + save_scope_as = bg_override_char + } + } + #Accept + option = { + name = pam_interactions_events.0070.a + show_as_tooltip = { + pam_incite_holy_war_effect = yes + } + scope:actor = { trigger_event = pam_interactions_events.0071 } + } + #refuse + option = { + name = pam_interactions_events.0070.b + scope:recipient = { + add_opinion = { + target = root + modifier = paid_me_respect + opinion = { + value = 20 + multiply = { + value = scope:target.tier + subtract = 1 + } + } + } + } + if = { + limit = { + NOT = { + culture = scope:recipient.culture + } + any_sub_realm_county = { + culture = root.culture + faith = root.faith + } + scope:recipient = { + any_sub_realm_county = { + culture = scope:recipient.culture + faith = scope:recipient.faith + } + } + } + culture = { + if = { + limit = { + scope:target.tier >= tier_kingdom + } + change_cultural_acceptance = { + target = scope:recipient.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_refused_incited_holy_war + } + } + else_if = { + limit = { + scope:target.tier >= tier_duchy + } + change_cultural_acceptance = { + target = scope:recipient.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_refused_incited_holy_war + } + } + else = { + change_cultural_acceptance = { + target = scope:recipient.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_refused_incited_holy_war + } + } + } + } + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = refused_incite_war.t + left_icon = root + root = { pam_incite_war_refusal_effect = yes } + } + } + scope:puppet_or_actor = { + add_opinion = { + target = scope:secondary_recipient + modifier = refusal_opinion + opinion = { + value = -25 + multiply = { + value = scope:target.tier + subtract = 1 + } + } + } + } + if = { + limit = { + scope:target.tier >= tier_duchy + } + progress_towards_rival_effect = { + REASON = rival_refused_call_to_holy_war + CHARACTER = scope:puppet_or_actor + OPINION = 0 + } + } + ai_chance = { + base = 0 + } + } +} +#Incite holy war event for actor +pam_interactions_events.0071 = { + type = character_event + title = pam_interactions_events.0071.t + desc = { + + desc = pam_interactions_events.0071.desc_intro + first_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:puppet_or_actor.religion = { is_in_family = rf_pagan } + } + scope:recipient.religion = { is_in_family = rf_pagan } + } + desc = pam_interactions_events.0071.desc_intro_pagan + } + triggered_desc = { + trigger = { + scope:recipient.religion = scope:puppet_or_actor.religion + } + desc = pam_interactions_events.0071.desc_intro_heretic + } + triggered_desc = { + trigger = { + scope:puppet_or_actor.religion = religion:islam_religion + } + desc = pam_interactions_events.0071.desc_intro_infidel + } + desc = pam_interactions_events.0071.desc_intro_heathen + } + first_valid = { + triggered_desc = { + trigger = { + scope:join_war ?= yes + } + desc = pam_interactions_events.0071.desc_outro_joining_war + } + triggered_desc = { + trigger = { + scope:rally_crusaders ?= yes + } + desc = pam_interactions_events.0071.desc_outro_rally_crusaders + } + triggered_desc = { + trigger = { + scope:fund_war ?= yes + } + desc = pam_interactions_events.0071.desc_outro_funding_war + } + } + } + theme = war + override_background = { + reference = temple + } + left_portrait = { + character = scope:secondary_recipient + animation = prayer_standing_eyes + camera = camera_event_center_moved_left + } + right_portrait = { + character = scope:knight + animation = throne_room_two_handed_passive_1 + camera = camera_event_very_right_far + hide_info = yes + } + widgets = { + widget = { + is_shown = { + OR = { + root.faith.religion = religion:catholic_religion + root.faith.religion = religion:protestant_religion + root.faith.religion = religion:eastern_orthodox_religion + root.faith.religion = religion:oriental_orthodox_religion + } + } + gui = event_window_widget_vfx_stained_glass + container = background_shader_vfx_container + } + } + lower_right_portrait = scope:recipient + immediate = { + play_music_cue = "mx_cue_deus_hoc_vult" + scope:secondary_recipient = { + save_scope_as = bg_override_char + if = { + limit = { + age >= 12 + is_incapable = no + } + add_character_flag = need_military_outfit + } + } + pam_incite_holy_war_effect = yes + scope:secondary_recipient = { + random_knight = { + limit = { + culture = scope:secondary_recipient.culture + is_available_quick = { + alive = yes + imprisoned = no + incapable = no + } + } + alternative_limit = { + is_available_quick = { + alive = yes + imprisoned = no + incapable = no + } + } + save_scope_as = knight + add_character_flag = need_military_outfit + } + } + } + #neat, I made this happen + option = { + name = pam_interactions_events.0071.a + } + after = { + scope:knight ?= { + remove_character_flag = need_military_outfit + } + } +} +#Incite holy war letter event for heathen +pam_interactions_events.0072 = { + type = letter_event + opening = { + desc = pam_interactions_events.0072.opening + } + sender = scope:puppet_or_actor + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:puppet_or_actor = { + any_character_war = { + primary_attacker = scope:secondary_recipient + primary_defender = scope:recipient + } + } + } + desc = pam_interactions_events.0072.desc_joined_war + } + desc = pam_interactions_events.0072.desc + } + } + + trigger = { + scope:puppet_or_actor = { + is_alive = yes + is_imprisoned = no + } + } + immediate = { + custom_tooltip = incite_holy_war_past_tense_tt + if = { + limit = { + scope:puppet_or_actor = { + any_character_war = { + primary_attacker = scope:secondary_recipient + primary_defender = scope:recipient + } + } + } + custom_tooltip = incite_holy_war_joined_tt + } + } + + #damn fanatics + option = { + name = pam_interactions_events.0072.a + } +} + +# Request White Peace interaction +pam_interactions_events.0080 = { + type = letter_event + opening = pam_interactions_events.0080.opening + desc = pam_interactions_events.0080 + sender = scope:recipient + + option = { + name = pam_interactions_events.0080.a + } +} + +# Request Enforce Succession — letter to actor +pam_interactions_events.0081 = { + type = letter_event + opening = pam_interactions_events.0081.opening + desc = pam_interactions_events.0081.desc + sender = scope:recipient + + option = { + name = pam_interactions_events.0081.a + custom_tooltip = request_enforced_succession_effect_tt + show_as_tooltip = { + scope:succession_holder = { + add_opinion = { + target = scope:actor + modifier = meddling_church_opinion + } + } + } + } +} + +# Request Enforce Succession — letter to the title holder +pam_interactions_events.0082 = { + type = letter_event + opening = pam_interactions_events.0082.opening + desc = pam_interactions_events.0082.desc + sender = scope:recipient + + option = { + name = pam_interactions_events.0082.a + custom_tooltip = request_enforced_succession_effect_tt + } +} + +# Request Victory — letter to the defeated opponent +pam_interactions_events.0083 = { + type = letter_event + opening = pam_interactions_events.0083.opening + desc = pam_interactions_events.0083.desc + sender = scope:recipient + + option = { + name = pam_interactions_events.0083.a + show_as_tooltip = { + add_character_modifier = { + modifier = pam_church_compensation_modifier + years = 10 + } + } + } +} + +# Request White Peace: letter to a player opponent, who may comply or defy +pam_interactions_events.0084 = { + type = letter_event + opening = pam_interactions_events.0080.opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:white_peace_war = { + casus_belli = { primary_defender = root } + } + } + desc = pam_interactions_events.0084.defender + } + desc = pam_interactions_events.0084 + } + } + sender = scope:recipient + + trigger = { + exists = scope:white_peace_war + scope:puppet_or_actor = { is_at_war_with = root } + } + + option = { + name = pam_interactions_events.0084.a + # The war can end before the letter is answered + if = { + limit = { + exists = scope:white_peace_war + scope:puppet_or_actor = { is_at_war_with = root } + } + custom_tooltip = pam_interactions_events.0084.a.tt + hidden_effect = { pam_enforce_requested_white_peace_effect = yes } + add_piety = minor_piety_gain + } + ai_chance = { base = 100 } + } + + option = { + name = pam_interactions_events.0084.b + trigger = { + exists = scope:white_peace_war + scope:puppet_or_actor = { is_at_war_with = root } + } + add_piety = medium_piety_loss + add_character_modifier = { + modifier = pam_defied_church_peace_modifier + years = 10 + } + scope:recipient = { + add_opinion = { + target = root + modifier = pam_defied_church_peace_opinion + } + } + hidden_effect = { + set_variable = { + name = pam_defied_church_peace_cleric + value = scope:recipient + years = 10 + } + save_scope_as = defier + scope:recipient = { + trigger_event = { + id = pam_interactions_events.0085 + days = { 30 90 } + } + } + scope:puppet_or_actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = pam_white_peace_defied_toast + custom_tooltip = pam_white_peace_defied_toast_desc + left_icon = root + right_icon = scope:recipient + } + } + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_white_peace_defied_toast + custom_tooltip = pam_white_peace_defied_toast_desc + left_icon = root + right_icon = scope:puppet_or_actor + } + } + if = { + limit = { + scope:is_puppet_action ?= yes + scope:actor != scope:recipient + } + scope:actor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_white_peace_defied_toast + custom_tooltip = pam_white_peace_defied_toast_desc + left_icon = root + right_icon = scope:recipient + } + } + } + } + ai_chance = { base = 0 } + } +} + +# Request White Peace: the defied cleric may excommunicate the defier +pam_interactions_events.0085 = { + hidden = yes + + trigger = { + is_ai = yes + scope:defier ?= { + is_alive = yes + var:pam_defied_church_peace_cleric ?= root + } + is_character_interaction_valid = { + recipient = scope:defier + interaction = excommunicate_interaction + } + } + + immediate = { + random = { + chance = { + value = 25 + add = { + value = ai_vengefulness + multiply = 0.25 + } + min = 5 + } + run_interaction = { + interaction = excommunicate_interaction + actor = root + recipient = scope:defier + execute_threshold = accept + } + } + } +} + +#Consecrate kingdom letter event +pam_interactions_events.0090 = { + type = letter_event + opening = { + desc = pam_interactions_events.0090.opening + } + sender = scope:recipient + desc = pam_interactions_events.0090.desc + + immediate = { + scope:recipient = { + consecrate_kingdom_player_cleric_effect = yes + consecrate_kingdom_effect = yes + } + } + option = { + name = pam_interactions_events.0090.a + flavor = pam_interactions_events.0090.a.flavor + } +} +#Bestow title confirmation event for actor +pam_interactions_events.0091 = { + type = letter_event + opening = { + desc = pam_interactions_events.0091.opening + } + sender = scope:recipient + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:gain_weak_hook ?= yes + scope:gain_strong_hook ?= yes + } + scope:recipient = { + government_has_flag = government_is_theocracy + } + } + desc = pam_interactions_events.0091.desc_hook_theocrat + } + triggered_desc = { + trigger = { + OR = { + scope:gain_weak_hook ?= yes + scope:gain_strong_hook ?= yes + } + } + desc = pam_interactions_events.0091.desc_hook + } + desc = pam_interactions_events.0091.desc + } + } + + immediate = { + } + option = { + name = pam_interactions_events.0091.a + show_as_tooltip = { + scope:recipient = { bestow_title_effect = yes } + } + } + after = { + scope:recipient = { + trigger_event = pam_interactions_events.0092 + } + } +} +#Bestow title letter for recipient +pam_interactions_events.0092 = { + type = letter_event + opening = { + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + government_has_flag = government_is_theocracy + } + } + desc = pam_interactions_events.0092.opening_theocratic + } + desc = pam_interactions_events.0092.opening + } + } + } + sender = scope:puppet_or_actor + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:gain_weak_hook ?= yes + scope:gain_strong_hook ?= yes + } + } + desc = pam_interactions_events.0092.desc_hook + } + desc = pam_interactions_events.0092.desc + } + } + immediate = { + scope:recipient = { + bestow_title_effect = yes + } + } + option = { + name = pam_interactions_events.0092.a + } +} + +#Clergy Legitimize Bastard — I was declared true-born! +pam_interactions_events.0100 = { + type = character_event + title = pam_interactions_events.0100.t + desc = pam_interactions_events.0100.desc + theme = bastardy + left_portrait = scope:actor + + immediate = { + show_as_tooltip = { + add_trait_force_tooltip = legitimized_bastard + add_opinion = { + target = scope:actor + modifier = legitimized_me_opinion + } + scope:actor = { + add_hook = { + type = legitimized_by_clergy_hook + target = root + } + } + } + } + + option = { + name = pam_interactions_events.0100.a + } +} + +#Clergy Legitimize Bastard — letter to each parent +pam_interactions_events.0101 = { + type = letter_event + opening = pam_interactions_events.0101.opening + desc = pam_interactions_events.0101.desc + sender = scope:actor + + option = { + name = pam_interactions_events.0101.a + show_as_tooltip = { + scope:recipient = { + add_trait_force_tooltip = legitimized_bastard + } + } + } +} +pam_interactions_events.0093 = { + hidden = yes + trigger = { + is_alive = yes + is_ruler = yes + faith = scope:de_jure_faith + scope:target = { + any_de_jure_county = { + holder ?= { + OR = { + faith = { + NOT = { + this = scope:de_jure_faith + } + } + any_liege_or_above = { + faith = { + NOT = { + this = scope:de_jure_faith + } + } + NOT = { + is_liege_or_above_of = root + } + } + } + } + } + } + } + immediate = { + scope:target = { + every_de_jure_county = { + limit = { + holder ?= { + OR = { + faith = { + NOT = { + this = scope:de_jure_faith + } + } + any_liege_or_above = { + faith = { + NOT = { + this = scope:de_jure_faith + } + } + NOT = { + is_liege_or_above_of = root + } + } + } + } + } + holder = { + add_to_list = other_faith_rulers + } + } + } + ordered_in_list = { + order_by = sub_realm_size + list = other_faith_rulers + save_scope_as = other_faith_guy + } + ordered_in_list = { + order_by = sub_realm_size + list = other_faith_rulers + limit = { + NOT = { + this = scope:other_faith_guy + } + } + save_scope_as = other_faith_guy_2 + } + send_interface_toast = { + type = event_toast_effect_bad + title = failed_eradication_faith_promise.t + left_icon = scope:other_faith_guy + right_icon = scope:other_faith_guy_2 + custom_tooltip = failed_eradication_faith_promise_tt + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = massive_legitimacy_loss + } + else = { + add_prestige = massive_prestige_loss + } + add_piety_level = -1 + } + } +} +#de jure confirmation event for land gainer +pam_interactions_events.0094 = { + type = letter_event + opening = { + desc = pam_interactions_events.0094.opening + } + sender = scope:cleric + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:promise_domination ?= yes + scope:promise_conversion ?= yes + } + } + desc = pam_interactions_events.0094.desc_conversion + } + desc = pam_interactions_events.0094.desc + } + } + + option = { + name = pam_interactions_events.0094.a + ecclesiastical_de_jure_shifting_effect = { + DE_JURE_MASTER = scope:de_jure_master + CLERIC = scope:cleric + } + } + after = { + #Send notification to affected rulers + every_player = { + limit = { + any_sub_realm_county = { + any_this_title_or_de_jure_above = { + this = scope:target + } + } + NOR = { + this = scope:de_jure_master + this = scope:cleric + } + } + trigger_event = pam_interactions_events.0095 + } + } +} +#de jure change letter for players in area +pam_interactions_events.0095 = { + type = letter_event + opening = { + desc = pam_interactions_events.0095.opening + } + sender = scope:cleric + desc = pam_interactions_events.0095.desc + + immediate = { + custom_tooltip = de_jure_clergy_past_tense_effect_tt + ordered_sub_realm_county = { + order_by = development_level + limit = { + any_this_title_or_de_jure_above = { + this = scope:target + } + } + save_scope_as = target_county + } + } + option = { + name = { + trigger = { + NOT = { + faith = scope:cleric.faith + } + } + text = pam_interactions_events.0095.a + } + name = { + trigger = { + faith = scope:cleric.faith + } + text = pam_interactions_events.0095.a_same_faith + } + } +} +#de jure confirmation event for cleric +pam_interactions_events.0096 = { + type = letter_event + opening = { + desc = pam_interactions_events.0096.opening + } + sender = scope:de_jure_master + desc = pam_interactions_events.0096.desc + + immediate = { + } + option = { + name = pam_interactions_events.0096.a + show_as_tooltip = { + scope:de_jure_master = { + ecclesiastical_de_jure_shifting_effect = { + DE_JURE_MASTER = scope:de_jure_master + CLERIC = scope:cleric + } + } + } + } + after = { + scope:de_jure_master = { + trigger_event = { + id = pam_interactions_events.0094 + days = 1 + } + } + } +} + +#The clergy grant a petition for an unheld de jure title and crown the petitioner with it +pam_interactions_events.0097 = { + type = letter_event + opening = { + desc = pam_interactions_events.0097.opening + } + sender = scope:cleric + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:promise_holy_war ?= yes + } + desc = pam_interactions_events.0097.desc_holy_war + } + desc = pam_interactions_events.0097.desc + } + } + + option = { + name = pam_interactions_events.0097.a + request_unformed_title_effect = yes + } +} + +#The vow to take an unformed kingdom from the heathens comes due five years on +pam_interactions_events.0098 = { + hidden = yes + trigger = { + is_alive = yes + is_ruler = yes + faith = scope:promised_holy_war_faith + scope:target ?= { + any_de_jure_county = { + percent >= 0.25 + holder ?= { + rite = { + is_hostile_enough_for_holy_war_trigger = { RITE = scope:promised_holy_war_faith.main_rite } + } + } + } + } + } + immediate = { + scope:target = { + every_de_jure_county = { + limit = { + holder ?= { + rite = { + is_hostile_enough_for_holy_war_trigger = { RITE = scope:promised_holy_war_faith.main_rite } + } + } + } + holder = { + add_to_list = unbroken_heathens + } + } + } + ordered_in_list = { + order_by = sub_realm_size + list = unbroken_heathens + save_scope_as = unbroken_heathen + } + send_interface_toast = { + type = event_toast_effect_bad + title = failed_holy_war_promise.t + left_icon = scope:unbroken_heathen + custom_tooltip = failed_eradication_faith_promise_tt + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = massive_legitimacy_loss + } + else = { + add_prestige = massive_prestige_loss + } + add_piety_level = -1 + } + } +} + +#Demand Divorce — the defied theocrat reads the refusal. +pam_interactions_events.0111 = { + type = letter_event + opening = { + desc = pam_interactions_events.0111.opening + } + desc = pam_interactions_events.0111.desc + + sender = { + character = scope:recipient + animation = personality_callous + } + + option = { + name = pam_interactions_events.0111.a + show_as_tooltip = { + scope:recipient = { + add_piety = medium_piety_loss + change_spiritual_fulfillment = medium_spiritual_fulfillment_loss + add_opinion = { + target = scope:actor + modifier = demanded_divorce_opinion + } + } + } + } +} +#Clerical Ruler Puppet Event +pam_interactions_events.0120 = { + type = letter_event + opening = { + desc = pam_interactions_events.0120.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:recipient.faith.religious_head ?= root + scope:recipient.rite.head_of_rite ?= root + } + } + desc = pam_interactions_events.0120.desc_religious_head_actor + } + triggered_desc = { + trigger = { + scope:recipient.faith.religious_head ?= scope:recipient + } + desc = pam_interactions_events.0120.desc_religious_head_recipient + } + desc = pam_interactions_events.0120.desc + } + first_valid = { + triggered_desc = { + trigger = { + scope:lunacy_support ?= yes + } + desc = pam_interactions_events.0120.desc_lunacy + } + triggered_desc = { + trigger = { + scope:dread_support ?= yes + } + desc = pam_interactions_events.0120.desc_dread + } + triggered_desc = { + trigger = { + scope:piety_support ?= yes + } + desc = pam_interactions_events.0120.desc_piety + } + triggered_desc = { + trigger = { + scope:friendly_support ?= yes + } + desc = pam_interactions_events.0120.desc_friendly + } + triggered_desc = { + trigger = { + scope:skill_support ?= yes + } + desc = pam_interactions_events.0120.desc_skill + } + } + desc = pam_interactions_events.0120.outro + } + + sender = { + character = scope:recipient + triggered_animation = { + trigger = { + OR = { + scope:recipient.faith.religion = religion:catholic_religion + scope:recipient.faith.religion = religion:eastern_orthodox_religion + scope:recipient.faith.religion = religion:protestant_religion + scope:recipient.faith.religion = religion:oriental_orthodox_religion + } + } + animation = prayer_standing_eyes + } + animation = court_chaplain + } + + immediate = { + play_sound_effect = "event:/DLC/CE3/SFX/UIX/ce3_make_character_puppet" + set_puppet = { + target = scope:recipient + type = external_theological_agent_puppet + } + pam_generic_set_puppet_interaction_side_effects = yes + } + + option = { + name = pam_interactions_events.0120.a + } +} + +#External Ruler Puppet Event +pam_interactions_events.0121 = { + type = letter_event + opening = { + desc = pam_interactions_events.0121.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + is_adult = yes + ai_honor >= 0 + } + } + desc = pam_interactions_events.0121.desc_honor + } + desc = pam_interactions_events.0121.desc + } + first_valid = { + triggered_desc = { + trigger = { + scope:lunacy_support ?= yes + } + desc = pam_interactions_events.0121.desc_lunacy + } + triggered_desc = { + trigger = { + scope:dread_support ?= yes + } + desc = pam_interactions_events.0121.desc_dread + } + triggered_desc = { + trigger = { + scope:piety_support ?= yes + } + desc = pam_interactions_events.0121.desc_piety + } + triggered_desc = { + trigger = { + scope:friendly_support ?= yes + } + desc = pam_interactions_events.0121.desc_friendly + } + triggered_desc = { + trigger = { + scope:skill_support ?= yes + } + desc = pam_interactions_events.0121.desc_skill + } + } + desc = pam_interactions_events.0121.outro + } + + sender = { + character = scope:recipient + animation = throne_room_bow_1 + } + + immediate = { + play_sound_effect = "event:/DLC/CE3/SFX/UIX/ce3_make_character_puppet" + set_puppet = { + target = scope:recipient + type = external_ruler_puppet + } + pam_generic_set_puppet_interaction_side_effects = yes + } + + option = { + name = pam_interactions_events.0121.a + } +} + +#Seek Communion accepted +pam_interactions_events.0130 = { + type = letter_event + opening = pam_interactions_events.0130.opening + desc = { + first_valid = { + triggered_desc = { + trigger = { this = scope:actor } + desc = pam_interactions_events.0130.desc_seeker + } + desc = pam_interactions_events.0130.desc + } + } + + sender = scope:recipient + + option = { + name = pam_interactions_events.0130.a + if = { + limit = { this = scope:actor } + pam_seek_communion_reconcile_faith_effect = yes + } + else = { show_as_tooltip = { pam_seek_communion_reconcile_faith_effect = yes } } + } +} + +#Seek Communion refused +pam_interactions_events.0131 = { + type = letter_event + opening = pam_interactions_events.0131.opening + desc = pam_interactions_events.0131.desc + + sender = scope:recipient + + option = { + name = pam_interactions_events.0131.a + } +} diff --git a/events/dlc/pam/pam_religious_artifact_events.txt b/events/dlc/pam/pam_religious_artifact_events.txt new file mode 100644 index 000000000..c31700ebf --- /dev/null +++ b/events/dlc/pam/pam_religious_artifact_events.txt @@ -0,0 +1,345 @@ +namespace = pam_religious_artifact_events + +########################### +## 0001 - Courtier asks for sponsoring for making a religious artifact +## 0002 - Religious Artifact Inspiration completion event +############################ + +scripted_trigger pam_religious_artifact_events_valid_courtier_trigger = { + is_available_healthy_ai_adult = yes + faith = root.faith + NOR = { + is_spouse_of = root + is_child_of = root + exists = inspiration + has_any_court_position = yes + is_councillor = yes + has_trait = cynical + } +} + +pam_religious_artifact_events.0001 = { + type = character_event + title = pam_religious_artifact_events.0001.t + desc = pam_religious_artifact_events.0001.desc + theme = friendly + override_background = { reference = council_chamber } + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:inspired_courtier + animation = happiness + } + + trigger = { + is_available_adult = yes + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + any_courtier = { + pam_religious_artifact_events_valid_courtier_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + NOT = { any_sponsored_inspiration = { } } + } + modifier = { + factor = 0.5 + has_royal_court = no + } + } + + immediate = { + random_courtier = { + limit = { pam_religious_artifact_events_valid_courtier_trigger = yes } + weight = { + base = 1 + modifier = { + has_trait = zealous + add = 5 + } + modifier = { + has_trait = theologian + add = 5 + } + modifier = { + is_clergy = yes + add = 5 + } + } + save_scope_as = inspired_courtier + create_inspiration = religious_artifact_inspiration + inspiration = { save_scope_as = my_inspiration } + } + } + + option = { # Accuse them of fraud + name = pam_religious_artifact_events.0001.aa + trigger = { + OR = { + has_trait = cynical + has_trait = sadistic + } + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:inspired_courtier + IMPRISONER = root + } + stress_and_fulfillment_impact = { + cynical = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + zealous = major_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 2 + OR = { + has_trait = cynical + has_trait = sadistic + } + } + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + option = { # Sponsor them + name = pam_religious_artifact_events.0001.a + sponsor_inspiration = scope:my_inspiration + + reverse_add_opinion = { + target = scope:inspired_courtier + modifier = pleased_opinion + opinion = 25 + } + + stress_and_fulfillment_impact = { + profligate = medium_stress_impact_loss + content = major_stress_impact_gain + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1.5 + ai_greed = 0.5 + } + modifier = { + factor = 2 + has_trait = profligate + } + } + } + + option = { # Refuse + name = pam_religious_artifact_events.0001.b + scope:inspired_courtier = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_rejected_tapestries + OPINION = -25 + } + } + + stress_and_fulfillment_impact = { + profligate = medium_stress_impact_gain + greedy = minor_stress_impact_loss + content = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = 1.5 + } + } + } +} + +# Religious artifact completion event +pam_religious_artifact_events.0002 = { + type = character_event + title = fund_inspiration.1001.t + desc = pam_religious_artifact_events.0002.desc + theme = inspiration_complete + override_background = { reference = temple } + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:inspiration_owner + animation = prayer + camera = camera_event_right_to_the_right + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_religious_artifact_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_religious_artifact_completion_event + create_christian_religious_artifact_effect = { + OWNER = root + CREATOR = scope: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 = pam_religious_artifact_events.0002.a + custom_tooltip = create_artifact_religious_artifact_tooltip + } +} diff --git a/events/dlc/pam/pam_saint_events.txt b/events/dlc/pam/pam_saint_events.txt new file mode 100644 index 000000000..00911759a --- /dev/null +++ b/events/dlc/pam/pam_saint_events.txt @@ -0,0 +1,519 @@ +namespace = pam_saint_events + +########################################### +## Canonizing Saints +########################################### +## Canonization +## 0001 - Petition sent: tells the canonizer the HoF's answer is awaited (fired at commit) +## 0002 - Head of Faith canonization request (HoF decides) +## 0003 - Canonization approved / finalized (shown to the canonizer) +## 0004 - Canonization denied (notify canonizer) +## Relic extraction +## 0005 - Relic extraction begun: tells the extractor the relic will arrive soon +## 0006 - The relic is drawn a delay after the saint is picked in the extract-a-relic decision +## Buried-saint tomb visit +## 0007 - Visiting a saint's tomb (player): pay respects, or draw a relic on the spot +########################################### + +# Only the canonizing ruler, root, hears about this when they petition the Head of Faith +# scope:saint_candidate, consecration_province and petition_recipient stay set +pam_saint_events.0001 = { + type = character_event + title = pam_saint_events.0001.t + desc = pam_saint_events.0001.desc + theme = christian + + left_portrait = { + character = root + # Muslims pray in their own posture; trigger runs in the portrait character's scope. + triggered_animation = { + trigger = { faith.religion = religion:islam_religion } + animation = prayer_muslim + } + animation = prayer_standing_eyes + } + lower_right_portrait = { + character = scope:saint_candidate + animation = dead + } + right_portrait = { + trigger = { exists = scope:petition_recipient } + character = scope:petition_recipient + animation = thinking + } + + option = { + name = pam_saint_events.0001.a + # Wording picked here so the saint_candidate / consecration_province / petition_recipient scopes stay reachable in the loc key. + if = { + limit = { + OR = { + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:oriental_orthodox_religion + } + } + custom_tooltip = pam_saint_events.0001.a.tt_saint + } + else = { + custom_tooltip = pam_saint_events.0001.a.tt_va + } + + # Acknowledging the petition starts the HoF's clock (-> 0003/0004). + hidden_effect = { + scope:petition_recipient = { + trigger_event = { + id = pam_saint_events.0002 + days = 30 + } + } + } + } +} + +# Sent to the Head of Faith. They approve or reject the canonization. +# scope:canonizer - the ruler putting the saint forward +# scope:saint_candidate - the dead character to be canonized +# scope:consecration_province - where they would be consecrated/buried +pam_saint_events.0002 = { + type = character_event + title = pam_saint_events.0002.t + desc = { + # Saint vs Venerated Ancestor wording picked here so canonizer / saint_candidate / consecration_province stay reachable in the loc key. + first_valid = { + triggered_desc = { + trigger = { + OR = { + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:oriental_orthodox_religion + } + } + desc = pam_saint_events.0002.desc_saint + } + desc = pam_saint_events.0002.desc_va + } + # Name the candidate's personality traits (handles 1, 2, or 3). + first_valid = { + triggered_desc = { + trigger = { exists = scope:pam_saint_ptrait_3 } + desc = pam_saint_events.0002.desc.traits_3 + } + triggered_desc = { + trigger = { exists = scope:pam_saint_ptrait_2 } + desc = pam_saint_events.0002.desc.traits_2 + } + triggered_desc = { + trigger = { exists = scope:pam_saint_ptrait_1 } + desc = pam_saint_events.0002.desc.traits_1 + } + } + # Close that paragraph with a line scaled to how virtuous they were. + first_valid = { + triggered_desc = { + trigger = { scope:saint_candidate = { num_virtuous_traits >= 3 } } + desc = pam_saint_events.0002.desc.virtue_3 + } + triggered_desc = { + trigger = { scope:saint_candidate = { num_virtuous_traits >= 2 } } + desc = pam_saint_events.0002.desc.virtue_2 + } + triggered_desc = { + trigger = { scope:saint_candidate = { num_virtuous_traits >= 1 } } + desc = pam_saint_events.0002.desc.virtue_1 + } + } + } + theme = christian + + left_portrait = { + character = scope:canonizer + animation = personality_zealous + } + lower_center_portrait = { + character = scope:saint_candidate + animation = dead + } + right_portrait = { + character = root + animation = thinking + } + + # Pull the candidate's personality traits into scopes so the description can name them. + immediate = { + scope:saint_candidate = { + every_character_trait = { + limit = { has_trait_category = personality } + add_to_list = pam_saint_personality_traits + } + } + if = { + limit = { list_size:pam_saint_personality_traits > 0 } + ordered_in_list = { + list = pam_saint_personality_traits + save_scope_as = pam_saint_ptrait_1 + remove_from_list = pam_saint_personality_traits + } + } + if = { + limit = { list_size:pam_saint_personality_traits > 0 } + ordered_in_list = { + list = pam_saint_personality_traits + save_scope_as = pam_saint_ptrait_2 + remove_from_list = pam_saint_personality_traits + } + } + if = { + limit = { list_size:pam_saint_personality_traits > 0 } + ordered_in_list = { + list = pam_saint_personality_traits + save_scope_as = pam_saint_ptrait_3 + remove_from_list = pam_saint_personality_traits + } + } + } + + option = { # Approve the canonization + name = pam_saint_events.0002.a + + pam_canonize_saint_effect = { + CANONIZER = scope:canonizer + CANDIDATE = scope:saint_candidate + CONSECRATION_PROVINCE = scope:consecration_province + PRESET = no + } + + # Gratitude toward the HoF (root) who granted the petition. + scope:canonizer = { + add_opinion = { + target = root + modifier = pam_canonization_approved_petitioner_opinion + } + } + # Same-faith dynasty members warm to the HoF too; hidden so the option shows one summary line. + custom_tooltip = { + text = pam_saint_events.0002.a.dynasty_opinion_tt + scope:canonizer.dynasty ?= { + every_dynasty_member = { + limit = { + this != scope:canonizer + faith = scope:canonizer.faith + } + add_opinion = { + target = root + modifier = pam_canonization_approved_dynasty_opinion + } + } + } + } + + hidden_effect = { + scope:canonizer = { + trigger_event = pam_saint_events.0003 + } + } + + ai_chance = { + base = 0 + modifier = { + add = { + value = scope:saint_candidate.pam_hof_canonization_approve_weight + } + } + } + } + + option = { # Reject the canonization + name = pam_saint_events.0002.b + trigger = { + NOT = { puppeteer ?= scope:canonizer } + } + + # Resentment toward the HoF (root) who refused the petition. + scope:canonizer = { + add_opinion = { + target = root + modifier = pam_canonization_denied_petitioner_opinion + } + } + # Same-faith dynasty members sour on the HoF too; hidden so the option shows one summary line. + custom_tooltip = { + text = pam_saint_events.0002.b.dynasty_opinion_tt + scope:canonizer.dynasty ?= { + every_dynasty_member = { + limit = { + this != scope:canonizer + faith = scope:canonizer.faith + } + add_opinion = { + target = root + modifier = pam_canonization_denied_dynasty_opinion + } + } + } + } + + hidden_effect = { + scope:canonizer = { + trigger_event = pam_saint_events.0004 + } + } + + ai_chance = { + base = 0 + modifier = { + add = { + value = scope:saint_candidate.pam_hof_canonization_reject_weight + } + } + modifier = { + add = pam_hof_canonization_cynical_weight + has_trait = cynical # the deciding Head of Faith's own outlook + } + } + } +} + +# The Head of Faith approved (or no approval was needed). +pam_saint_events.0003 = { + type = character_event + title = pam_saint_events.0003.t + # Wording picked here so saint_candidate / consecration_province stay reachable in the loc key. + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:oriental_orthodox_religion + } + } + desc = pam_saint_events.0003.desc_saint + } + desc = pam_saint_events.0003.desc_va + } + } + theme = christian + + left_portrait = { + character = scope:saint_candidate + animation = dead + } + + option = { + name = pam_saint_events.0003.a + # The canonizer's same-faith dynasty takes pride in their new saint; hidden so the option shows one summary line. + custom_tooltip = { + text = pam_saint_events.0003.a.dynasty_opinion_tt + root.dynasty ?= { + every_dynasty_member = { + limit = { + this != root + faith = root.faith + } + add_opinion = { + target = root + modifier = pam_canonization_celebrated_dynasty_opinion + } + } + } + } + } +} + +# The Head of Faith rejected the canonization. +pam_saint_events.0004 = { + type = character_event + title = pam_saint_events.0004.t + # Saint/Venerated-Ancestor vocabulary swapped inside the key by custom loc; saint_candidate / petition_recipient stay live via the direct desc reference. + desc = pam_saint_events.0004.desc + theme = christian + + left_portrait = { + character = root + animation = disappointed + } + lower_center_portrait = { + character = scope:saint_candidate + animation = dead + } + right_portrait = { + character = root.faith.religious_head + animation = disapproval + } + + option = { + name = pam_saint_events.0004.a + # Refund the petition cost the canonize decision charged up front, since the HoF declined. + add_piety_no_experience = pam_canonize_saint_piety_cost + add_gold = pam_canonize_saint_gold_cost + } +} + +# Fired to the extracting ruler (root) the instant they begin drawing a relic, so they know the relic (0006) is on its way. Informational; the decision only fires it for players. scope:relic_saint / extract_site carry over. +pam_saint_events.0005 = { + type = character_event + title = pam_saint_events.0005.t + desc = pam_saint_events.0005.desc + theme = christian + + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + trigger = { exists = scope:relic_saint } + character = scope:relic_saint + } + + option = { + name = pam_saint_events.0005.a + custom_tooltip = pam_saint_events.0005.a.tt + + # Acknowledging the start of the work begins the timer that delivers the relic. + hidden_effect = { + trigger_event = { + id = pam_saint_events.0006 + days = 30 + } + } + } +} + +# The relic is drawn here (a delay after the extract-a-relic pick) and shown to the extractor (root). scope:extract_site carries over; creation saves scope:relic_artifact for naming. +pam_saint_events.0006 = { + type = character_event + title = pam_saint_events.0006.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:relic_artifact } + desc = pam_saint_events.0006.desc_relic + } + desc = pam_saint_events.0006.desc + } + } + theme = christian + + left_portrait = { + character = root + animation = prayer_standing_eyes + } + right_portrait = { + trigger = { exists = scope:relic_saint } + character = scope:relic_saint + } + + immediate = { + if = { + limit = { exists = scope:extract_site.saint_in_province } + scope:extract_site.saint_in_province = { save_scope_as = relic_saint } + } + else = { + root = { save_scope_as = relic_saint } + } + pam_extract_relic_from_saint_effect = { + SITE = scope:extract_site + } + } + + option = { + name = pam_saint_events.0006.a + # Relic was built in immediate (hidden_effect_new_object), so it can't surface itself here; confirm the draw and that it can now be placed. + custom_tooltip = pam_saint_events.0006.a.tt + # Echo the blessing rolled in immediate (tooltip only), crediting the tenet. + if = { + limit = { + rite = { rite_has_parameter = tenet_dulia_extra_relic_modifier } + exists = scope:relic_artifact + } + pam_show_dulia_relic_blessing_effect = yes + } + # Echo the prestige granted in immediate (tooltip only), crediting the tenet. + if = { + limit = { + rite = { rite_has_parameter = tenet_dulia_dynasty_prestige_from_relics } + exists = dynasty + exists = scope:relic_creator_saint.dynasty + scope:relic_creator_saint.dynasty = dynasty + } + show_as_tooltip = { pam_grant_dulia_relic_dynasty_prestige_effect = yes } + } + } +} + +# Runs from poi_buried_saint on_visit when a player reaches the tomb +# Historical tombs only reach it when a relic can be drawn +pam_saint_events.0007 = { + type = character_event + title = pam_saint_events.0007.t + desc = pam_saint_events.0007.desc + theme = christian + + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + trigger = { exists = scope:visited_saint } + character = scope:visited_saint + animation = dead + } + + option = { + name = pam_saint_events.0007.a + if = { + limit = { + scope:saint_tomb_province = { has_variable = pam_preset_buried_saint } + } + add_piety = point_of_interest_miniscule_piety_value + } + else = { + add_piety = point_of_interest_piety_value + add_stress = minor_stress_loss + } + } + + # Draw a relic now - only while the tomb is in your realm, you can afford it, and the saint can still yield one + option = { + name = pam_saint_events.0007.b + trigger = { + piety >= pam_extract_relic_piety_cost + gold >= pam_extract_relic_gold_cost + exists = scope:visited_saint + faith = { has_saint_character = scope:visited_saint } + scope:saint_tomb_province = { + pam_can_extract_relic_from_saint_trigger = { EXTRACTOR = root SAINT = scope:visited_saint } + } + } + custom_tooltip = pam_saint_events.0007.b.tt + add_piety_no_experience = { + value = pam_extract_relic_piety_cost + multiply = -0.75 + } + remove_short_term_gold = { + value = pam_extract_relic_gold_cost + multiply = 0.75 + } + + pam_extract_relic_from_saint_effect = { + SITE = scope:saint_tomb_province + } + + hidden_effect = { + if = { + limit = { exists = scope:relic_artifact } + send_interface_toast = { + title = pam_saint_events.0007.b.toast + left_icon = root + right_icon = scope:relic_artifact + custom_tooltip = pam_saint_events.0007.b.toast_desc + } + } + } + } +} diff --git a/events/dlc/pam/pam_secular_faith_events.txt b/events/dlc/pam/pam_secular_faith_events.txt new file mode 100644 index 000000000..b80e9bd8a --- /dev/null +++ b/events/dlc/pam/pam_secular_faith_events.txt @@ -0,0 +1,8327 @@ +namespace = pam_secular_faith_events + +# Secular Faith & Rite: ambient flavor events for the yearly pool (By God Alone) + +########################################################################################## +# 0001 - Holy Smoke (incense / saint veneration) +########################################################################################## +pam_secular_faith_events.0001 = { + type = character_event + title = pam_secular_faith_events.0001.t + desc = pam_secular_faith_events.0001.desc + theme = christian + override_background = temple + override_effect_2d = { reference = smoke } + widgets = { + widget = { + gui = event_window_widget_vfx_godray + container = background_shader_vfx_container + } + } + + left_portrait = { + character = root + animation = prayer_standing + camera = camera_event_left_away_3_4_small + } + right_portrait = { + character = scope:chaplain + animation = thurible + camera = camera_event_center_pointing_forward_fov35 + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + faith.religion = { is_in_family = rf_abrahamic } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # Lose yourself in private prayer + name = pam_secular_faith_events.0001.a + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # Dedicate the rite to the god of wealth + name = pam_secular_faith_events.0001.b + add_piety = medium_piety_gain + add_character_modifier = { + modifier = pam_sf_devotion_modifier + years = 15 + } + stress_and_fulfillment_impact = { + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = generous factor = 0 } + } + } + + option = { # Share the devotion with the court + name = pam_secular_faith_events.0001.c + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = pam_sf_serenity_modifier + years = 3 + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } +} + +########################################################################################## +# 0002 - Pikuach Nefesh (rescue a traveler on the Sabbath) +########################################################################################## +scripted_effect pam_secular_faith_shabbat_rescue_success_effect = { + if = { + limit = { can_add_hook = { target = scope:traveler_in_danger type = saved_my_life_hook } } + add_hook = { type = saved_my_life_hook target = scope:traveler_in_danger } + } + scope:traveler_in_danger = { + add_opinion = { target = root modifier = grateful_opinion opinion = 30 } + if = { + limit = { exists = current_travel_plan } + current_travel_plan = { add_travel_plan_modifier = pam_sf_safe_passage_modifier } + } + } +} + +scripted_effect pam_secular_faith_shabbat_rescue_failure_effect = { + scope:traveler_in_danger = { + increase_wounds_no_death_effect = { REASON = fight } + if = { + limit = { exists = current_travel_plan } + current_travel_plan = { add_travel_plan_modifier = pam_sf_waylaid_road_modifier } + } + } +} + +pam_secular_faith_events.0002 = { + type = character_event + title = pam_secular_faith_events.0002.t + desc = pam_secular_faith_events.0002.desc + theme = christian + override_background = terrain_scope + widgets = { + widget = { gui = event_window_widget_vfx_heavy_smoke container = foreground_shader_vfx_container } + } + + left_portrait = { + character = scope:traveler_in_danger + animation = sword_yield_start + camera = camera_event_right_forward + } + lower_right_portrait = { + character = scope:chaplain + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + religion = religion:judaism_religion + any_held_title = { + tier = tier_county + any_county_province = { + any_character_in_location = { + is_ai = yes + current_travel_plan.travel_plan_owner ?= this + this != root + is_physically_able_adult = yes + } + } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + + random_held_title = { + limit = { + tier = tier_county + any_county_province = { + any_character_in_location = { + is_ai = yes + current_travel_plan.travel_plan_owner ?= this + this != root + is_physically_able_adult = yes + } + } + } + random_county_province = { + limit = { + any_character_in_location = { + is_ai = yes + current_travel_plan.travel_plan_owner ?= this + this != root + is_physically_able_adult = yes + } + } + save_scope_as = background_terrain_scope + random_character_in_location = { + limit = { + is_ai = yes + current_travel_plan.travel_plan_owner ?= this + this != root + is_physically_able_adult = yes + } + save_scope_as = traveler_in_danger + } + } + } + } + + option = { # Ride out at once and save them + name = pam_secular_faith_events.0002.a + add_piety = major_piety_gain + pam_secular_faith_shabbat_rescue_success_effect = yes + random = { + chance = { + value = 30 + subtract = { + add = root.prowess + multiply = 2 + } + min = 1 + } + increase_wounds_no_death_effect = { REASON = fight } + } + stress_and_fulfillment_impact = { + base = medium_stress_gain + craven = massive_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + brave = massive_stress_impact_loss + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = craven + has_trait = sadistic + has_trait = callous + prowess < 10 + } + factor = 0 + } + } + } + + option = { # Learning challenge: the higher the learning, the likelier the rescue + name = pam_secular_faith_events.0002.b + duel = { + skill = learning + value = high_skill_rating + 50 = { # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + pam_secular_faith_shabbat_rescue_success_effect = yes + add_piety = major_piety_gain + scope:chaplain = { add_opinion = { target = root modifier = pious_opinion opinion = 30 } } + } + 50 = { # We took too long + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + pam_secular_faith_shabbat_rescue_failure_effect = yes + scope:chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + } + stress_and_fulfillment_impact = { + impatient = massive_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + humble = medium_stress_impact_loss + patient = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = impatient + has_trait = sadistic + has_trait = callous + } + factor = 0 + } + } + } + + option = { # Do not save them + name = pam_secular_faith_events.0002.c + pam_secular_faith_shabbat_rescue_failure_effect = yes + stress_and_fulfillment_impact = { + craven = major_stress_impact_loss + brave = massive_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + OR = { + has_trait = brave + has_trait = compassionate + } + factor = 0 + } + } + } +} + +########################################################################################## +# 0003 - A Vision in the Night (divine vision) +########################################################################################## +scripted_effect pam_secular_faith_seed_unknown_tenet_effect = { + random_list = { + 10 = { + trigger = { NOT = { knows_tenet = tenet_ritual_cannibalism } } + add_known_tenet = tenet_ritual_cannibalism + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_ritual_cannibalism } + } + 10 = { + trigger = { NOT = { knows_tenet = tenet_sacred_shadows } } + add_known_tenet = tenet_sacred_shadows + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_sacred_shadows } + } + 10 = { + trigger = { NOT = { knows_tenet = tenet_human_sacrifice } } + add_known_tenet = tenet_human_sacrifice + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_human_sacrifice } + } + 10 = { + trigger = { NOT = { knows_tenet = tenet_pursuit_of_power } } + add_known_tenet = tenet_pursuit_of_power + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_pursuit_of_power } + } + 10 = { + trigger = { NOT = { knows_tenet = tenet_carnal_exaltation } } + add_known_tenet = tenet_carnal_exaltation + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_carnal_exaltation } + } + 10 = { + trigger = { NOT = { knows_tenet = tenet_hedonistic } } + add_known_tenet = tenet_hedonistic + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_hedonistic } + } + # Safety fallback - only reachable once every notable tenet above is already known, so the list is never empty. + 1 = { + trigger = { + knows_tenet = tenet_ritual_cannibalism + knows_tenet = tenet_sacred_shadows + knows_tenet = tenet_human_sacrifice + knows_tenet = tenet_pursuit_of_power + knows_tenet = tenet_carnal_exaltation + knows_tenet = tenet_hedonistic + } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + } + } +} + +pam_secular_faith_events.0003 = { + type = character_event + title = pam_secular_faith_events.0003.t + desc = pam_secular_faith_events.0003.desc + theme = christian + override_background = bedchamber + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_double_vision_severe container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = divine_ecstasy + camera = camera_event_right_forward + outfit_tags = { nightgown } + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_clergy_ok_actor_trigger = yes + } + + option = { # Heed it as divine truth + name = pam_secular_faith_events.0003.a + pam_secular_faith_seed_unknown_tenet_effect = yes + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # Dismiss it as a fever dream + name = pam_secular_faith_events.0003.b + skill = learning + trigger = { + learning >= decent_skill_rating + } + show_as_unavailable = { always = yes } + add_scholar_trait_or_xp_effect = { VALUE = 10 } + stress_and_fulfillment_impact = { + base = minor_stress_loss + cynical = minor_stress_loss + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } + + option = { # Proclaim the vision to clergy and court + name = pam_secular_faith_events.0003.c + trigger = { + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + } + add_piety = medium_piety_gain + add_character_modifier = { + modifier = pam_sf_visionary_renown_modifier + years = 15 + } + stress_and_fulfillment_impact = { + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = shy factor = 0 } + } + } +} + +########################################################################################## +# 0004 - Forbidden Truth (temptation -> secret personal tenet) +########################################################################################## +pam_secular_faith_events.0004 = { + type = character_event + title = pam_secular_faith_events.0004.t + desc = pam_secular_faith_events.0004.desc + theme = christian + override_background = corridor_night + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = prayer_standing + } + + cooldown = { years = 25 } + + trigger = { + pam_secular_faith_clergy_ok_actor_trigger = yes + pam_can_adopt_forbidden_personal_tenet_trigger = yes + } + + # We pre-select so the desc can name the tenet, and the trigger already guarantees a candidate + immediate = { + random_desired_tenet = { + only_positive = yes + threshold = 1 + selection_count = 97 + limit = { + save_temporary_scope_as = pam_sf_forbidden_candidate + NOT = { root = { any_personal_tenet = { this = scope:pam_sf_forbidden_candidate } } } + root.faith.main_rite = { + has_tenet_status = { + tenet = scope:pam_sf_forbidden_candidate + status = prohibited + } + } + } + save_scope_as = pam_sf_forbidden_tenet + } + } + + option = { # Embrace the forbidden truth, in secret + name = pam_secular_faith_events.0004.a + add_internal_flag = dangerous + force_set_personal_tenet = scope:pam_sf_forbidden_tenet + change_spiritual_fulfillment = 150 + stress_and_fulfillment_impact = { + base = massive_stress_impact_loss + zealous = medium_stress_impact_gain + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 25 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = humble + has_trait = content + } + } + } + } + + option = { # Reject it and reaffirm your faith + name = pam_secular_faith_events.0004.b + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + zealous = medium_stress_impact_loss + humble = minor_stress_impact_loss + content = minor_stress_impact_loss + } + ai_chance = { + base = 75 + } + } +} + +########################################################################################## +# 0005 - By Candlelight (evening study reveals a foreign tenet or doctrine) +########################################################################################## +scripted_effect pam_secular_faith_study_revelation_select_effect = { + random_list = { + 50 = { + trigger = { + any_character_tenet = { + knowledge_filter = unknown + count >= 1 + } + } + random_character_tenet = { + knowledge_filter = unknown + save_scope_as = pam_sf_revelation_tenet + } + } + 50 = { + trigger = { + any_character_doctrine = { + knowledge_filter = unknown + passive_rite_learning_doctrine_is_learnable_trigger = yes + count >= 1 + } + } + random_character_doctrine = { + knowledge_filter = unknown + limit = { passive_rite_learning_doctrine_is_learnable_trigger = yes } + save_scope_as = pam_sf_revelation_doctrine + } + } + } +} + +# Grant knowledge of whichever subject pam_secular_faith_study_revelation_select_effect picked. +scripted_effect pam_secular_faith_study_revelation_learn_effect = { + if = { + limit = { exists = scope:pam_sf_revelation_tenet } + add_known_tenet = scope:pam_sf_revelation_tenet + } + else_if = { + limit = { exists = scope:pam_sf_revelation_doctrine } + add_known_doctrine = scope:pam_sf_revelation_doctrine + } +} + +pam_secular_faith_events.0005 = { + type = character_event + title = pam_secular_faith_events.0005.t + desc = { + desc = pam_secular_faith_events.0005.desc_intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:pam_sf_revelation_tenet } + desc = pam_secular_faith_events.0005.desc_tenet + } + triggered_desc = { + trigger = { exists = scope:pam_sf_revelation_doctrine } + desc = pam_secular_faith_events.0005.desc_doctrine + } + } + desc = pam_secular_faith_events.0005.desc_end + } + theme = christian + override_background = study + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = reading + camera = camera_event_right + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_clergy_ok_actor_trigger = yes + # At least one foreign tenet or learnable doctrine must remain unknown for there to be a revelation. + OR = { + any_character_tenet = { + knowledge_filter = unknown + count >= 1 + } + any_character_doctrine = { + knowledge_filter = unknown + passive_rite_learning_doctrine_is_learnable_trigger = yes + count >= 1 + } + } + OR = { + AND = { + learning >= high_skill_rating + NOR = { # Cannot read + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + has_focus_or_focus_trait_trigger = { FOCUS = learning_theology_focus } + has_trait = lifestyle_mystic + has_trait = lifestyle_scholar + } + NOT = { has_trait = blind } + } + + immediate = { + pam_secular_faith_study_revelation_select_effect = yes + } + + option = { # Set it down while it is still fresh + name = pam_secular_faith_events.0005.a + pam_secular_faith_study_revelation_learn_effect = yes + add_scholar_trait_or_xp_effect = { VALUE = 5 } + stress_and_fulfillment_impact = { + base = minor_stress_loss + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } + + option = { # Set it down as a scholar would + name = pam_secular_faith_events.0005.b + show_as_unavailable = { always = yes } + trigger = { + has_trait = lifestyle_scholar + } + pam_secular_faith_study_revelation_learn_effect = yes + add_learning_lifestyle_xp = major_lifestyle_xp + add_scholar_trait_or_xp_effect = { VALUE = 20 } + ai_chance = { + base = 1000 + } + } + + option = { # Pray the strange thought away + name = pam_secular_faith_events.0005.c + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } +} + +########################################################################################## +# 0006 - Bones of a Saint (the relic-seller) +########################################################################################## +scripted_trigger pam_sf_relic_seller_valid_trigger = { + is_available_healthy_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + faith = root.faith +} + +pam_secular_faith_events.0006 = { + type = character_event + title = pam_secular_faith_events.0006.t + desc = pam_secular_faith_events.0006.desc + theme = christian + override_background = market + + left_portrait = { + character = root + animation = contemplating + } + right_portrait = { + character = scope:relic_seller + animation = beg + } + + cooldown = { years = 50 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + gold > 0 + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + pam_sf_relic_seller_valid_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { pam_sf_relic_seller_valid_trigger = yes } + save_scope_as = relic_seller + } + } + else = { + create_character = { + location = root.capital_province + template = monk_character_template + faith = root.faith + rite = root.rite + culture = root.culture + save_scope_as = relic_seller + after_creation = { + add_character_flag = created + } + } + } + } + + option = { # Appraise it as a scholar - a learned eye may judge it a far finer piece + name = pam_secular_faith_events.0006.a + trigger = { + has_trait = lifestyle_scholar + } + show_as_unavailable = { always = yes } + custom_tooltip = pam_sf_examine_relic_tt + pay_short_term_gold = { + target = scope:relic_seller + gold = minor_gold_value + } + add_scholar_trait_or_xp_effect = { VALUE = 20 } + hidden_effect = { + random_list = { + 50 = { # A plain relic, like any other + modifier = { factor = 0.5 learning >= 12 } + pam_create_saint_fingerbone_relic_effect = { OWNER = root QUALITY = 10 WEALTH = 10 } + } + 35 = { # A piece of some renown + modifier = { + add = learning + } + pam_create_saint_fingerbone_relic_effect = { OWNER = root QUALITY = 40 WEALTH = 20 } + } + 10 = { # A famed relic, its provenance compelling + modifier = { + add = learning + } + pam_create_saint_fingerbone_relic_effect = { OWNER = root QUALITY = 80 WEALTH = 55 } + } + 5 = { # An illustrious treasure - the find of a lifetime + modifier = { + add = learning + } + pam_create_saint_fingerbone_relic_effect = { OWNER = root QUALITY = 95 WEALTH = 90 } + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # Buy it on faith - always a humble, common relic + name = pam_secular_faith_events.0006.b + custom_tooltip = pam_sf_acquire_relic_tt + pay_short_term_gold = { + target = scope:relic_seller + gold = minor_gold_value + } + pam_create_saint_fingerbone_relic_effect = { OWNER = root QUALITY = 10 WEALTH = 10 } + add_piety = medium_piety_gain + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = paranoid + } + } + } + } + + option = { # Send the peddler away + name = pam_secular_faith_events.0006.c + ai_chance = { + base = 100 + } + } + + after = { + scope:relic_seller = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +########################################################################################## +# 0007 - Arrogant Bishop +########################################################################################## +pam_secular_faith_events.0007 = { + type = character_event + title = pam_secular_faith_events.0007.t + desc = pam_secular_faith_events.0007.desc + theme = christian + override_background = council_chamber + + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:defiant_bishop + animation = priest_corrupt + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + any_vassal = { + government_has_flag = government_is_theocracy + faith = root.faith + is_available_ai_adult = yes + opinion = { + target = root + value < 20 + } + OR = { + has_trait = arrogant + has_trait = ambitious + } + NOR = { + has_trait = humble + has_trait = calm + } + } + } + + immediate = { + random_vassal = { + limit = { + government_has_flag = government_is_theocracy + faith = root.faith + is_available_ai_adult = yes + opinion = { + target = root + value < 20 + } + OR = { + has_trait = arrogant + has_trait = ambitious + } + NOR = { + has_trait = humble + has_trait = calm + } + } + save_scope_as = defiant_bishop + } + } + + option = { # Dazzle the bishop with religious knowledge + name = pam_secular_faith_events.0007.a + trigger = { + has_trait = lifestyle_scholar + } + show_as_unavailable = { + always = yes + } + add_prestige = medium_prestige_gain + add_piety = medium_piety_gain + scope:defiant_bishop = { + add_opinion = { + modifier = grateful_opinion + opinion = 50 + target = root + } + } + if = { + limit = { can_add_hook = { target = scope:defiant_bishop type = favor_hook } } + add_hook = { + type = favor_hook + target = scope:defiant_bishop + } + } + stress_and_fulfillment_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = arrogant factor = 0 } + } + } + + option = { # Let the smug clergy get to you + name = pam_secular_faith_events.0007.b + scope:defiant_bishop = { + add_prestige = medium_prestige_gain + add_opinion = { + modifier = grateful_opinion + opinion = 50 + target = root + } + } + add_piety = medium_piety_gain + add_prestige = medium_prestige_loss + ai_chance = { + base = 100 + } + } + + option = { # Send them packing + name = pam_secular_faith_events.0007.c + add_prestige = minor_prestige_gain + add_piety = minor_piety_loss + scope:defiant_bishop = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -20 + } + } + stress_and_fulfillment_impact = { + humble = minor_stress_impact_gain + patient = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = humble + has_trait = patient + has_trait = calm + } + factor = 0 + } + } + } +} + +########################################################################################## +# 0008 - The Weight of Sin (guilt after a deed) +########################################################################################## +pam_secular_faith_events.0008 = { + type = character_event + title = pam_secular_faith_events.0008.t + desc = pam_secular_faith_events.0008.desc + theme = christian + override_background = temple + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + } + + left_portrait = { + character = scope:confessor + animation = divine_gesture_3 + camera = camera_event_left_to_the_left + } + right_portrait = { + character = root + animation = mental_anguish + } + + cooldown = { years = 5 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + any_character_trait = { + has_trait_category = personality + root.rite = { trait_is_sin_rite = prev } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = confessor } + # Pick one sinful personality trait so the text and the penance name the same sin + random_character_trait = { + limit = { + has_trait_category = personality + save_temporary_scope_as = temp_trait + root.rite = { trait_is_sin_rite = scope:temp_trait } + } + save_scope_as = penance_sin + } + } + + option = { # Take up the penance the chaplain suggests + name = pam_secular_faith_events.0008.a + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + pam_apply_penance_modifier_effect = yes + stress_and_fulfillment_impact = { + base = medium_stress_impact_gain + cynical = minor_stress_impact_gain + humble = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # Sit with it; do nothing + name = pam_secular_faith_events.0008.b + stress_and_fulfillment_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = humble factor = 0 } + } + } +} + +########################################################################################## +# 0009 - A Christlike Stranger (Christ-in-disguise) +########################################################################################## +pam_secular_faith_events.0009 = { + type = character_event + title = pam_secular_faith_events.0009.t + desc = pam_secular_faith_events.0009.desc + theme = christian + override_background = { reference = courtyard } + override_effect_2d = { reference = rain } + + left_portrait = { + character = root + animation = contemplating + } + right_portrait = { + character = scope:stranger + animation = beg + } + + cooldown = { years = 100 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + is_ai = no + } + + immediate = { + create_character = { + location = root.capital_province + template = pam_sf_christlike_stranger_character + faith = root.faith + rite = root.rite + culture = root.culture + save_scope_as = stranger + after_creation = { + random_list = { + 100 = { + # Character is of average weight, nothing happens + } + 25 = { + change_current_weight = -25 + } + 25 = { + change_current_weight = -75 + } + 25 = { + change_current_weight = -100 + } + 5 = { + change_current_weight = -200 + } + } + add_character_flag = peasant_outfit + add_character_flag = created + } + } + } + + option = { # Welcome them into your hall + name = pam_secular_faith_events.0009.a + add_courtier = scope:stranger + hidden_effect = { + scope:stranger = { remove_character_flag = created } + } + trigger_event = { + id = pam_secular_faith_events.0010 + days = 30 + } + stress_and_fulfillment_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 + } + } + } + } + + option = { # Send them off with bread and a blessing + name = pam_secular_faith_events.0009.b + add_piety = minor_piety_gain + remove_short_term_gold = 1 + hidden_effect = { + scope:stranger = { silent_disappearance_effect = yes } + } + stress_and_fulfillment_impact = { + trusting = medium_stress_impact_gain + generous = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = generous + has_trait = compassionate + } + } + } + } +} + +########################################################################################## +# 0010 - Who Came In From the Cold (the stranger revealed) - scheduled follow-up to 0009 +########################################################################################## +pam_secular_faith_events.0010 = { + type = character_event + title = pam_secular_faith_events.0010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_variable = pam_sf_stranger_blessed } + desc = pam_secular_faith_events.0010.desc_blessed + } + triggered_desc = { + trigger = { has_variable = pam_sf_stranger_thief } + desc = pam_secular_faith_events.0010.desc_thief + } + } + } + theme = christian + override_background = sitting_room + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pam_sf_stranger_blessed } + animation = prayer_crossing + } + animation = mental_anguish + camera = camera_event_left_to_the_left + } + right_portrait = { + character = scope:stranger + triggered_animation = { + trigger = { root = { has_variable = pam_sf_stranger_blessed } } + animation = zealous_superior + } + animation = eccentric + } + + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + } + + trigger = { + exists = scope:stranger + scope:stranger = { + is_physically_able = yes + is_courtier_of = root + } + } + + immediate = { + scope:stranger = { + remove_character_flag = peasant_outfit + } + # A devout, learned host is likelier to have sheltered a true saint than let in a thief. + random_list = { + 50 = { + modifier = { + add = { + value = root.piety_level + multiply = 10 + } + piety_level >= 1 + } + modifier = { + add = { + value = root.learning + multiply = 2 + } + } + set_variable = pam_sf_stranger_blessed + } + 50 = { + set_variable = pam_sf_stranger_thief + hidden_effect = { + scope:stranger = { + select_and_move_to_pool_effect = yes + } + } + } + } + } + + option = { # The stranger proves a saintly paragon + name = pam_secular_faith_events.0010.a + trigger = { has_variable = pam_sf_stranger_blessed } + scope:stranger = { + hidden_effect = { + remove_any_education_traits_effect = yes + } + add_trait = shrewd + add_trait = education_learning_5 + add_trait = theologian + add_learning_skill = max_template_high_skill + add_stewardship_skill = max_template_high_skill + add_diplomacy_skill = max_template_high_skill + hidden_effect = { + force_character_skill_recalculation = yes + } + add_opinion = { + modifier = grateful_opinion + opinion = 30 + target = root + } + } + add_hook = { + type = loyalty_hook + target = scope:stranger + } + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + remove_variable = pam_sf_stranger_blessed + stress_and_fulfillment_impact = { + trusting = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { # The stranger proves a thief, already fled + name = pam_secular_faith_events.0010.b + trigger = { has_variable = pam_sf_stranger_thief } + remove_short_term_gold = medium_gold_value + add_stress = minor_stress_gain + change_spiritual_fulfillment = minor_spiritual_fulfillment_loss + scope:stranger = { + hidden_effect = { + remove_any_education_traits_effect = yes + } + add_gold = root.medium_gold_value + add_trait = shrewd + add_trait = education_intrigue_5 + add_intrigue_skill = max_template_high_skill + hidden_effect = { + force_character_skill_recalculation = yes + } + } + remove_variable = pam_sf_stranger_thief + stress_and_fulfillment_impact = { + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = trusting factor = 0 } + } + } +} + +########################################################################################## +# 0011 - The Penitents (a flagellant procession reaches the capital) +########################################################################################## +scripted_trigger pam_sf_penitent_pool_valid_trigger = { + is_available_healthy_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + faith = root.faith +} + +pam_secular_faith_events.0011 = { + type = character_event + title = pam_secular_faith_events.0011.t + desc = pam_secular_faith_events.0011.desc + theme = christian + override_background = courtyard + + left_portrait = { + character = scope:lead_penitent + animation = self_flagellation + camera = camera_event_very_right + } + right_portrait = { + character = scope:follower_penitent + animation = whipping + camera = camera_event_very_right_fov35 + } + + cooldown = { years = 30 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + is_landed = yes + exists = capital_county + rite = { + has_at_least_tenet_status = { + tenet = tenet_mortification_of_the_flesh + status = permitted + } + } + any_pool_character = { + province = root.location + pam_sf_penitent_pool_valid_trigger = yes + rite = { + has_at_least_tenet_status = { + tenet = tenet_mortification_of_the_flesh + status = permitted + } + } + count >= 2 + } + } + + immediate = { + random_pool_character = { + province = root.location + limit = { pam_sf_penitent_pool_valid_trigger = yes } + save_scope_as = lead_penitent + } + random_pool_character = { + province = root.location + limit = { + pam_sf_penitent_pool_valid_trigger = yes + this != scope:lead_penitent + } + save_scope_as = follower_penitent + } + hidden_effect = { + scope:lead_penitent = { + add_trait = flagellant + increase_wounds_effect = { REASON = whipping } + add_character_flag = peasant_outfit + add_character_flag = no_hat + } + scope:follower_penitent = { + add_trait = flagellant + increase_wounds_effect = { REASON = whipping } + add_character_flag = peasant_outfit + add_character_flag = no_hat + } + } + capital_county = { + change_county_control = -10 + add_county_modifier = { + modifier = pam_sf_flagellant_cults_county_modifier + years = 10 + } + } + } + + option = { # Study the phenomenon deeper + name = pam_secular_faith_events.0011.a + trigger = { + has_trait = lifestyle_scholar + } + show_as_unavailable = { + NOT = { + knows_tenet = tenet_exaltation_of_pain + } + } + add_scholar_trait_or_xp_effect = { VALUE = 10 } + if = { + limit = { + NOT = { + knows_tenet = tenet_mortification_of_the_flesh + } + } + add_known_tenet = tenet_mortification_of_the_flesh + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_mortification_of_the_flesh } + } + add_known_tenet = tenet_exaltation_of_pain + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_exaltation_of_pain } + stress_and_fulfillment_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = arrogant factor = 0 } + } + } + + option = { # Join them + name = pam_secular_faith_events.0011.b + if = { + limit = { + NOT = { + knows_tenet = tenet_mortification_of_the_flesh + } + } + add_known_tenet = tenet_mortification_of_the_flesh + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_mortification_of_the_flesh } + } + if = { + limit = { + NOT = { + has_trait = flagellant + } + } + add_trait = flagellant + } + add_piety = massive_piety_gain + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + increase_wounds_effect = { REASON = whipping } + add_courtier = scope:lead_penitent + add_courtier = scope:follower_penitent + stress_and_fulfillment_impact = { + base = medium_stress_impact_gain + humble = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 5 + modifier = { + OR = { + has_trait = cynical + has_trait = arrogant + has_trait = calm + } + factor = 0 + } + } + } + + option = { # Drive them off as fanatics + name = pam_secular_faith_events.0011.c + capital_county = { + remove_county_modifier = pam_sf_flagellant_cults_county_modifier + change_county_control = 10 + } + add_prestige = minor_prestige_gain + stress_and_fulfillment_impact = { + flagellant = massive_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = flagellant factor = 0 } + } + } +} + +########################################################################################## +# 0012 - Blessing of Arms (peacetime consecration) +########################################################################################## +pam_secular_faith_events.0012 = { + type = character_event + title = pam_secular_faith_events.0012.t + desc = pam_secular_faith_events.0012.desc + theme = christian + override_background = temple + widgets = { + widget = { + gui = event_window_widget_vfx_godray + container = background_shader_vfx_container + } + } + + left_portrait = { + character = root + animation = marshal + camera = camera_event_very_left + } + right_portrait = { + character = scope:chaplain + animation = situla + camera = camera_event_right_pointing_right + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + is_at_war = no + exists = house + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + ai_has_warlike_personality = yes + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # Consecrate your arms to the warrior-saint + name = pam_secular_faith_events.0012.a + add_piety = minor_piety_gain + add_character_modifier = { + modifier = pam_sf_consecrated_arms_modifier + years = 15 + } + ai_chance = { + base = 100 + modifier = { has_trait = craven factor = 0 } + } + } + + option = { # Knight your heir at the rite + name = pam_secular_faith_events.0012.b + add_piety = minor_piety_gain + dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + ai_chance = { + base = 100 + } + } + + option = { # Keep it modest + name = pam_secular_faith_events.0012.c + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = arrogant factor = 0 } + } + } +} + +########################################################################################## +# 0013 - A Death Foretold (stage 1: the warning) +########################################################################################## +scripted_trigger pam_sf_prophet_valid_trigger = { + is_available_healthy_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + faith = root.faith +} + +scripted_trigger pam_sf_doomed_soul_valid_trigger = { + is_available_ai_adult = yes + OR = { + is_old_character = yes + has_any_illness = yes + health <= poor_health + } + trigger_if = { + limit = { exists = root.primary_heir } + NOT = { this = root.primary_heir } + } + trigger_if = { + limit = { exists = root.primary_spouse } + NOT = { this = root.primary_spouse } + } +} + +pam_secular_faith_events.0013 = { + type = character_event + title = pam_secular_faith_events.0013.t + desc = pam_secular_faith_events.0013.desc + theme = christian + override_background = throne_room + + left_portrait = { + character = scope:doomed_soul + animation = fear + camera = camera_event_very_left + } + right_portrait = { + character = scope:prophet + animation = condemnation + camera = camera_event_very_right_fov35 + } + + cooldown = { years = 100 } + + trigger = { + is_ai = no # Prevent too many inspirations + pam_secular_faith_christian_actor_trigger = yes + any_pool_character = { + province = root.location + pam_sf_prophet_valid_trigger = yes + } + any_courtier = { + pam_sf_doomed_soul_valid_trigger = yes + } + } + + immediate = { + random_pool_character = { + province = root.location + limit = { pam_sf_prophet_valid_trigger = yes } + hidden_effect = { + if = { + limit = { + NOT = { + has_trait = devoted + } + } + add_trait = devoted + } + } + hidden_effect = { + if = { + limit = { + NOT = { + has_trait = possessed_1 + } + } + add_trait = possessed_1 + } + } + save_scope_as = prophet + } + random_courtier = { + limit = { + pam_sf_doomed_soul_valid_trigger = yes + NOT = { this = scope:prophet } + } + save_scope_as = doomed_soul + } + } + + option = { # Believe him - see to their soul + name = pam_secular_faith_events.0013.a + flavor = prophecy_foretold_tt + save_scope_value_as = { name = prophet_stance value = flag:heeded } + trigger_event = { id = pam_secular_faith_events.0014 days = 30 } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # Mock him and cast him out + name = pam_secular_faith_events.0013.b + flavor = prophecy_foretold_2_tt + save_scope_value_as = { name = prophet_stance value = flag:mocked } + trigger_event = { id = pam_secular_faith_events.0014 days = 30 } + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } +} + +########################################################################################## +# 0014 - Prophetic Reckoning (A Death Foretold stage 2) - scheduled follow-up to 0013 +########################################################################################## +pam_secular_faith_events.0014 = { + type = character_event + title = pam_secular_faith_events.0014.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:doomed_soul = { is_alive = no } } + desc = pam_secular_faith_events.0014.desc_fulfilled + } + triggered_desc = { + trigger = { always = yes } + desc = pam_secular_faith_events.0014.desc_failed + } + } + triggered_desc = { + trigger = { + OR = { + AND = { + scope:prophet_stance = flag:heeded + scope:doomed_soul = { is_alive = yes } + } + AND = { + scope:prophet_stance = flag:mocked + scope:doomed_soul = { is_alive = no } + } + } + } + desc = pam_secular_faith_events.0014.desc_wrong_prediction + } + } + theme = christian + override_background = throne_room + + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:doomed_soul ?= { + is_alive = no + } + } + animation = interested + } + animation = dismissal + } + + right_portrait = { + character = scope:prophet + triggered_animation = { + trigger = { + scope:doomed_soul ?= { + is_alive = no + } + } + animation = zealous_superior + } + animation = priest_corrupt + } + + lower_center_portrait = { + character = scope:doomed_soul + triggered_animation = { + trigger = { + scope:doomed_soul ?= { + is_alive = no + } + } + animation = dead + } + animation = happiness + } + + trigger = { + exists = scope:prophet + exists = scope:doomed_soul + exists = scope:prophet_stance + } + + immediate = { + hidden_effect = { + scope:doomed_soul = { + if = { + limit = { + is_alive = yes + } + random = { + chance = { + value = 25 + if = { + limit = { + scope:prophet_stance = flag:heeded + } + add = 50 + } + } + death = { death_reason = death_natural_causes } + } + } + } + } + } + + # Heeded, and the doom came as foretold, gain an inspiration + option = { + name = pam_secular_faith_events.0014.a + trigger = { + scope:prophet_stance = flag:heeded + scope:doomed_soul = { is_alive = no } + } + add_piety = medium_piety_gain + add_courtier = scope:prophet + custom_tooltip = gains_religious_inspiration_tt + scope:prophet = { + add_learning_skill = 12 + hidden_effect = { + force_character_skill_recalculation = yes + } + create_inspiration = religious_inspiration + } + create_character_memory = { + type = pam_sf_prophecy_fulfilled_memory + participants = { + prophet = scope:prophet + doomed = scope:doomed_soul + } + } + ai_chance = { base = 100 } + } + + # Heeded, and the doom came as foretold, gain SF + option = { + name = pam_secular_faith_events.0014.b + trigger = { + scope:prophet_stance = flag:heeded + scope:doomed_soul = { is_alive = no } + } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + create_character_memory = { + type = pam_sf_prophecy_fulfilled_memory + participants = { + prophet = scope:prophet + doomed = scope:doomed_soul + } + } + ai_chance = { base = 100 } + } + + # Heeded, but the death didn't happen + option = { + name = pam_secular_faith_events.0014.c + trigger = { + scope:prophet_stance = flag:heeded + scope:doomed_soul = { is_alive = yes } + } + change_spiritual_fulfillment = minor_spiritual_fulfillment_loss + add_stress = minor_stress_gain + ai_chance = { base = 100 } + } + + # Mocked, and the doom fell all the same + option = { + name = pam_secular_faith_events.0014.d + trigger = { + scope:prophet_stance = flag:mocked + scope:doomed_soul = { is_alive = no } + } + change_spiritual_fulfillment = minor_spiritual_fulfillment_loss + add_stress = minor_stress_gain + create_character_memory = { + type = pam_sf_prophecy_fulfilled_memory + participants = { + prophet = scope:prophet + doomed = scope:doomed_soul + } + } + ai_chance = { base = 100 } + } + + # Mocked, and the doom never came + option = { + name = pam_secular_faith_events.0014.e + trigger = { + scope:prophet_stance = flag:mocked + scope:doomed_soul = { is_alive = yes } + } + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + ai_chance = { base = 100 } + } +} + +########################################################################################## +# 0015 - The Weeping Icon +########################################################################################## +pam_secular_faith_events.0015 = { + type = character_event + title = pam_secular_faith_events.0015.t + desc = pam_secular_faith_events.0015.desc + theme = christian + override_background = temple_church + override_effect_2d = { reference = legend_glow } + widgets = { + widget = { + gui = event_window_widget_vfx_godray + container = background_shader_vfx_container + } + } + + left_portrait = { + character = scope:chaplain + animation = divine_ecstasy + } + right_portrait = { + character = root + animation = prayer_standing_eyes + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + rite = { NOT = { rite_has_tenet = tenet_aniconism } } + capital_county ?= { + any_county_province = { has_holding_type = church_holding } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + capital_county = { + random_county_province = { + limit = { has_holding_type = church_holding } + barony = { save_scope_as = miracle_church } + } + } + } + + option = { # Investigate it coolly + name = pam_secular_faith_events.0015.a + flavor = no_miracles_tt + trigger = { + learning >= 12 + } + show_as_unavailable = { always = yes } + add_scholar_trait_or_xp_effect = { VALUE = 20 } + if = { + limit = { can_add_hook = { target = scope:chaplain type = weak_blackmail_hook_no_secret } } + add_hook = { + type = weak_blackmail_hook_no_secret + target = scope:chaplain + } + } + ai_chance = { + base = 100 + } + } + + option = { # Proclaim it and open your chapel to pilgrims + name = pam_secular_faith_events.0015.b + scope:miracle_church.title_province = { + add_province_modifier = { + modifier = pam_sf_site_of_miracle_county_modifier + years = 15 + } + } + add_piety = major_piety_gain + ai_chance = { + base = 100 + } + } + + option = { # Keep it as a private grace + name = pam_secular_faith_events.0015.c + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + add_character_modifier = { + modifier = pam_sf_grace_modifier + years = 15 + } + scope:chaplain = { + add_opinion = { + target = root + modifier = upset_opinion + opinion = -10 + } + } + stress_and_fulfillment_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = arrogant factor = 0 } + } + } + + option = { # Nonsense + name = pam_secular_faith_events.0015.d + add_prestige = miniscule_prestige_gain + stress_and_fulfillment_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = humble factor = 0 } + } + } +} + +########################################################################################## +# 0016 - A Price for the Pulpit (simony: a wanderer buys the realm-priest office) +########################################################################################## +scripted_effect pam_sf_install_bought_priest_effect = { + hidden_effect = { + add_courtier = scope:candidate + } + assign_councillor_type = { + type = councillor_court_chaplain + target = scope:candidate + remove_existing_councillor = yes + } + if = { + limit = { can_add_hook = { target = scope:candidate type = favor_hook } } + add_hook = { + type = favor_hook + target = scope:candidate + } + } + if = { + limit = { can_set_relation_rival_trigger = { CHARACTER = scope:old_realm_priest } } + set_relation_potential_rival = { + target = scope:old_realm_priest + reason = pam_sf_rival_bought_office + } + } +} + +scripted_trigger pam_sf_bought_priest_candidate_valid_trigger = { + is_available_healthy_ai_adult = yes + faith = root.faith + root.faith = { has_allowed_gender_for_clergy = prev } + can_be_court_chaplain_trigger = { COURT_OWNER = root } +} + +pam_secular_faith_events.0016 = { + type = character_event + title = pam_secular_faith_events.0016.t + desc = { + desc = pam_secular_faith_events.0016.desc_intro + first_valid = { + triggered_desc = { + trigger = { + rite = { rite_has_tenet = tenet_simony } + } + desc = pam_secular_faith_events.0016.desc_sanctioned + } + triggered_desc = { + trigger = { always = yes } + desc = pam_secular_faith_events.0016.desc_sinful + } + } + } + theme = christian + override_background = council_chamber + + left_portrait = { + character = root + animation = contemplating + } + right_portrait = { + character = scope:candidate + animation = bribing + camera = camera_event_very_right_fov35 + } + lower_center_portrait = { + character = scope:old_realm_priest + animation = divine_gesture_3 + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + is_landed = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + is_ruler = no + } + any_pool_character = { + province = root.location + pam_sf_bought_priest_candidate_valid_trigger = yes + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = old_realm_priest } + random_pool_character = { + province = root.location + limit = { pam_sf_bought_priest_candidate_valid_trigger = yes } + weight = { + base = 1 + modifier = { + add = gold + gold >= 1 + } + modifier = { + add = { + value = learning + multiply = 3 + } + learning >= 8 + } + } + save_scope_as = candidate + hidden_effect = { + if = { + limit = { + gold < root.major_gold_value + } + add_gold = root.major_gold_value + } + } + } + } + + option = { # Forbidden simony - take the bribe and install him anyway + name = pam_secular_faith_events.0016.a + trigger = { + NOR = { + rite = { rite_has_tenet = tenet_simony } + has_personal_tenet = tenet_simony + } + } + scope:candidate = { + pay_short_term_gold = { + target = root + gold = root.major_gold_value + } + } + pam_sf_install_bought_priest_effect = yes + add_piety = medium_piety_loss + change_spiritual_fulfillment = minor_spiritual_fulfillment_loss + stress_and_fulfillment_impact = { + just = medium_stress_impact_gain + humble = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = just + has_trait = humble + has_trait = generous + } + factor = 0 + } + } + } + + option = { # Sanctioned simony - the rite or a personal tenet permits the sale + name = pam_secular_faith_events.0016.b + trigger = { + OR = { + rite = { rite_has_tenet = tenet_simony } + has_personal_tenet = tenet_simony + } + } + scope:candidate = { + pay_short_term_gold = { + target = root + gold = root.major_gold_value + } + } + pam_sf_install_bought_priest_effect = yes + stress_and_fulfillment_impact = { + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = generous factor = 0 } + } + } + + option = { # Refuse the coin and keep your own priest + name = pam_secular_faith_events.0016.c + add_prestige = minor_prestige_gain + if = { + limit = { + NOT = { + rite = { rite_has_tenet = tenet_simony } + } + } + add_piety = minor_piety_gain + } + stress_and_fulfillment_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = greedy factor = 0 } + } + } +} + +########################################################################################## +# 0017 - A Heretic at Court +########################################################################################## +scripted_trigger pam_sf_court_heretic_valid_trigger = { + is_adult = yes + faith != root.faith + faith = { + faith_hostility_level = { + target = root.faith + value > faith_astray_level + } + } +} + +pam_secular_faith_events.0017 = { + type = character_event + title = pam_secular_faith_events.0017.t + desc = pam_secular_faith_events.0017.desc + theme = christian + override_background = relaxing_room + + left_portrait = { + character = scope:accused + animation = zealous_superior + camera = camera_event_very_left + } + right_portrait = { + character = scope:chaplain + animation = condemnation + camera = camera_event_very_right_fov35 + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + has_personality_submissive_trigger = no + } + any_courtier = { + pam_sf_court_heretic_valid_trigger = yes + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + # Prefer a heretic the ruler is already warming to, so the "shield them" friendship payoff lands. + random_courtier = { + limit = { pam_sf_court_heretic_valid_trigger = yes } + weight = { + base = 1 + modifier = { + add = 100 + has_relation_potential_friend = root + } + } + save_scope_as = accused + } + } + + option = { # Reason with them and win them to the faith + name = pam_secular_faith_events.0017.a + skill = diplomacy + duel = { + skill = diplomacy + target = scope:accused + 50 = { # Reason prevails - they convert willingly + compare_modifier = { + value = scope:duel_value + multiplier = 3.0 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_secular_faith_events.0017.a.success + left_icon = scope:accused + right_icon = root + scope:accused = { set_character_rite = root.rite } + add_piety = minor_piety_gain + } + } + 50 = { # They will not be moved, and resent the pressure + compare_modifier = { + value = scope:duel_value + multiplier = -3.0 + } + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_secular_faith_events.0017.a.failure + left_icon = scope:accused + right_icon = root + scope:accused = { + add_opinion = { + modifier = unwanted_religious_conversion_opinion + target = root + } + } + } + } + } + scope:chaplain = { + add_opinion = { + modifier = pious_opinion + opinion = 20 + target = root + } + } + ai_chance = { + base = 100 + } + } + + option = { # Cast the heretic into a cell + name = pam_secular_faith_events.0017.b + rightfully_imprison_character_effect = { TARGET = scope:accused IMPRISONER = root } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_gain + } + scope:chaplain = { + add_opinion = { + modifier = pious_opinion + opinion = 20 + target = root + } + } + ai_chance = { + base = 100 + modifier = { has_trait = compassionate factor = 0 } + } + } + + option = { # Shield them from the clergy + name = pam_secular_faith_events.0017.c + scope:chaplain = { + add_opinion = { + modifier = impious_opinion + opinion = -10 + target = root + } + } + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:accused } + } + set_relation_friend = { + target = scope:accused + reason = pam_sf_friend_shielded + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } +} + +########################################################################################## +# 0018 - A Child for God (oblation) +########################################################################################## +scripted_trigger pam_sf_oblation_child_valid_trigger = { + is_available = yes + is_ruler = no + liege ?= root + OR = { + has_trait_submissive_trigger = yes + has_trait_introverted_trigger = yes + } + age <= 15 + age >= 7 + NOR = { + has_character_flag = pam_sf_oblation_asked + exists = betrothed + has_trait_extroverted_trigger = yes + has_trait_dominant_trigger = yes + } + faith = root.faith +} + +pam_secular_faith_events.0018 = { + type = character_event + title = pam_secular_faith_events.0018.t + desc = pam_secular_faith_events.0018.desc + theme = christian + override_background = temple + + left_portrait = { + character = scope:chaplain + animation = divine_gesture_3 + camera = camera_event_very_left + } + right_portrait = { + character = scope:pious_child + animation = prayer_standing + camera = camera_event_very_right_fov35 + } + lower_center_portrait = scope:clerical_holder + + cooldown = { years = 5 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + is_landed = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + any_child = { + pam_sf_oblation_child_valid_trigger = yes + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + random_child = { + limit = { pam_sf_oblation_child_valid_trigger = yes } + save_scope_as = pious_child + add_character_flag = pam_sf_oblation_asked + } + if = { + limit = { + exists = capital_county.clerical_region_title.holder + capital_county.clerical_region_title.holder != root + capital_county.clerical_region_title.holder = { is_ai = yes } + } + capital_county.clerical_region_title.holder = { save_scope_as = clerical_holder } + } + } + + option = { # Make them an Oblate + name = pam_secular_faith_events.0018.a + add_piety = major_piety_gain + scope:pious_child = { + change_spiritual_fulfillment = massive_spiritual_fulfillment_value + add_stress = major_stress_loss + add_trait = devoted + add_opinion = { + target = root + modifier = happy_opinion + opinion = 50 + } + add_trait_xp = { + trait = devoted + value = 30 + } + } + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # Make them an Oblate + name = pam_secular_faith_events.0018.b + trigger = { + exists = scope:clerical_holder + } + add_piety = major_piety_gain + scope:clerical_holder = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + add_courtier = scope:pious_child + } + scope:pious_child = { + change_spiritual_fulfillment = massive_spiritual_fulfillment_value + add_stress = major_stress_loss + add_trait = devoted + add_opinion = { + target = root + modifier = happy_opinion + opinion = 50 + } + add_trait_xp = { + trait = devoted + value = 30 + } + } + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # Deny + name = pam_secular_faith_events.0018.c + add_prestige = miniscule_prestige_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = zealous + has_trait = humble + has_trait = compassionate + } + factor = 0 + } + } + } +} + +########################################################################################## +# 0019 - The Peace of God +########################################################################################## +scripted_trigger pam_sf_vassal_feud_war_trigger = { + primary_attacker = { is_vassal_of = root is_ai = yes } + primary_defender = { is_vassal_of = root is_ai = yes } + NOT = { any_war_participant = { is_ai = no } } +} + +# Ends every qualifying vassal feud in a white peace, processing each war once from its attacker's side. +scripted_effect pam_sf_end_vassal_feuds_effect = { + every_vassal = { + limit = { is_ai = yes } + save_temporary_scope_as = peace_vassal + every_character_war = { + limit = { + primary_attacker = { this = scope:peace_vassal } + pam_sf_vassal_feud_war_trigger = yes + } + end_war = white_peace + } + } +} + +pam_secular_faith_events.0019 = { + type = character_event + title = pam_secular_faith_events.0019.t + desc = pam_secular_faith_events.0019.desc + theme = christian + override_background = temple + + left_portrait = { + character = scope:chaplain + animation = divine_gesture_4 + camera = camera_event_very_left + } + right_portrait = { + character = root + animation = contemplating + } + lower_left_portrait = { + character = scope:feud_attacker + animation = war_over_win + } + lower_right_portrait = { + character = scope:feud_defender + animation = war_attacker + } + + cooldown = { years = 10 } + + # Fires when two of the ruler's direct vassals (AI only, no player) are at war with each other. + trigger = { + pam_secular_faith_christian_actor_trigger = yes + rite = { + has_at_least_tenet_status = { + tenet = tenet_peace_of_god + status = permitted + } + } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + NOT = { + has_relation_rival = root + } + is_at_war = no + } + any_vassal = { + any_character_war = { pam_sf_vassal_feud_war_trigger = yes } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + # Put a face on the unrest: name one feuding pair for the scene. + random_vassal = { + limit = { + any_character_war = { pam_sf_vassal_feud_war_trigger = yes } + } + random_character_war = { + limit = { pam_sf_vassal_feud_war_trigger = yes } + primary_attacker = { save_scope_as = feud_attacker } + primary_defender = { save_scope_as = feud_defender } + } + } + } + + option = { # Proclaim and enforce the Peace of God + name = pam_secular_faith_events.0019.a + custom_tooltip = pam_sf_peace_of_god_ends_wars_tt + add_piety = major_piety_gain + add_character_modifier = { + modifier = pam_sf_peace_of_god_modifier + years = 10 + } + hidden_effect = { pam_sf_end_vassal_feuds_effect = yes } + ai_chance = { + base = 100 + } + } + + option = { # Broker the peace, and bind the lords to you + name = pam_secular_faith_events.0019.b + custom_tooltip = pam_sf_peace_of_god_ends_wars_tt + add_piety = minor_piety_gain + if = { + limit = { can_add_hook = { target = scope:feud_attacker type = favor_hook } } + add_hook = { type = favor_hook target = scope:feud_attacker } + } + if = { + limit = { can_add_hook = { target = scope:feud_defender type = favor_hook } } + add_hook = { type = favor_hook target = scope:feud_defender } + } + hidden_effect = { pam_sf_end_vassal_feuds_effect = yes } + stress_and_fulfillment_impact = { + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = just factor = 0 } + } + } + + option = { # Let them settle it with steel + name = pam_secular_faith_events.0019.c + add_prestige = minor_prestige_gain + stress_and_fulfillment_impact = { + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + } + } + } + } +} + +########################################################################################## +# 0020 - The Consecration (fired from on_building_completed; not in the yearly pool) +########################################################################################## +pam_secular_faith_events.0020 = { + type = character_event + title = pam_secular_faith_events.0020.t + desc = pam_secular_faith_events.0020.desc + theme = christian + override_background = holy_site_generic_scope + override_effect_2d = { reference = smoke } + + left_portrait = { + character = root + animation = prayer_standing_eyes + camera = camera_event_left_away_3_4 + } + right_portrait = { + character = scope:chaplain + animation = thurible + camera = camera_event_right_away + } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + exists = scope:pam_sf_consecrated_county + NOT = { has_character_flag = pam_sf_first_church_consecrated } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + } + + immediate = { + add_character_flag = pam_sf_first_church_consecrated + scope:pam_sf_consecrated_county = { + save_scope_as = consecrated_county + save_scope_as = holy_site_scope + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # Give thanks - piety, peace of soul, and the clergy's favor + name = pam_secular_faith_events.0020.a + add_piety = medium_piety_gain + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + ai_chance = { + base = 100 + } + } + + option = { # Endow it richly - the parish quickens the county + name = pam_secular_faith_events.0020.b + scope:consecrated_county = { + change_development_progress = major_development_progress_gain + add_county_modifier = { + modifier = pam_sf_consecrated_county_modifier + years = 10 + } + } + ai_chance = { + base = 100 + } + } + + option = { # Found a school beside the altar + name = pam_secular_faith_events.0020.c + add_scholar_trait_or_xp_effect = { VALUE = 40 } + add_learning_lifestyle_xp = major_lifestyle_xp + ai_chance = { + base = 100 + } + } + + option = { # Vow that this is the first of many + name = pam_secular_faith_events.0020.d + add_character_modifier = { modifier = pam_sf_church_builder_modifier } + add_piety = minor_piety_gain + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0021 - A Sign in the Heavens (an omen) +########################################################################################## +pam_secular_faith_events.0021 = { + type = character_event + title = pam_secular_faith_events.0021.t + desc = pam_secular_faith_events.0021.desc + theme = christian + override_background = courtyard + + left_portrait = { + character = root + animation = divine_ecstasy + camera = camera_event_right_fully_away + } + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_godray container = foreground_shader_vfx_container } + } + + cooldown = { years = 15 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + } + + option = { # Scholar: chart it as the learned do + name = pam_secular_faith_events.0021.a + trigger = { has_trait = lifestyle_scholar } + show_as_unavailable = { always = yes } + add_scholar_trait_or_xp_effect = { VALUE = 40 } + add_learning_lifestyle_xp = major_lifestyle_xp + ai_chance = { + base = 100 + } + } + + option = { # Astrologer's eye: cast its meaning by the stars + name = pam_secular_faith_events.0021.b + trigger = { learning >= 12 } + skill = learning + show_as_unavailable = { always = yes } + add_character_modifier = { + modifier = pam_sf_favorable_omen_modifier + years = 15 + } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # Soldier's read: an omen of conquest + name = pam_secular_faith_events.0021.c + trigger = { martial >= 12 } + skill = martial + show_as_unavailable = { always = yes } + add_character_modifier = { + modifier = pam_sf_omen_of_victory_modifier + years = 15 + } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # Read nothing into it + name = pam_secular_faith_events.0021.d + add_piety = minor_piety_gain + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0022 - The King's Touch +########################################################################################## +scripted_effect pam_secular_faith_recover_from_any_disease_effect = { + if = { limit = { has_trait = ill } recover_from_disease_effect = { DISEASE = ill } } + if = { limit = { has_trait = pneumonic } recover_from_disease_effect = { DISEASE = pneumonic } } + if = { limit = { has_trait = gout_ridden } recover_from_disease_effect = { DISEASE = gout_ridden } } + if = { limit = { has_trait = typhus } recover_from_disease_effect = { DISEASE = typhus } } + if = { limit = { has_trait = consumption } recover_from_disease_effect = { DISEASE = consumption } } + if = { limit = { has_trait = cancer } recover_from_disease_effect = { DISEASE = cancer } } + if = { limit = { has_trait = lovers_pox } recover_from_disease_effect = { DISEASE = lovers_pox } } + if = { limit = { OR = { has_trait = great_pox has_trait = early_great_pox } } recover_from_disease_effect = { DISEASE = great_pox } } + if = { limit = { has_trait = smallpox } recover_from_disease_effect = { DISEASE = smallpox } } + if = { limit = { has_trait = bubonic_plague } recover_from_disease_effect = { DISEASE = bubonic_plague } } + if = { limit = { has_trait = measles } recover_from_disease_effect = { DISEASE = measles } } + if = { limit = { has_trait = dysentery } recover_from_disease_effect = { DISEASE = dysentery } } + if = { limit = { has_trait = ergotism } recover_from_disease_effect = { DISEASE = ergotism } } +} + +scripted_effect pam_secular_faith_contract_disease_from_effect = { + if = { limit = { $GIVER$ = { has_trait = bubonic_plague } } contract_disease_effect = { DISEASE = bubonic_plague TREATMENT_EVENT = yes } } + else_if = { limit = { $GIVER$ = { has_trait = smallpox } } contract_disease_effect = { DISEASE = smallpox TREATMENT_EVENT = yes } } + else_if = { limit = { $GIVER$ = { has_trait = typhus } } contract_disease_effect = { DISEASE = typhus TREATMENT_EVENT = yes } } + else_if = { limit = { $GIVER$ = { has_trait = consumption } } contract_disease_effect = { DISEASE = consumption TREATMENT_EVENT = yes } } + else_if = { limit = { $GIVER$ = { has_trait = pneumonic } } contract_disease_effect = { DISEASE = pneumonic TREATMENT_EVENT = yes } } + else_if = { limit = { $GIVER$ = { has_trait = measles } } contract_disease_effect = { DISEASE = measles TREATMENT_EVENT = yes } } + else_if = { limit = { $GIVER$ = { has_trait = dysentery } } contract_disease_effect = { DISEASE = dysentery TREATMENT_EVENT = yes } } + else_if = { limit = { $GIVER$ = { has_trait = ill } } contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } } +} + +scripted_trigger pam_sf_kings_touch_patient_valid_trigger = { + is_available_ai_adult = yes + is_clergy = no + NOR = { + has_relation_rival = root + is_close_family_of = root + } + ai_zeal >= 0 + faith = root.faith + any_character_trait = { + has_trait_flag = illness + } +} + +scripted_trigger pam_sf_kings_touch_contagion_possible_trigger = { + OR = { + AND = { scope:sick_courtier = { has_trait = bubonic_plague } can_contract_disease_trigger = { DISEASE = bubonic_plague } } + AND = { scope:sick_courtier = { has_trait = smallpox } can_contract_disease_trigger = { DISEASE = smallpox } } + AND = { scope:sick_courtier = { has_trait = typhus } can_contract_disease_trigger = { DISEASE = typhus } } + AND = { scope:sick_courtier = { has_trait = consumption } can_contract_disease_trigger = { DISEASE = consumption } } + AND = { scope:sick_courtier = { has_trait = pneumonic } can_contract_disease_trigger = { DISEASE = pneumonic } } + AND = { scope:sick_courtier = { has_trait = measles } can_contract_disease_trigger = { DISEASE = measles } } + AND = { scope:sick_courtier = { has_trait = dysentery } can_contract_disease_trigger = { DISEASE = dysentery } } + AND = { scope:sick_courtier = { has_trait = ill } can_contract_disease_trigger = { DISEASE = ill } } + } +} + +pam_secular_faith_events.0022 = { + type = character_event + title = pam_secular_faith_events.0022.t + desc = { + desc = pam_secular_faith_events.0022.desc_intro + first_valid = { + triggered_desc = { + trigger = { scope:illness_trait = trait:ill } + desc = pam_secular_faith_events.0022.desc_ill + } + desc = pam_secular_faith_events.0022.desc_other + } + desc = pam_secular_faith_events.0022.desc_end + } + theme = christian + override_background = sitting_room + + left_portrait = { + character = root + animation = divine_gesture_1 + } + right_portrait = { + character = scope:sick_courtier + animation = sick + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + any_courtier = { + pam_sf_kings_touch_patient_valid_trigger = yes + } + court_physician_available_trigger = yes + } + + immediate = { + random_courtier = { + limit = { pam_sf_kings_touch_patient_valid_trigger = yes } + save_scope_as = sick_courtier + random_character_trait = { + limit = { + has_trait_flag = illness + } + save_scope_as = illness_trait + } + } + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + + option = { # Lay your hands on them yourself + name = pam_secular_faith_events.0022.a + add_internal_flag = dangerous + custom_tooltip = pam_sf_kings_touch_gamble_tt + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + scope:sick_courtier = { + add_opinion = { + modifier = grateful_opinion + opinion = 30 + target = root + } + } + if = { + limit = { can_add_hook = { target = scope:sick_courtier type = favor_hook } } + add_hook = { + type = favor_hook + target = scope:sick_courtier + } + } + hidden_effect = { + random_list = { + # Cured - comfort, good nursing and the will to live rally the body + 35 = { + modifier = { add = 15 learning >= 8 } + modifier = { add = 10 piety_level >= 3 } + create_character_memory = { + type = pam_sf_kings_touch_healing_memory + participants = { healed_subject = scope:sick_courtier } + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_sf_kings_touch_cured_toast + left_icon = scope:sick_courtier + right_icon = root + scope:sick_courtier = { pam_secular_faith_recover_from_any_disease_effect = yes } + } + } + # The sickness passes to you + 10 = { + trigger = { pam_sf_kings_touch_contagion_possible_trigger = yes } + modifier = { add = 15 health <= 3 } + modifier = { add = 10 age >= 50 } + send_interface_toast = { + type = event_toast_effect_bad + title = pam_sf_kings_touch_infected_toast + left_icon = root + pam_secular_faith_contract_disease_from_effect = { GIVER = scope:sick_courtier } + } + } + # The touch changes nothing + 55 = { + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_sf_kings_touch_nothing_toast + left_icon = scope:sick_courtier + } + } + } + } + stress_and_fulfillment_impact = { + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = craven factor = 0 } + } + } + + option = { # Bless them from a safe distance + name = pam_secular_faith_events.0022.b + add_piety = minor_piety_gain + scope:sick_courtier = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0023 - A Wandering Scribe +########################################################################################## +scripted_trigger pam_sf_scriptorium_scholar_valid_trigger = { + is_available_healthy_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + faith = root.faith + root.faith = { has_allowed_gender_for_clergy = prev } + OR = { + learning >= 12 + has_trait = theologian + has_trait = erudite + has_trait = lifestyle_scholar + } +} + +pam_secular_faith_events.0023 = { + type = character_event + title = pam_secular_faith_events.0023.t + desc = pam_secular_faith_events.0023.desc + theme = christian + override_background = study + + left_portrait = { + character = scope:scholar + animation = divine_gesture_4 + } + right_portrait = { + character = root + animation = contemplating + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + any_pool_character = { + province = root.location + pam_sf_scriptorium_scholar_valid_trigger = yes + } + } + + immediate = { + random_pool_character = { + province = root.location + limit = { pam_sf_scriptorium_scholar_valid_trigger = yes } + save_scope_as = scholar + hidden_effect = { + change_current_weight = -125 + add_trait = lifestyle_scholar + } + } + if = { + limit = { capital_county = { any_county_province = { has_holding_type = church_holding } } } + capital_county = { + random_county_province = { + limit = { has_holding_type = church_holding } + barony = { save_scope_as = scholar_church } + } + } + } + } + + option = { # Study alongside them - a learned ruler deepens their own scholarship + name = pam_secular_faith_events.0023.a + trigger = { learning >= 12 } + skill = learning + show_as_unavailable = { always = yes } + remove_short_term_gold = miniscule_gold_value + add_courtier = scope:scholar + add_scholar_trait_or_xp_effect = { VALUE = 50 } + ai_chance = { + base = 100 + } + } + + option = { # Set them to keep the books at a named church - the county prospers for it + name = pam_secular_faith_events.0023.b + trigger = { exists = scope:scholar_church } + remove_short_term_gold = miniscule_gold_value + scope:scholar = { + set_location = scope:scholar_church.title_province + } + scope:scholar_church.title_province = { + add_province_modifier = { + modifier = pam_sf_scriptorium_county_modifier + years = 10 + } + } + add_piety = minor_piety_gain + ai_chance = { + base = 100 + } + } + + option = { # Take them into my own service + name = pam_secular_faith_events.0023.c + remove_short_term_gold = miniscule_gold_value + add_courtier = scope:scholar + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + add_learning_lifestyle_xp = medium_lifestyle_xp + ai_chance = { + base = 100 + } + } + + option = { # Send them on their way + name = pam_secular_faith_events.0023.d + stress_and_fulfillment_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = compassionate + } + } + } + } +} + +########################################################################################## +# 0024 - Into the Cloister (a rival nudged toward holy vows) +########################################################################################## +scripted_trigger pam_sf_cloister_rival_valid_trigger = { + is_available_adult = yes + is_ruler = no + is_courtier_of = root + has_relation_rival = root +} + +pam_secular_faith_events.0024 = { + type = character_event + title = pam_secular_faith_events.0024.t + desc = pam_secular_faith_events.0024.desc + theme = christian + override_background = temple + + left_portrait = { + character = scope:archbishop + animation = priest_good + camera = camera_event_very_left + } + right_portrait = { + character = scope:rival_character + animation = disapproval + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + exists = capital_county.clerical_region_title.holder + capital_county.clerical_region_title.holder = { + this != root + is_ai = yes + } + any_courtier = { + pam_sf_cloister_rival_valid_trigger = yes + } + } + + immediate = { + capital_county.clerical_region_title = { save_scope_as = archdiocese } + capital_county.clerical_region_title.holder = { save_scope_as = archbishop } + random_courtier = { + limit = { pam_sf_cloister_rival_valid_trigger = yes } + save_scope_as = rival_character + } + } + + option = { # Force them to take the vows + name = pam_secular_faith_events.0024.a + add_piety = medium_piety_gain + scope:rival_character = { + add_trait = devoted + add_character_modifier = { + modifier = pam_sf_humiliated_modifier + years = 15 + } + if = { + limit = { + can_set_relation_nemesis_trigger = { CHARACTER = root } + } + progress_towards_nemesis_effect = { + REASON = pam_sf_nemesis_forced_to_cloister + CHARACTER = root + OPINION = 0 + } + add_opinion = { + target = root + modifier = hate_opinion + opinion = -30 + } + if = { + limit = { is_married = yes } + every_spouse = { divorce = scope:rival_character } + } + if = { + limit = { exists = betrothed } + break_betrothal = betrothed + } + } + } + scope:archbishop = { + add_courtier = scope:rival_character + add_opinion = { + modifier = grateful_opinion + opinion = 30 + target = root + } + } + stress_and_fulfillment_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 = { # Keep them where I can watch them + name = pam_secular_faith_events.0024.b + add_prestige = minor_prestige_gain + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0025 - Godfather/Godmother (sponsoring a convert's baptism) +########################################################################################## +scripted_trigger pam_sf_baptism_convert_valid_trigger = { + is_available_ai_adult = yes + religion != root.religion + religion != religion:judaism_religion + NOR = { + has_relation_rival = root + has_character_flag = ai_will_not_convert + culture = { + has_cultural_tradition = tradition_diasporic + } + } +} + +pam_secular_faith_events.0025 = { + type = character_event + title = pam_secular_faith_events.0025.t + desc = pam_secular_faith_events.0025.desc + theme = christian + override_background = temple + + left_portrait = { + character = root + animation = divine_gesture_3 + camera = camera_event_left_to_the_left + } + right_portrait = { + character = scope:converting_char + animation = prayer_standing + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + any_courtier = { + pam_sf_baptism_convert_valid_trigger = yes + } + } + + immediate = { + random_courtier = { + limit = { pam_sf_baptism_convert_valid_trigger = yes } + save_scope_as = converting_char + } + } + + option = { # Make it a spectacle + name = pam_secular_faith_events.0025.a + add_piety = medium_piety_gain + scope:converting_char = { + set_character_rite = root.rite + add_opinion = { + modifier = pam_sf_godkin_opinion + target = root + } + } + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:converting_char } + } + set_relation_friend = { + reason = pam_sf_friend_godparent + target = scope:converting_char + } + } + stress_and_fulfillment_impact = { + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + } + } + } + } + + option = { # Secluded ceremony + name = pam_secular_faith_events.0025.b + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + scope:converting_char = { + set_character_rite = root.rite + add_opinion = { + modifier = pam_sf_godkin_opinion + target = root + opinion = 15 + } + } + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:converting_char } + } + set_relation_friend = { + reason = pam_sf_friend_godparent + target = scope:converting_char + } + } + stress_and_fulfillment_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + + option = { # Not interested + name = pam_secular_faith_events.0025.c + add_prestige = miniscule_prestige_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } +} + +########################################################################################## +# 0026 - A Besieged Soul (a courtier's torment / exorcism) +########################################################################################## +scripted_trigger pam_sf_possessed_courtier_valid_trigger = { + is_available_ai_adult = yes + trigger_if = { + limit = { exists = root.cp:councillor_court_chaplain } + this != root.cp:councillor_court_chaplain + } + faith = root.faith + OR = { + has_trait = possessed_1 + has_trait = lunatic_1 + } + NOT = { + has_character_flag = cured_demons + } +} + +pam_secular_faith_events.0026 = { + type = character_event + title = pam_secular_faith_events.0026.t + desc = pam_secular_faith_events.0026.desc + theme = christian + override_background = temple + + left_portrait = { + character = scope:chaplain + animation = worry + } + right_portrait = { + character = scope:afflicted + animation = mental_anguish + camera = camera_event_right_forward + } + widgets = { + widget = { gui = event_window_widget_vfx_background_double_vision_milder container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_double_vision_milder container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_double_vision_milder container = foreground_shader_vfx_container } + } + + cooldown = { years = 5 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + any_courtier = { + pam_sf_possessed_courtier_valid_trigger = yes + } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + } + + immediate = { + random_courtier = { + limit = { pam_sf_possessed_courtier_valid_trigger = yes } + weight = { + base = 1 + modifier = { + add = 25 + is_close_or_extended_family_of = root + } + modifier = { + add = 25 + OR = { + has_relation_friend = root + has_relation_lover = root + } + } + } + save_scope_as = afflicted + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + scope:afflicted = { + if = { + limit = { NOT = { has_character_modifier = pam_sf_besieged_by_demons_modifier } } + add_character_modifier = pam_sf_besieged_by_demons_modifier + } + } + } + + option = { # Treat it as an affliction of the body + name = pam_secular_faith_events.0026.a + trigger = { + OR = { + has_trait = lifestyle_scholar + has_trait = lifestyle_physician + } + } + scope:afflicted = { + if = { + limit = { has_character_modifier = pam_sf_besieged_by_demons_modifier } + remove_character_modifier = pam_sf_besieged_by_demons_modifier + add_character_flag = cured_demons + } + add_opinion = { + modifier = grateful_opinion + opinion = 30 + target = root + } + } + physician_lifestyle_rank_up_effect = yes + add_scholar_trait_or_xp_effect = { VALUE = 30 } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } + + option = { # Preside over the exorcism yourself + name = pam_secular_faith_events.0026.b + add_piety = medium_piety_gain + duel = { + skill = learning + value = average_skill_rating + 50 = { # The rite prevails + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_sf_exorcism_success_toast + left_icon = scope:afflicted + right_icon = root + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + scope:afflicted = { + if = { + limit = { has_character_modifier = pam_sf_besieged_by_demons_modifier } + remove_character_modifier = pam_sf_besieged_by_demons_modifier + add_character_flag = cured_demons + } + add_opinion = { + modifier = grateful_opinion + opinion = 30 + target = root + } + } + if = { + limit = { can_add_hook = { target = scope:afflicted type = loyalty_hook } } + add_hook = { + type = loyalty_hook + target = scope:afflicted + } + } + } + create_character_memory = { + type = pam_sf_deliverance_memory + participants = { delivered_soul = scope:afflicted } + } + } + 50 = { # The rite fails - the siege holds + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pam_sf_exorcism_failed_toast + left_icon = scope:afflicted + right_icon = root + increase_wounds_effect = { REASON = fight} + } + } + } + stress_and_fulfillment_impact = { + craven = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { has_trait = craven factor = 0 } + } + } + + option = { # Let the chaplain perform it + name = pam_secular_faith_events.0026.c + scope:chaplain = { + add_opinion = { + modifier = pious_opinion + opinion = 20 + target = root + } + duel = { + skill = learning + value = average_skill_rating + 50 = { # The chaplain's rite prevails + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = pam_sf_exorcism_success_toast + left_icon = scope:afflicted + right_icon = scope:chaplain + scope:afflicted = { + if = { + limit = { has_character_modifier = pam_sf_besieged_by_demons_modifier } + remove_character_modifier = pam_sf_besieged_by_demons_modifier + add_character_flag = cured_demons + } + } + } + } + } + 50 = { # The chaplain's rite fails - the siege holds + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = pam_sf_exorcism_failed_toast + left_icon = scope:afflicted + right_icon = scope:chaplain + scope:chaplain = { + increase_wounds_effect = { REASON = fight} + } + } + } + } + } + } + stress_and_fulfillment_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { has_trait = arrogant factor = 0 } + } + } + + option = { # Cast them out + name = pam_secular_faith_events.0026.d + scope:afflicted = { + select_and_move_to_pool_effect = yes + if = { + limit = { + NOT = { + has_trait = lunatic + } + } + add_trait = lunatic_1 + } + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { has_trait = compassionate factor = 0 } + } + } +} + +########################################################################################## +# 0027 - Crisis of Faith (low Spiritual Fulfillment) +########################################################################################## + +scripted_trigger pam_secular_faith_events_0027_new_tenet_trigger = { + save_temporary_scope_as = pam_sf_tenet_candidate + root = { + NOR = { + any_personal_tenet = { this = scope:pam_sf_tenet_candidate } + faith.main_rite = { + has_tenet_status = { + tenet = scope:pam_sf_tenet_candidate + status = prohibited + } + } + } + } +} + +pam_secular_faith_events.0027 = { + type = character_event + title = pam_secular_faith_events.0027.t + desc = pam_secular_faith_events.0027.desc + theme = christian + override_background = temple + + left_portrait = { + character = root + animation = mental_anguish + camera = camera_event_kneeling + } + + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_godray container = foreground_shader_vfx_container } + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_clergy_ok_actor_trigger = yes + OR = { + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion + } + spiritual_fulfillment < 0 + any_personal_tenet = { count >= 1 } # The desc names scope:old_tenet + any_desired_tenet = { + only_positive = yes + threshold = 1 + selection_count = 97 + pam_secular_faith_events_0027_new_tenet_trigger = yes + } + } + + immediate = { + random_personal_tenet = { save_scope_as = old_tenet } + random_desired_tenet = { + only_positive = yes + threshold = 1 + selection_count = 97 + limit = { + pam_secular_faith_events_0027_new_tenet_trigger = yes + } + save_scope_as = new_tenet + } + random_desired_tenet = { + only_positive = yes + threshold = 1 + selection_count = 97 + limit = { + NOT = { scope:new_tenet ?= this } + pam_secular_faith_events_0027_new_tenet_trigger = yes + } + save_scope_as = forbidden_tenet + } + } + + option = { # Realign your faith to your heart + name = pam_secular_faith_events.0027.a + force_set_personal_tenet = scope:new_tenet + ai_chance = { + base = 100 + } + } + + option = { # Find meaning in a hidden truth + name = pam_secular_faith_events.0027.b + add_internal_flag = dangerous + trigger = { + exists = scope:forbidden_tenet + } + force_set_personal_tenet = scope:forbidden_tenet + change_spiritual_fulfillment = 50 + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } + + option = { # Mask it and go through the motions + name = pam_secular_faith_events.0027.c + add_intrigue_skill = 1 + stress_and_fulfillment_impact = { + base = minor_stress_impact_gain + craven = massive_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + brave = massive_stress_impact_loss + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = craven + has_trait = sadistic + has_trait = callous + prowess < 10 + } + factor = 0 + } + } + } +} + +########################################################################################## +# 0028 - My Soul, at Peace (high Spiritual Fulfillment) +########################################################################################## +scripted_trigger valid_flip_target_trigger = { + is_available_ai_adult = yes + highest_held_title_tier >= tier_county + this != root + NOR = { + has_trait = cynical + has_relation_rival = root + } +} + +# Flip the scoped character's personal tenet to root's scope:old_tenet. +scripted_effect flip_personal_tenet_effect = { + if = { + limit = { + NOT = { + knows_tenet = scope:old_tenet + } + } + add_known_tenet = scope:old_tenet + pam_secular_faith_seed_tenet_message_effect = { TENET = scope:old_tenet } + } + force_set_personal_tenet = scope:old_tenet +} + +pam_secular_faith_events.0028 = { + type = character_event + title = pam_secular_faith_events.0028.t + desc = pam_secular_faith_events.0028.desc + theme = christian + override_background = temple + override_effect_2d = { reference = legend_glow } + widgets = { + widget = { + gui = event_window_widget_vfx_godray + container = background_shader_vfx_container + } + } + + left_portrait = { + character = root + animation = divine_ecstasy_kneeling + camera = camera_event_kneeling + } + + cooldown = { years = 30 } + + trigger = { + pam_secular_faith_clergy_ok_actor_trigger = yes + spiritual_fulfillment >= spiritual_fulfillment_3 + NOT = { has_character_modifier = pam_sf_consolation_modifier } + any_personal_tenet = { count >= 1 } # The desc and the flip chain both name scope:old_tenet + OR = { + any_vassal_or_below = { + valid_flip_target_trigger = yes + } + liege ?= { + any_vassal_or_below = { + valid_flip_target_trigger = yes + } + } + location.county.holder = { + valid_flip_target_trigger = yes + } + } + } + + immediate = { + random_personal_tenet = { save_scope_as = old_tenet } + random_desired_tenet = { + only_positive = yes + threshold = 1 + selection_count = 97 + limit = { + save_temporary_scope_as = pam_sf_forbidden_candidate + NOT = { root = { any_personal_tenet = { this = scope:pam_sf_forbidden_candidate } } } + root.faith.main_rite = { + has_tenet_status = { + tenet = scope:pam_sf_forbidden_candidate + status = prohibited + } + } + } + save_scope_as = forbidden_tenet + } + random_vassal_or_below = { + limit = { + valid_flip_target_trigger = yes + } + save_scope_as = own_vassal_flip_1 + } + random_vassal_or_below = { + limit = { + NOT = { scope:own_vassal_flip_1 ?= this } # A first flip target isn't always found + valid_flip_target_trigger = yes + } + save_scope_as = own_vassal_flip_2 + } + liege ?= { + random_vassal_or_below = { + limit = { + valid_flip_target_trigger = yes + } + save_scope_as = liege_vassal_flip_1 + } + random_vassal_or_below = { + limit = { + NOT = { scope:liege_vassal_flip_1 ?= this } # A first flip target isn't always found + valid_flip_target_trigger = yes + } + save_scope_as = liege_vassal_flip_2 + } + } + if = { + limit = { + location.county.holder = { + valid_flip_target_trigger = yes + } + } + location.county.holder = { + save_scope_as = location_flip + } + } + } + + option = { # Propagate the personal tenets + name = pam_secular_faith_events.0028.a + add_piety = major_piety_gain + scope:location_flip ?= { + flip_personal_tenet_effect = yes + } + scope:liege_vassal_flip_1 ?= { + flip_personal_tenet_effect = yes + } + scope:liege_vassal_flip_2 ?= { + flip_personal_tenet_effect = yes + } + scope:own_vassal_flip_1 ?= { + flip_personal_tenet_effect = yes + } + scope:own_vassal_flip_2 ?= { + flip_personal_tenet_effect = yes + } + stress_and_fulfillment_impact = { + shy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = shy + has_trait = cynical + } + factor = 0 + } + } + } + + option = { # Follow your true passion + name = pam_secular_faith_events.0028.b + trigger = { + exists = scope:forbidden_tenet + } + force_set_personal_tenet = scope:forbidden_tenet + stress_and_fulfillment_impact = { + base = major_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { # Abide in the peace + name = pam_secular_faith_events.0028.c + add_scholar_trait_or_xp_effect = { VALUE = 30 } + add_character_modifier = { + modifier = pam_sf_consolation_modifier + } + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0029 - A Visit from the Dead (a dream of the departed) +########################################################################################## +pam_secular_faith_events.0029 = { + type = character_event + title = pam_secular_faith_events.0029.t + desc = pam_secular_faith_events.0029.desc + theme = christian + override_background = bedchamber + + left_portrait = { + character = root + animation = shock + outfit_tags = { nightgown } + camera = camera_event_very_left + } + right_portrait = { + character = scope:departed + animation = dead + camera = camera_event_scheme_center_forward + } + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_fog container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_double_vision_severe container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight container = foreground_shader_vfx_container } + } + + cooldown = { years = 15 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + any_close_family_member = { + even_if_dead = yes + is_alive = no + age >= 12 + } + } + + immediate = { + save_scope_as = root_scope + random_close_family_member = { + even_if_dead = yes + limit = { + is_alive = no + age >= 12 + } + save_scope_as = departed + } + } + + option = { # Heed their words + name = pam_secular_faith_events.0029.a + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + add_character_modifier = { + modifier = pam_sf_grief_solace_modifier + years = 15 + } + ai_chance = { + base = 100 + } + } + + option = { # Pray for their soul + name = pam_secular_faith_events.0029.b + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + add_character_modifier = { + modifier = pam_sf_grief_warning_modifier + years = 15 + } + ai_chance = { + base = 100 + } + } + + option = { # Dismiss it as grief or temptation + name = pam_secular_faith_events.0029.c + add_stress = minor_stress_loss + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0030 - The Anchorite +########################################################################################## +scripted_trigger pam_sf_anchorite_candidate_valid_trigger = { + is_available_ai_adult = yes + has_personality_submissive_trigger = yes + rite = { + has_at_least_tenet_status = { + tenet = tenet_anachoresis + status = permitted + } + } + ai_zeal >= 50 +} + +pam_secular_faith_events.0030 = { + type = character_event + title = pam_secular_faith_events.0030.t + desc = pam_secular_faith_events.0030.desc + theme = christian + override_background = throne_room + + left_portrait = { + character = root + animation = contemplating + } + right_portrait = { + character = scope:would_be_anchorite + animation = prayer_standing_eyes + } + + cooldown = { years = 30 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + rite = { + has_at_least_tenet_status = { + tenet = tenet_anachoresis + status = permitted + } + } + any_courtier = { + pam_sf_anchorite_candidate_valid_trigger = yes + } + any_held_title = { + tier = tier_county + any_county_province = { + has_holding_type = church_holding + NOT = { + has_province_modifier = pam_sf_immured_anchorite_modifier + } + } + } + } + + immediate = { + random_courtier = { + limit = { pam_sf_anchorite_candidate_valid_trigger = yes } + save_scope_as = would_be_anchorite + } + random_held_title = { + limit = { + tier = tier_county + any_county_province = { has_holding_type = church_holding } + } + save_scope_as = county_scope + save_scope_as = holy_site_scope + random_county_province = { + limit = { + has_holding_type = church_holding + NOT = { + has_province_modifier = pam_sf_immured_anchorite_modifier + } + } + save_scope_as = church_scope + } + } + } + + option = { # Immure them + name = pam_secular_faith_events.0030.a + add_piety = medium_piety_gain + scope:would_be_anchorite = { + death = { death_reason = death_immurement } + } + scope:church_scope = { + add_province_modifier = { + modifier = pam_sf_immured_anchorite_modifier + } + } + stress_and_fulfillment_impact = { + base = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + cynical = minor_stress_impact_gain + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = cynical + scope:would_be_anchorite = { + OR = { + is_primary_heir_of = root + has_relation_friend = root + has_relation_lover = root + } + } + } + factor = 0 + } + } + } + + option = { # Stop them + name = pam_secular_faith_events.0030.b + scope:would_be_anchorite = { + if = { + limit = { + NOT = { has_trait = reclusive } + } + add_trait = reclusive + } + } + reverse_add_opinion = { + target = scope:would_be_anchorite + modifier = disappointed_opinion + opinion = -15 + } + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0031 - An Argument of Scholars +########################################################################################## +scripted_trigger pam_sf_learned_disputant_valid_trigger = { + is_available_ai_adult = yes + OR = { + learning >= high_skill_rating + is_clergy = yes + } + faith = root.faith + OR = { + is_clergy = yes + has_education_learning_trigger = yes + has_trait = lifestyle_mystic + has_trait = lifestyle_scholar + has_trait = theologian + } +} + +pam_secular_faith_events.0031 = { + type = character_event + title = pam_secular_faith_events.0031.t + desc = pam_secular_faith_events.0031.desc + theme = christian + override_background = council_chamber + + left_portrait = { + character = scope:disputant_one + animation = condemnation + camera = camera_event_left_away_3_4 + } + right_portrait = { + character = scope:disputant_two + animation = preaching + camera = camera_event_very_right_fov35 + } + + cooldown = { years = 15 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + any_courtier = { + count >= 2 + pam_sf_learned_disputant_valid_trigger = yes + } + any_desired_tenet = { + count >= 2 + only_positive = yes + threshold = 1 + selection_count = 97 + save_temporary_scope_as = pam_sf_candidate + NOT = { root = { any_personal_tenet = { this = scope:pam_sf_candidate } } } + root.faith.main_rite = { + NOT = { + has_tenet_status = { + tenet = scope:pam_sf_candidate + status = prohibited + } + } + } + } + } + + immediate = { + random_courtier = { + limit = { pam_sf_learned_disputant_valid_trigger = yes } + save_scope_as = disputant_one + } + random_courtier = { + limit = { + pam_sf_learned_disputant_valid_trigger = yes + NOT = { this = scope:disputant_one } + } + save_scope_as = disputant_two + } + random_desired_tenet = { + only_positive = yes + threshold = 1 + selection_count = 97 + limit = { + save_temporary_scope_as = pam_sf_candidate + NOT = { root = { any_personal_tenet = { this = scope:pam_sf_candidate } } } + root.faith.main_rite = { + NOT = { + has_tenet_status = { + tenet = scope:pam_sf_candidate + status = prohibited + } + } + } + } + save_scope_as = tenet_1 + } + random_desired_tenet = { + only_positive = yes + threshold = 1 + selection_count = 97 + limit = { + save_temporary_scope_as = pam_sf_candidate + NOT = { root = { any_personal_tenet = { this = scope:pam_sf_candidate } } } + root.faith.main_rite = { + NOT = { + has_tenet_status = { + tenet = scope:pam_sf_candidate + status = prohibited + } + } + } + this != scope:tenet_1 + } + save_scope_as = tenet_2 + } + } + + option = { # Join the debate + name = pam_secular_faith_events.0031.a + trigger = { + has_trait = lifestyle_scholar + } + show_as_unavailable = { always = yes } + add_piety = medium_piety_gain + add_scholar_trait_or_xp_effect = { VALUE = 30 } + scope:disputant_one = { + add_opinion = { + modifier = humbled_opinion + opinion = 30 + target = root + } + } + scope:disputant_two = { + add_opinion = { + modifier = humbled_opinion + opinion = 30 + target = root + } + } + ai_chance = { + base = 100 + } + } + + option = { # Adopt the first tenet for free + name = pam_secular_faith_events.0031.b + scope:disputant_one = { + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + force_set_personal_tenet = scope:tenet_1 + stress_and_fulfillment_impact = { + fickle = minor_stress_impact_loss + content = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = content + has_trait = stubborn + } + factor = 0 + } + } + } + + option = { # Adopt the second tenet for free + name = pam_secular_faith_events.0031.c + scope:disputant_two = { + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + force_set_personal_tenet = scope:tenet_2 + stress_and_fulfillment_impact = { + fickle = minor_stress_impact_loss + content = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = content + has_trait = stubborn + } + factor = 0 + } + } + } + + option = { # Enjoy the spirited court + name = pam_secular_faith_events.0031.d + add_piety = minor_piety_gain + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0032 - The Tempting Hour (a fast tested) +########################################################################################## +pam_secular_faith_events.0032 = { + type = character_event + title = pam_secular_faith_events.0032.t + desc = pam_secular_faith_events.0032.desc_food + theme = christian + override_background = bedchamber + + left_portrait = { + character = root + animation = mental_anguish + outfit_tags = { nightgown } + camera = camera_event_center_close_to_right + } + + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + religion = { is_in_family = rf_abrahamic } + OR = { + has_trait = gluttonous + has_trait = lazy + has_trait = impatient + has_trait = lustful + } + NOR = { + has_trait = temperate + has_trait = inappetetic + } + } + + immediate = { + random_character_trait = { + limit = { + OR = { + this = trait:gluttonous + this = trait:lazy + this = trait:impatient + this = trait:lustful + } + } + save_scope_as = vice_trait + } + } + + option = { # Justify urges + name = pam_secular_faith_events.0032.a + trigger = { + has_trait = lifestyle_scholar + } + show_as_unavailable = { always = yes } + change_spiritual_fulfillment = minor_spiritual_fulfillment_loss + hidden_effect = { # The chung + change_current_weight = 50 + } + add_scholar_trait_or_xp_effect = { VALUE = 30 } + if = { + limit = { + NOT = { knows_tenet = tenet_hedonistic } + } + add_known_tenet = tenet_hedonistic + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_hedonistic } + } + if = { + limit = { + NOT = { knows_tenet = tenet_carnal_exaltation } + } + add_known_tenet = tenet_carnal_exaltation + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_carnal_exaltation } + } + if = { + limit = { + NOT = { knows_tenet = tenet_pursuit_of_power } + } + add_known_tenet = tenet_pursuit_of_power + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_pursuit_of_power } + } + stress_and_fulfillment_impact = { + content = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = patient + } + } + } + } + + option = { # Hold fast + name = pam_secular_faith_events.0032.b + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + gluttonous = medium_stress_impact_gain + lazy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + content = minor_stress_impact_loss + patient = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = gluttonous + has_trait = lazy + has_trait = impatient + } + } + } + } + + option = { # Indulge in secret + name = pam_secular_faith_events.0032.c + change_spiritual_fulfillment = minor_spiritual_fulfillment_loss + hidden_effect = { # The chung + change_current_weight = 50 + } + stress_and_fulfillment_impact = { + base = medium_stress_impact_loss + content = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = patient + } + } + } + } +} + +########################################################################################## +# 0033 - Pillow Sermons (a spouse who believes differently) +########################################################################################## +pam_secular_faith_events.0033 = { + type = character_event + title = pam_secular_faith_events.0033.t + desc = pam_secular_faith_events.0033.desc + theme = christian + override_background = bedchamber + + left_portrait = { + character = root + animation = admiration + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:believing_spouse + animation = preaching_no_book + camera = camera_event_right_to_the_right + outfit_tags = { nightgown } + } + + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_night_scene container = foreground_shader_vfx_container } + } + + cooldown = { years = 5 } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + primary_spouse ?= { + is_available_ai_adult = yes + rite != root.rite + NOT = { + has_relation_rival = root + } + any_character_tenet = { + save_temporary_scope_as = tenet_check + root.primary_spouse = { knows_tenet = scope:tenet_check } + NOT = { + root = { + knows_tenet = scope:tenet_check + } + } + } + } + } + + immediate = { + save_scope_as = root_scope + primary_spouse = { + save_scope_as = believing_spouse + save_scope_as = passive_learn_source + random_character_tenet = { + limit = { + save_temporary_scope_as = tenet_check + root.primary_spouse = { knows_tenet = scope:tenet_check } + NOT = { + root = { + knows_tenet = scope:tenet_check + } + } + } + save_scope_as = new_tenet + } + } + } + + option = { # Study the rite + name = pam_secular_faith_events.0033.a + trigger = { + NOT = { + knows_rite_level = { + target = scope:believing_spouse.rite + value >= 100 + } + } + } + add_scholar_trait_or_xp_effect = { VALUE = 5 } + add_known_tenet = scope:new_tenet + pam_secular_faith_seed_tenet_message_effect = { TENET = scope:new_tenet } + add_known_rite = scope:believing_spouse.rite + send_interface_message = { + type = msg_passive_learned_rite + desc = msg_passive_learned_rite_desc + left_icon = scope:passive_learn_source + right_icon = scope:passive_learn_source.rite + } + ai_chance = { + base = 100 + } + } + + option = { # Deepen the bond + name = pam_secular_faith_events.0033.b + trigger = { + can_set_relation_lover_trigger = { CHARACTER = scope:believing_spouse } + } + set_relation_lover = { + target = scope:believing_spouse + reason = pam_sf_lover_two_faiths + } + add_known_tenet = scope:new_tenet + pam_secular_faith_seed_tenet_message_effect = { TENET = scope:new_tenet } + ai_chance = { + base = 100 + } + } + + option = { # Sleep + name = pam_secular_faith_events.0033.c + scope:believing_spouse = { + add_opinion = { + modifier = sadness_opinion + opinion = -10 + target = root + } + } + stress_and_fulfillment_impact = { + base = minor_stress_impact_loss + lustful = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = compassionate + has_trait = humble + } + } + } + } +} + +########################################################################################## +# 0034 - The Foundling +########################################################################################## +pam_secular_faith_events.0034 = { + type = character_event + title = pam_secular_faith_events.0034.t + desc = pam_secular_faith_events.0034.desc + theme = christian + override_background = temple + + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:chaplain + animation = newborn + } + lower_center_portrait = scope:foundling + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + } + + cooldown = { years = 5 } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + NOR = { + has_trait = sadistic + has_trait = callous + } + } + OR = { + is_ai = no + NOT = { + any_child = { + is_alive = yes + } + } + } + faith = { + faith_has_monasticism_trigger = yes + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + if = { + limit = { + capital_county.clerical_region_title.holder ?= { + this != root + is_ai = yes + } + } + capital_county.clerical_region_title = { save_scope_as = archdiocese } + capital_county.clerical_region_title.holder = { save_scope_as = archbishop } + } + create_character = { + location = root.capital_province + age = 0 + faith = root.capital_province.faith + rite = root.capital_province.rite + culture = root.capital_province.culture + dynasty = none + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + save_scope_as = foundling + after_creation = { + change_current_weight = -75 + random_list = { + 130 = { + add_trait = sickly + } + 10 = { + add_trait = scarred + } + 10 = { + add_trait = one_eyed + } + 10 = { + add_trait = albino + } + 10 = { + add_trait = scaly + } + 10 = { + add_trait = blind + } + 10 = { + add_trait = spindly + } + 10 = { + add_trait = beauty_bad_1 + } + } + } + } + scope:foundling = { + random_character_trait = { + limit = { + OR = { + this = trait:sickly + this = trait:scarred + this = trait:one_eyed + this = trait:albino + this = trait:scaly + this = trait:blind + this = trait:spindly + this = trait:beauty_bad_1 + } + } + save_scope_as = trait_scope + } + } + } + + option = { # Adopt the child + name = pam_secular_faith_events.0034.a + trigger = { + can_be_parent_of = scope:foundling + exists = house + NAND = { + is_clergy = yes + rite = { rite_has_doctrine = doctrine_clerical_marriage_disallowed } + } + } + + add_courtier = scope:foundling + + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + + if = { + limit = { + is_male = yes + } + scope:foundling = { set_father = root } + } + else = { + scope:foundling = { set_mother = root } + } + if = { + limit = { exists = house } + scope:foundling = { set_house = root.house } + } + set_relation_friend = { + reason = friend_adopted + target = scope:foundling + } + scope:foundling = { + if = { + limit = { + culture != root.culture + } + set_culture = root.culture + } + if = { + limit = { + rite != root.rite + } + set_character_rite = root.rite + } + } + + stress_and_fulfillment_impact = { + compassionate = massive_stress_impact_loss + cynical = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { # Place them with the monastery + name = pam_secular_faith_events.0034.b + trigger = { + exists = scope:archbishop + } + add_piety = medium_piety_gain + scope:foundling = { + add_trait = devoted + if = { + limit = { + rite != scope:archbishop.rite + } + set_character_rite = scope:archbishop.rite + } + } + scope:archbishop = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 15 + } + add_courtier = scope:foundling + if = { + limit = { num_of_relation_ward < 2 } + scope:foundling = { + set_relation_guardian = scope:archbishop + } + } + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + cynical = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { # Let them stay as a monk + name = pam_secular_faith_events.0034.c + add_piety = minor_piety_gain + add_courtier = scope:foundling + scope:foundling = { + add_trait = devoted + if = { + limit = { + rite != scope:chaplain.rite + } + set_character_rite = scope:chaplain.rite + } + } + scope:chaplain = { + if = { + limit = { num_of_relation_ward < 2 } + scope:foundling = { + set_relation_guardian = scope:chaplain + } + } + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + cynical = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { # Turn them away + name = pam_secular_faith_events.0034.d + scope:foundling = { + death = { death_reason = death_abandonment } + } + stress_and_fulfillment_impact = { + sadistic = massive_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = major_stress_impact_gain + humble = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + has_trait = zealous + } + } + } + } +} + +########################################################################################## +# 0035 - The Mortification (a courtier's holy self-destruction) +########################################################################################## +scripted_trigger pam_sf_mortification_sufferer_valid_trigger = { + is_available_ai_adult = yes + faith = root.faith + ai_zeal >= 50 + num_sinful_traits >= 1 + num_virtuous_traits <= 0 + NOR = { + has_trait = cynical + has_trait = wounded + } +} + +pam_secular_faith_events.0035 = { + type = character_event + title = pam_secular_faith_events.0035.t + desc = pam_secular_faith_events.0035.desc + theme = christian + override_background = corridor_day + + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:sufferer + animation = self_flagellation + outfit_tags = { nightgown } + camera = camera_event_right_forward + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + rite = { + has_at_least_tenet_status = { + tenet = tenet_mortification_of_the_flesh + status = permitted + } + } + any_courtier = { + pam_sf_mortification_sufferer_valid_trigger = yes + } + } + + immediate = { + random_courtier = { + limit = { pam_sf_mortification_sufferer_valid_trigger = yes } + add_trait = flagellant + save_scope_as = sufferer + random_character_trait = { + limit = { + save_temporary_scope_as = trait_check + root.rite = { + trait_is_sin_rite = scope:trait_check + } + } + save_scope_as = sinful_trait + } + increase_wounds_effect = { REASON = whipping } + } + } + + option = { # Join them + name = pam_secular_faith_events.0035.a + add_scholar_trait_or_xp_effect = { VALUE = 15 } + if = { + limit = { + NOT = { + has_personal_tenet = tenet_mortification_of_the_flesh + } + } + force_set_personal_tenet = tenet_mortification_of_the_flesh + } + add_piety = major_piety_gain + increase_wounds_effect = { REASON = whipping } + scope:sufferer = { + add_piety = major_piety_gain + change_spiritual_fulfillment = major_spiritual_fulfillment_value + increase_wounds_effect = { REASON = whipping } + } + stress_and_fulfillment_impact = { + chaste = major_stress_impact_loss + flagellant = major_stress_impact_loss + craven = major_stress_impact_gain + cynical = medium_stress_impact_gain + lustful = medium_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = chaste + has_trait = flagellant + } + } + } + } + + option = { # Let them mortify + name = pam_secular_faith_events.0035.b + add_piety = minor_piety_gain + scope:sufferer = { + add_piety = major_piety_gain + change_spiritual_fulfillment = major_spiritual_fulfillment_value + increase_wounds_effect = { REASON = whipping } + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = cynical + } + } + } + } + + option = { # Stop them + name = pam_secular_faith_events.0035.c + scope:sufferer = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + remove_trait = wounded_1 + } + random = { + chance = 35 + send_interface_toast = { + type = event_toast_effect_good + title = pam_sf_scourge_abandoned_toast + left_icon = scope:sufferer + right_icon = root + scope:sufferer = { remove_trait = flagellant } + } + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + chaste = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = chaste + } + } + } +} + +########################################################################################## +# 0036 - Wisdom of the Anchorite +########################################################################################## +scripted_trigger pam_sf_desert_hermit_valid_trigger = { + is_available_healthy_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + root.faith = { has_allowed_gender_for_clergy = prev } + religion = { is_in_family = rf_abrahamic } + rite = { + has_at_least_tenet_status = { + tenet = tenet_anachoresis + status = permitted + } + } + ai_zeal >= 25 +} + +pam_secular_faith_events.0036 = { + type = character_event + title = pam_secular_faith_events.0036.t + desc = pam_secular_faith_events.0036.desc + theme = christian + override_background = throne_room + + left_portrait = { + character = root + animation = personality_zealous + camera = camera_event_crowd + } + right_portrait = { + character = scope:hermit + animation = divine_gesture_4 + outfit_tags = { beggar_rags } + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_clergy_ok_actor_trigger = yes + any_pool_character = { + province = root.location + pam_sf_desert_hermit_valid_trigger = yes + } + any_realm_county = { + any_county_province = { + has_holding = no + } + } + } + + immediate = { + random_pool_character = { + province = root.location + limit = { pam_sf_desert_hermit_valid_trigger = yes } + save_scope_as = hermit + } + hidden_effect = { + scope:hermit = { + change_current_weight = -100 + if = { + limit = { NOT = { has_trait = lifestyle_mystic } } + add_trait = lifestyle_mystic + add_trait_xp = { + trait = lifestyle_mystic + value = 50 + } + } + } + } + random_realm_county = { + limit = { + any_county_province = { + has_holding = no + } + } + random_county_province = { + limit = { + has_holding = no + } + save_scope_as = hermit_location + } + } + } + + option = { # Open yourself to their counsel + name = pam_secular_faith_events.0036.a + add_piety = minor_piety_gain + add_prestige = medium_prestige_loss + if = { + limit = { + NOT = { + knows_tenet = tenet_anachoresis + } + } + add_known_tenet = tenet_anachoresis + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_anachoresis } + } + if = { + limit = { + NOT = { has_trait = lifestyle_mystic } + } + add_trait = lifestyle_mystic + } + else = { + add_trait_xp = { + trait = lifestyle_mystic + value = 50 + } + } + hidden_effect = { + scope:hermit = { move_to_pool_at = scope:hermit_location } + } + stress_and_fulfillment_impact = { + eccentric = minor_stress_impact_loss + cynical = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + } + } + } + } + + option = { # Ask only for their blessing + name = pam_secular_faith_events.0036.b + add_piety = minor_piety_gain + add_prestige = medium_prestige_loss + if = { + limit = { + NOT = { + knows_tenet = tenet_anachoresis + } + } + add_known_tenet = tenet_anachoresis + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_anachoresis } + } + add_scholar_trait_or_xp_effect = { VALUE = 10 } + hidden_effect = { + scope:hermit = { move_to_pool_at = scope:hermit_location } + } + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + } + } + } + } + + option = { # Reject their presumption + name = pam_secular_faith_events.0036.c + hidden_effect = { + scope:hermit = { move_to_pool_at = scope:hermit_location } + } + stress_and_fulfillment_impact = { + humble = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = trusting + } + } + } + } +} + +########################################################################################## +# 0037 - Carnal Revelation (a willing partner and a night of sacred flesh; discover Carnal Exaltation) +########################################################################################## +scripted_trigger pam_sf_carnal_partner_valid_trigger = { + is_available_ai_adult = yes + this != root + NOR = { + has_trait = chaste + has_trait = celibate + has_relation_rival = root + has_relation_lover = root + } + are_characters_sensible_lovers_trigger = { INSTIGATING_LOVER = root TARGET_OF_LOVE = this } +} + +pam_secular_faith_events.0037 = { + type = character_event + title = pam_secular_faith_events.0037.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:reveler = { + NOT = { + exists = liege + } + } + } + desc = pam_secular_faith_events.0037.desc_wanderer + } + triggered_desc = { + trigger = { always = yes } + desc = pam_secular_faith_events.0037.desc_normal + } + } + desc = pam_secular_faith_events.0037.desc + } + theme = christian + override_background = bedchamber + + left_portrait = { + character = root + animation = love + } + right_portrait = { + character = scope:reveler + triggered_animation = { + trigger = { + is_female = yes + } + animation = fanning_coyly + } + animation = flirtation_left + } + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + factor = 10 + any_courtier = { + pam_sf_carnal_partner_valid_trigger = yes + OR = { + has_trait = lustful + has_trait = seducer + has_trait = deviant + has_trait = eccentric + has_trait = rakish + } + } + } + } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + NOR = { + has_trait = chaste + has_trait = celibate + knows_tenet = tenet_carnal_exaltation + } + OR = { + any_courtier = { pam_sf_carnal_partner_valid_trigger = yes } + any_pool_character = { + province = root.location + pam_sf_carnal_partner_valid_trigger = yes + } + } + } + + immediate = { + # Any sensible lover may catch the eye, but a carnal bent makes a partner far likelier. + every_courtier = { + limit = { pam_sf_carnal_partner_valid_trigger = yes } + add_to_list = carnal_partner_list + } + every_pool_character = { + province = root.location + limit = { pam_sf_carnal_partner_valid_trigger = yes } + add_to_list = carnal_partner_list + } + random_in_list = { + list = carnal_partner_list + weight = { + base = 1 + modifier = { add = 10 has_trait = lustful } + modifier = { add = 10 has_trait = seducer } + modifier = { add = 10 has_trait = rakish } + modifier = { add = 5 has_trait = eccentric } + modifier = { add = 10 has_trait = deviant } + modifier = { + add = 5 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = reveler + add_character_flag = is_naked + } + } + + option = { # Give in to the night + name = pam_secular_faith_events.0037.a + add_known_tenet = tenet_carnal_exaltation + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_carnal_exaltation } + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + set_relation_lover = { + target = scope:reveler + reason = pam_sf_lover_carnal_revelation + } + had_sex_with_effect = { + CHARACTER = scope:reveler + PREGNANCY_CHANCE = pregnancy_chance + } + ai_chance = { + base = 100 + } + } + + option = { # Deny the flesh + name = pam_secular_faith_events.0037.b + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + lustful = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = lustful factor = 0 } + } + } + + after = { + scope:reveler = { remove_character_flag = is_naked } + } +} + +########################################################################################## +# 0038 - A Taste of Paradise (discover Hedonism) +########################################################################################## +scripted_trigger appropriate_hedonist_trigger = { + is_available_ai_adult = yes + faith = root.faith + OR = { + has_trait = gluttonous + has_trait = drunkard + has_trait = comfort_eater + } + NOR = { + has_trait = temperate + has_relation_rival = root + } +} + +pam_secular_faith_events.0038 = { + type = character_event + title = pam_secular_faith_events.0038.t + desc = pam_secular_faith_events.0038.desc + theme = christian + override_background = feast + + left_portrait = { + character = root + animation = drink_goblet + camera = camera_event_very_left + } + right_portrait = { + character = scope:reveler + animation = wedding_drunk + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + NOT = { knows_tenet = tenet_hedonistic } + any_courtier = { + appropriate_hedonist_trigger = yes + } + } + + immediate = { + random_courtier = { + limit = { + appropriate_hedonist_trigger = yes + } + save_scope_as = reveler + } + } + + option = { # A true epiphany + name = pam_secular_faith_events.0038.a + trigger = { + OR = { + has_trait = gluttonous + has_trait = drunkard + has_trait = comfort_eater + } + } + add_known_tenet = tenet_hedonistic + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_hedonistic } + add_character_modifier = { + modifier = pam_sf_free_feast_modifier + years = 5 + } + change_spiritual_fulfillment = major_spiritual_fulfillment_value + mystic_lifestyle_rank_up_effect = yes + ai_chance = { + base = 100 + } + } + + option = { # Savor the idea - and set a table to match + name = pam_secular_faith_events.0038.b + add_known_tenet = tenet_hedonistic + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_hedonistic } + add_character_modifier = { + modifier = pam_sf_free_feast_modifier + years = 5 + } + stress_and_fulfillment_impact = { + base = minor_stress_loss + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = temperate factor = 0 } + } + } + + option = { # Dismiss it as decadence + name = pam_secular_faith_events.0038.c + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + gluttonous = minor_stress_impact_gain + drunkard = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = gluttonous + has_trait = drunkard + } + } + } + } +} + +########################################################################################## +# 0039 - A Prayer in the Dark (a devout spymaster uncovers a secret at prayer; discover Sacred Shadows) +########################################################################################## +scripted_trigger pam_sf_secret_keeper_valid_trigger = { + is_available_ai_adult = yes + faith = root.faith + this != root + any_secret = { + NOT = { is_known_by = root } + } + this != root.cp:councillor_spymaster +} + +pam_secular_faith_events.0039 = { + type = character_event + title = pam_secular_faith_events.0039.t + desc = pam_secular_faith_events.0039.desc + theme = christian + override_background = corridor_night + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_night_scene container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:spymaster_scope + animation = spymaster + } + lower_center_portrait = scope:secret_keeper + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + NOT = { knows_tenet = tenet_sacred_shadows } + cp:councillor_spymaster ?= { + is_available_ai_adult = yes + faith = root.faith + NOR = { + has_relation_rival = root + has_trait = cynical + } + OR = { + has_trait = eccentric + has_trait = zealous + has_trait = humble + has_trait = theologian + has_trait = lifestyle_scholar + is_clergy = yes + ai_zeal >= 0 + piety_level >= 2 + } + } + OR = { + any_courtier = { pam_sf_secret_keeper_valid_trigger = yes } + any_vassal = { pam_sf_secret_keeper_valid_trigger = yes } + liege ?= { any_vassal = { pam_sf_secret_keeper_valid_trigger = yes } } + } + } + + immediate = { + cp:councillor_spymaster = { save_scope_as = spymaster_scope } + every_courtier = { + limit = { pam_sf_secret_keeper_valid_trigger = yes } + add_to_list = secret_keeper_list + } + every_vassal = { + limit = { pam_sf_secret_keeper_valid_trigger = yes } + add_to_list = secret_keeper_list + } + liege ?= { + every_vassal = { + limit = { pam_sf_secret_keeper_valid_trigger = yes } + add_to_list = secret_keeper_list + } + } + random_in_list = { + list = secret_keeper_list + # A fellow ruler's secret is juicier leverage than a courtier's. + weight = { + base = 1 + modifier = { add = 2 is_ruler = yes } + } + save_scope_as = secret_keeper + } + scope:secret_keeper = { + random_secret = { + limit = { NOT = { is_known_by = root } } + save_scope_as = the_secret + } + } + } + + option = { # The god does work in shadow + name = pam_secular_faith_events.0039.a + add_known_tenet = tenet_sacred_shadows + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_sacred_shadows } + scope:the_secret = { reveal_to = root } + reverse_add_opinion = { + target = scope:spymaster_scope + modifier = pious_opinion + opinion = 20 + } + stress_and_fulfillment_impact = { + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = honest factor = 0 } + } + } + + option = { # A useful trick, but no miracle + name = pam_secular_faith_events.0039.b + scope:the_secret = { reveal_to = root } + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + deceitful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = deceitful + has_trait = paranoid + } + } + } + } +} + +########################################################################################## +# 0040 - Flesh of the Faithful (a learned courtier's account of ancient ritual cannibalism) +########################################################################################## + +scripted_trigger appropriate_scholar_trigger = { + is_available_ai_adult = yes + root.faith = { has_allowed_gender_for_clergy = prev } + ai_rationality <= 0 + OR = { + has_trait = lifestyle_scholar + has_trait = lifestyle_mystic + has_trait = theologian + learning >= 12 + } + NOT = { + has_trait = blind + } +} + +pam_secular_faith_events.0040 = { + type = character_event + title = pam_secular_faith_events.0040.t + desc = pam_secular_faith_events.0040.desc + theme = christian + override_background = feast + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = drink_goblet + camera = camera_event_very_left + } + right_portrait = { + character = scope:scholar + animation = reading + camera = camera_event_very_right_far + } + + cooldown = { years = 15 } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + NOT = { knows_tenet = tenet_ritual_cannibalism } + any_courtier = { + appropriate_scholar_trigger = yes + } + } + + immediate = { + random_courtier = { + limit = { + appropriate_scholar_trigger = yes + } + weight = { + base = 1 + modifier = { + add = learning + } + modifier = { + add = 5 + is_clergy = yes + } + } + save_scope_as = scholar + } + } + + option = { # Eat the scholar + name = pam_secular_faith_events.0040.a + trait = cannibal + trigger = { + is_cannibal_trigger = yes + } + add_known_tenet = tenet_ritual_cannibalism + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_ritual_cannibalism } + add_character_modifier = { + modifier = best_meal_of_my_life_modifier + years = 15 + } + + unknown_murder_effect = { + VICTIM = scope:scholar + MURDERER = root + REASON = death_eaten + } + + stress_and_fulfillment_impact = { + base = massive_stress_impact_loss + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = compassionate factor = 0 } + } + } + + option = { # Study it as the ancients did + name = pam_secular_faith_events.0040.b + add_known_tenet = tenet_ritual_cannibalism + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_ritual_cannibalism } + add_scholar_trait_or_xp_effect = { VALUE = 20 } + stress_and_fulfillment_impact = { + base = minor_stress_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = compassionate factor = 0 } + } + } + + option = { # A barbarous heresy, nothing more + name = pam_secular_faith_events.0040.c + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + sadistic = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = sadistic + has_trait = gluttonous + } + factor = 0 + } + } + } +} + +########################################################################################## +# 0042 - The Road Made Easy (a clergy sponsor offers to fund a pilgrimage) +########################################################################################## +scripted_trigger pam_sf_pilgrimage_sponsor_valid_trigger = { + is_available_ai_adult = yes + this != root + faith = root.faith + treasury_or_gold >= root.medium_gold_value + OR = { + opinion = { target = root value >= 50 } + has_relation_friend = root + has_relation_lover = root + has_trait = loyal + has_trait = trusting + has_trait = generous + ai_greed <= -50 + } + NOR = { + has_relation_rival = root + has_trait = disloyal + has_trait = paranoid + has_trait = greedy + has_trait = arrogant + } +} + +pam_secular_faith_events.0042 = { + type = character_event + title = pam_secular_faith_events.0042.t + desc = pam_secular_faith_events.0042.desc + theme = christian + override_background = garden + + left_portrait = { + character = root + animation = priest_good + camera = camera_event_very_left + } + right_portrait = { + character = scope:sponsor_character + animation = divine_gesture_4 + camera = camera_event_right_to_the_right + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + NOR = { + has_character_modifier = pam_sf_pilgrimage_funded_modifier + rite = { rite_has_doctrine = doctrine_pilgrimage_forbidden } + } + OR = { + cp:councillor_court_chaplain ?= { pam_sf_pilgrimage_sponsor_valid_trigger = yes } + any_vassal = { + government_has_flag = government_is_theocracy + pam_sf_pilgrimage_sponsor_valid_trigger = yes + } + liege ?= { + any_vassal = { + government_has_flag = government_is_theocracy + pam_sf_pilgrimage_sponsor_valid_trigger = yes + } + } + capital_county.clerical_region_title.holder ?= { pam_sf_pilgrimage_sponsor_valid_trigger = yes } + } + } + + immediate = { + if = { + limit = { cp:councillor_court_chaplain ?= { pam_sf_pilgrimage_sponsor_valid_trigger = yes } } + cp:councillor_court_chaplain = { add_to_list = sponsor_list } + } + if = { + limit = { + capital_county.clerical_region_title.holder ?= { pam_sf_pilgrimage_sponsor_valid_trigger = yes } + } + capital_county.clerical_region_title.holder = { add_to_list = sponsor_list } + } + every_vassal = { + limit = { + government_has_flag = government_is_theocracy + pam_sf_pilgrimage_sponsor_valid_trigger = yes + } + add_to_list = sponsor_list + } + liege ?= { + every_vassal = { + limit = { + government_has_flag = government_is_theocracy + pam_sf_pilgrimage_sponsor_valid_trigger = yes + } + add_to_list = sponsor_list + } + } + random_in_list = { + list = sponsor_list + weight = { + base = 1 + modifier = { + add = 10 + is_ruler = yes + } + } + save_scope_as = sponsor_character + } + } + + option = { # Accept the gift and walk the road + name = pam_secular_faith_events.0042.a + custom_tooltip = pam_sf_pilgrimage_sponsor_tt + add_character_modifier = { + modifier = pam_sf_pilgrimage_funded_modifier + years = 5 + } + set_variable = { + name = pam_sf_pilgrimage_sponsor + value = scope:sponsor_character + years = 7 + } + ai_chance = { + base = 100 + } + } + + option = { # Pocket the gold instead + name = pam_secular_faith_events.0042.b + add_internal_flag = dangerous + scope:sponsor_character = { + pay_treasury_or_gold = { + target = root + value = root.medium_gold_value + } + add_opinion = { + modifier = theft_opinion + target = root + } + } + stress_and_fulfillment_impact = { + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = greedy + treasury_or_gold <= 0 + } + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + has_trait = generous + } + } + } + } + + option = { # Decline gracefully + name = pam_secular_faith_events.0042.c + add_piety = miniscule_piety_gain + reverse_add_opinion = { + target = scope:sponsor_character + modifier = respect_opinion + opinion = 10 + } + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0043 - A Pilgrim's Welcome (realm priest proclaims your completed pilgrimage: capital opinion + development) +########################################################################################## +pam_secular_faith_events.0043 = { + type = character_event + title = pam_secular_faith_events.0043.t + desc = pam_secular_faith_events.0043.desc + theme = christian + override_background = temple + widgets = { + widget = { + gui = event_window_widget_vfx_godray + container = background_shader_vfx_container + } + } + + left_portrait = { + character = scope:holy_man + animation = preaching + camera = camera_event_left_to_the_left + } + right_portrait = { + character = root + animation = prayer_standing + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + exists = capital_county + is_landed = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + ai_zeal >= 0 + NOT = { + has_relation_rival = root + } + } + NOR = { + has_character_modifier = pam_sf_promised_acclaim_modifier + rite = { rite_has_doctrine = doctrine_pilgrimage_forbidden } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = holy_man } + capital_county = { save_scope_as = capital_county } + } + + option = { # Resolve to make the journey + name = pam_secular_faith_events.0043.a + add_character_modifier = { + modifier = pam_sf_promised_acclaim_modifier + years = 10 + } + ai_chance = { + base = 100 + } + } + + option = { # Let it pass + name = pam_secular_faith_events.0043.b + add_prestige = miniscule_prestige_gain + stress_and_fulfillment_impact = { + humble = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = zealous + } + } + } + } +} + +########################################################################################## +# 0044 - The Ear of the Clergy (clerical-interaction acceptance boost) +########################################################################################## +pam_secular_faith_events.0044 = { + type = character_event + title = pam_secular_faith_events.0044.t + desc = pam_secular_faith_events.0044.desc + theme = christian + override_background = temple_church + + left_portrait = { + character = scope:friendly_bishop + animation = divine_gesture_1 + } + right_portrait = { + character = root + animation = prayer_standing_eyes + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + pam_clergy_interactions_faith_trigger = yes + NOT = { has_character_modifier = pam_sf_ear_of_clergy_modifier } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + OR = { + opinion = { target = root value >= 50 } + has_relation_friend = root + has_relation_lover = root + has_trait = loyal + has_trait = trusting + has_trait = content + } + NOR = { + has_relation_rival = root + has_trait = arrogant + has_trait = paranoid + } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = friendly_bishop } + } + + option = { # Press the Church's favor + name = pam_secular_faith_events.0044.a + add_character_modifier = { + modifier = pam_sf_ear_of_clergy_modifier + years = 5 + } + ai_chance = { + base = 100 + } + } + + option = { # Take it as a simple blessing + name = pam_secular_faith_events.0044.b + add_piety = minor_piety_gain + reverse_add_opinion = { + target = scope:friendly_bishop + modifier = happy_opinion + opinion = 20 + } + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0045 - Epiphany (temporary faith/rite creation cost discount) +########################################################################################## +pam_secular_faith_events.0045 = { + type = character_event + title = pam_secular_faith_events.0045.t + desc = pam_secular_faith_events.0045.desc + theme = christian + override_background = garden + + left_portrait = { + character = root + animation = divine_ecstasy + camera = camera_event_table_left_forward + } + + cooldown = { years = 100 } + + widget = { gui = event_window_widget_vfx_godray container = foreground_shader_vfx_container } + + trigger = { + pam_secular_faith_landed_actor_trigger = yes + piety >= 500 + OR = { + learning >= 16 + has_trait = lifestyle_scholar + has_trait = lifestyle_mystic + government_has_flag = government_is_theocracy + } + } + + immediate = { + } + + option = { # Press the advantage + name = pam_secular_faith_events.0045.a + add_character_modifier = { + modifier = pam_sf_doctrine_clarity_modifier + years = 3 + } + if = { + limit = { + cp:councillor_court_chaplain ?= { is_theocratic_lessee = yes } + can_add_hook = { target = cp:councillor_court_chaplain type = favor_hook } + } + add_hook = { + type = favor_hook + target = cp:councillor_court_chaplain + } + } + add_scholar_trait_or_xp_effect = { VALUE = 30 } + ai_chance = { + base = 100 + } + } + + option = { # Simply enjoy the clarity + name = pam_secular_faith_events.0045.b + change_spiritual_fulfillment = major_spiritual_fulfillment_value + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0046 - Shared Conviction +########################################################################################## +scripted_trigger valid_share_target_trigger = { + is_available_ai_adult = yes + ai_zeal >= 0 + any_personal_tenet = { + save_temporary_scope_as = tenet + NOT = { + root = { + any_personal_tenet = { + this = scope:tenet + } + } + } + } +} + +pam_secular_faith_events.0046 = { + type = character_event + title = pam_secular_faith_events.0046.t + desc = pam_secular_faith_events.0046.desc + theme = christian + override_background = sitting_room + + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:intimate + animation = divine_ecstasy + camera = camera_event_right_wedding + } + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight container = foreground_shader_vfx_container } + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + OR = { + any_spouse = { + valid_share_target_trigger = yes + } + any_relation = { + type = friend + valid_share_target_trigger = yes + } + any_relation = { + type = lover + valid_share_target_trigger = yes + } + any_close_family_member = { + valid_share_target_trigger = yes + } + } + } + + immediate = { + save_scope_as = root_scope + every_spouse = { + limit = { + valid_share_target_trigger = yes + } + add_to_list = intimate_list + } + every_relation = { + type = friend + limit = { + valid_share_target_trigger = yes + } + add_to_list = intimate_list + } + every_relation = { + type = lover + limit = { + valid_share_target_trigger = yes + } + add_to_list = intimate_list + } + every_close_family_member = { + limit = { + valid_share_target_trigger = yes + } + add_to_list = intimate_list + } + + random_in_list = { + list = intimate_list + 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 = intimate + } + + scope:intimate = { + random_personal_tenet = { + limit = { + save_temporary_scope_as = tenet_check + NOT = { + root = { + any_personal_tenet = { + this = scope:tenet_check + } + } + } + } + save_scope_as = shared_tenet + } + } + } + + option = { # Take up their conviction + name = pam_secular_faith_events.0046.a + trigger = { + OR = { + can_set_relation_friend_trigger = { CHARACTER = scope:intimate } + AND = { + has_relation_friend = scope:intimate + can_set_relation_best_friend_trigger = { CHARACTER = scope:intimate } + } + } + } + if = { + limit = { + NOT = { + knows_tenet = scope:shared_tenet + } + } + add_known_tenet = scope:shared_tenet + pam_secular_faith_seed_tenet_message_effect = { TENET = scope:shared_tenet } + } + force_set_personal_tenet = scope:shared_tenet + if = { + limit = { + has_relation_friend = scope:intimate + can_set_relation_best_friend_trigger = { CHARACTER = scope:intimate } + } + set_relation_best_friend = { + target = scope:intimate + reason = pam_sf_best_friend_shared_conviction + } + } + else = { + set_relation_friend = { + target = scope:intimate + reason = pam_sf_friend_shared_conviction + } + } + reverse_add_opinion = { + modifier = pam_sf_shared_conviction_opinion + target = scope:intimate + } + ai_chance = { + base = 100 + } + } + + option = { # Take it, and deepen the bond + name = pam_secular_faith_events.0046.b + trigger = { + are_characters_sensible_lovers_trigger = { INSTIGATING_LOVER = scope:root_scope TARGET_OF_LOVE = scope:intimate } + OR = { + can_set_relation_lover_trigger = { CHARACTER = scope:intimate } + AND = { + has_relation_lover = scope:intimate + can_set_relation_soulmate_trigger = { CHARACTER = scope:intimate } + } + } + } + if = { + limit = { + NOT = { + knows_tenet = scope:shared_tenet + } + } + add_known_tenet = scope:shared_tenet + pam_secular_faith_seed_tenet_message_effect = { TENET = scope:shared_tenet } + } + force_set_personal_tenet = scope:shared_tenet + if = { + limit = { + has_relation_lover = scope:intimate + can_set_relation_soulmate_trigger = { CHARACTER = scope:intimate } + } + set_relation_soulmate = { + target = scope:intimate + reason = pam_sf_soulmate_shared_conviction + } + } + else = { + set_relation_lover = { + target = scope:intimate + reason = pam_sf_lover_shared_conviction + } + } + reverse_add_opinion = { + modifier = pam_sf_shared_conviction_opinion + target = scope:intimate + } + ai_chance = { + base = 100 + } + } + + option = { # Admire it, but keep your own + name = pam_secular_faith_events.0046.c + if = { + limit = { + NOT = { + knows_tenet = scope:shared_tenet + } + } + add_known_tenet = scope:shared_tenet + pam_secular_faith_seed_tenet_message_effect = { TENET = scope:shared_tenet } + } + reverse_add_opinion = { + target = scope:intimate + modifier = friendliness_opinion + opinion = 10 + } + ai_chance = { + base = 100 + } + } +} + +########################################################################################## +# 0047 - Priestly Devotion (puppet your realm priest for free) +########################################################################################## +pam_secular_faith_events.0047 = { + type = character_event + title = pam_secular_faith_events.0047.t + desc = pam_secular_faith_events.0047.desc + theme = christian + override_background = temple + + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:chaplain + animation = prayer_crossing + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + has_theological_agent_puppet_trigger = no + cp:councillor_court_chaplain ?= { + save_temporary_scope_as = puppet + is_available_ai_adult = yes + OR = { + opinion = { target = root value >= 50 } + has_relation_friend = root + has_relation_lover = root + has_trait = trusting + has_trait = content + has_trait = compassionate + has_trait = forgiving + has_trait = craven + has_trait = humble + has_trait = fickle + has_trait = loyal + } + NOR = { + has_relation_rival = root + has_trait = arrogant + has_trait = paranoid + } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # Accept his devotion + name = pam_secular_faith_events.0047.a + if = { + limit = { + can_add_hook = { + type = loyalty_hook + target = scope:chaplain + } + } + add_hook = { + type = loyalty_hook + target = scope:chaplain + } + } + reverse_add_opinion = { + target = scope:chaplain + modifier = pious_opinion + opinion = 20 + } + ai_chance = { + base = 100 + } + } + + option = { # Keep it informal + name = pam_secular_faith_events.0047.b + add_piety = medium_piety_gain + reverse_add_opinion = { + target = scope:chaplain + modifier = pious_opinion + opinion = 20 + } + ai_chance = { + base = 10 + } + } +} + +########################################################################################## +# 0048 - Demonic Dreams (a tormenting dream) +########################################################################################## +pam_secular_faith_events.0048 = { + type = character_event + title = pam_secular_faith_events.0048.t + desc = pam_secular_faith_events.0048.desc + theme = christian + override_background = bedchamber + widgets = { + widget = { gui = event_window_widget_vfx_background_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_double_vision_severe container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_double_vision_severe container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_night_scene container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_fog container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = paranoia + camera = camera_event_very_left_lean_down + outfit_tags = { nightgown } + } + + right_portrait = { + character = scope:demon + animation = dancing + camera = camera_event_very_right_far + hide_info = yes + } + + cooldown = { years = 30 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + NOR = { + has_character_modifier = pam_sf_demon_torment_modifier + rite = { rite_has_doctrine = doctrine_pilgrimage_forbidden } + } + } + + immediate = { + hidden_effect_new_object = { + create_character = { + location = root.capital_province + template = generic_peasant_character + faith = root.faith + rite = root.rite + culture = root.culture + gender_female_chance = 0 + trait = smallpox + trait = bubonic_plague + trait = scaly + trait = measles + trait = scarred + trait = beauty_bad_3 + trait = physique_bad_3 + trait = clouded_eyes + trait = giant + trait = leper + save_scope_as = demon + after_creation = { + add_character_flag = created + change_current_weight = -500 + add_character_flag = bald_head + add_character_flag = is_naked + add_character_flag = random_beard + } + } + } + } + + option = { # Study the dream + name = pam_secular_faith_events.0048.a + trigger = { + has_trait = lifestyle_scholar + } + show_as_unavailable = { always = yes } + add_character_modifier = pam_sf_demon_torment_modifier + custom_tooltip = pam_sf_demon_torment_modifier_tt + add_scholar_trait_or_xp_effect = { VALUE = 30 } + ai_chance = { + base = 100 + } + } + + option = { # Ignore it + name = pam_secular_faith_events.0048.b + trigger = { + has_trait = cynical + } + show_as_unavailable = { always = yes } + add_stress = minor_stress_loss + ai_chance = { + base = 100 + } + } + + option = { # Resolve to make amends + name = pam_secular_faith_events.0048.c + change_spiritual_fulfillment = major_spiritual_fulfillment_loss + add_character_modifier = pam_sf_demon_torment_modifier + custom_tooltip = pam_sf_demon_torment_modifier_tt + ai_chance = { + base = 1 + } + } + + after = { + scope:demon ?= { silent_disappearance_effect = yes } + } +} + +########################################################################################## +# 0049 - Celestial Hierarchy +########################################################################################## +scripted_trigger appropriate_lustful_priest_trigger = { + faith = root.faith + is_available_ai_adult = yes + might_cheat_on_every_partner_trigger = yes + OR = { + any_secret = { + type = secret_deviant + NOT = { is_known_by = root } + } + NOT = { + any_secret = { + type = secret_deviant + } + } + } + OR = { + has_trait = lustful + has_trait = rakish + has_trait = seducer + } + NOR = { + has_trait = deviant # otherwise nothing to give + has_trait = chaste + has_trait = celibate + has_sexuality = asexual + } +} + +pam_secular_faith_events.0049 = { + type = character_event + title = pam_secular_faith_events.0049.t + desc = pam_secular_faith_events.0049.desc + theme = christian + override_background = temple + + left_portrait = { + character = scope:lustful_priest + animation = divine_ecstasy + camera = camera_event_center_pointing_left + } + + right_portrait = { + character = scope:prostitute + animation = whipping + camera = camera_event_very_right_fov35 + } + + cooldown = { years = 20 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + rite = { + has_at_least_tenet_status = { + tenet = tenet_celestial_hierarchy + status = known + } + } + NOR = { + rite = { rite_has_parameter = deviancy_accepted } + knows_tenet = tenet_carnal_exaltation + rite = { + has_at_least_tenet_status = { + tenet = tenet_carnal_exaltation + status = permitted + } + } + } + OR = { + any_vassal = { + government_has_flag = government_is_theocracy + appropriate_lustful_priest_trigger = yes + } + cp:councillor_court_chaplain ?= { + appropriate_lustful_priest_trigger = yes + } + } + } + + immediate = { + random_vassal = { + limit = { + government_has_flag = government_is_theocracy + appropriate_lustful_priest_trigger = yes + } + save_scope_as = lustful_priest + save_scope_as = attraction_check + add_character_flag = is_naked + } + if = { + limit = { + NOT = { + exists = scope:lustful_priest + } + } + cp:councillor_court_chaplain = { + save_scope_as = lustful_priest + save_scope_as = attraction_check + add_character_flag = is_naked + } + } + scope:lustful_priest = { + if = { + limit = { + NOT = { + any_secret = { + type = secret_deviant + } + } + } + hidden_effect = { + give_deviant_secret_or_trait_effect = yes + } + } + random_secret = { + type = secret_deviant + limit = { + NOT = { is_known_by = root } + } + save_scope_as = lustful_priest_secret + } + } + hidden_effect_new_object = { + create_character = { + location = root.capital_province + template = ep3_prostitute_character + gender_female_chance = scope_attraction_based_female_chance + faith = root.capital_county.faith + rite = root.capital_county.rite + culture = root.capital_county.culture + save_scope_as = prostitute + after_creation = { + add_character_flag = created + add_character_flag = pope_hat + add_character_flag = is_naked + } + } + scope:prostitute = { + random_list = { + 10 = { + set_sexuality = bisexual + } + 5 = { + trigger = { + OR = { + AND = { + is_female = yes + scope:lustful_priest = { is_female = yes } + } + AND = { + is_male = yes + scope:lustful_priest = { is_male = yes } + } + } + } + set_sexuality = homosexual + } + 10 = { + trigger = { + OR = { + AND = { + is_female = no + scope:lustful_priest = { is_female = yes } + } + AND = { + is_male = no + scope:lustful_priest = { is_male = yes } + } + } + } + set_sexuality = heterosexual + } + } + } + } + } + + option = { # Study them, you little freak + name = pam_secular_faith_events.0049.a + add_scholar_trait_or_xp_effect = { VALUE = 10 } + scope:lustful_priest_secret ?= { + reveal_to = root + } + add_known_tenet = tenet_carnal_exaltation + pam_secular_faith_seed_tenet_message_effect = { TENET = tenet:tenet_carnal_exaltation } + ai_chance = { + base = 100 + } + } + + option = { # Join them + name = pam_secular_faith_events.0049.b + scope:lustful_priest_secret ?= { + reveal_to = root + } + had_sex_with_effect = { + CHARACTER = scope:lustful_priest + PREGNANCY_CHANCE = pregnancy_chance + } + had_sex_with_effect = { + CHARACTER = scope:prostitute + PREGNANCY_CHANCE = pregnancy_chance + } + if = { + limit = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:lustful_priest } + } + set_relation_potential_lover = scope:lustful_priest + } + if = { + limit = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:prostitute } + } + set_relation_potential_lover = scope:prostitute + } + add_courtier = scope:prostitute + hidden_effect = { + scope:prostitute = { remove_character_flag = created } + } + create_character_memory = { + type = had_a_threesome_memory + participants = { + partner_1 = scope:lustful_priest + partner_2 = scope:prostitute + } + } + stress_and_fulfillment_impact = { + lustful = massive_stress_impact_loss + chaste = massive_stress_impact_gain + celibate = massive_stress_impact_gain + } + ai_chance = { + base = 5 + modifier = { + might_cheat_on_every_partner_trigger = no + factor = 0 + } + modifier = { + OR = { + has_trait = chaste + has_trait = celibate + } + factor = 0 + } + } + } + + option = { # Learn the secret + name = pam_secular_faith_events.0049.c + trigger = { + exists = scope:lustful_priest_secret + } + scope:lustful_priest_secret = { + reveal_to = root + } + add_piety = minor_piety_gain + ai_chance = { + base = 100 + } + } + + after = { + scope:lustful_priest = { + remove_character_flag = is_naked + } + scope:prostitute = { + remove_character_flag = is_naked + remove_character_flag = pope_hat + silent_disappearance_ai_if_created_effect = yes + } + } +} + +########################################################################################## +# 0050 - Confession (the ruler lusts after their own court chaplain) +########################################################################################## +pam_secular_faith_events.0050 = { + type = character_event + title = pam_secular_faith_events.0050.t + desc = pam_secular_faith_events.0050.desc + theme = christian + override_background = temple + + left_portrait = { + character = root + animation = prayer + camera = camera_event_kneeling + } + right_portrait = { + character = scope:chaplain + animation = divine_gesture_3 + camera = camera_event_right_away_3_4_more_right + } + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + rite = { + has_at_least_tenet_status = { + tenet = tenet_confession + status = permitted + } + } + cp:councillor_court_chaplain ?= { + pam_sf_carnal_partner_valid_trigger = yes + } + OR = { + has_trait = lustful + has_trait = rakish + has_trait = seducer + cp:councillor_court_chaplain ?= { + OR = { + has_trait = lustful + has_trait = rakish + has_trait = seducer + } + } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # ...is there space for two in your booth? + name = pam_secular_faith_events.0050.a + set_relation_lover = { + target = scope:chaplain + reason = pam_sf_lover_confessional + } + had_sex_with_effect = { + CHARACTER = scope:chaplain + PREGNANCY_CHANCE = pregnancy_chance + } + stress_and_fulfillment_impact = { + base = minor_stress_impact_loss + lustful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { # Forgive me, for I have impure thoughts. + name = pam_secular_faith_events.0050.b + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + base = minor_stress_impact_gain + lustful = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = lustful factor = 0 } + } + } +} + +########################################################################################## +# 0051 - The Lord your God +########################################################################################## +pam_secular_faith_events.0051 = { + type = character_event + title = pam_secular_faith_events.0051.t + desc = pam_secular_faith_events.0051.desc + theme = christian + override_background = temple + widgets = { + widget = { gui = event_window_widget_vfx_background_double_vision_severe container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_double_vision_severe container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = mental_anguish + camera = camera_head_designer_up + } + + cooldown = { years = 50 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = eccentric + has_trait = withering_mind + } + NOR = { + has_character_modifier = pam_sf_voice_of_jesus_modifier + has_character_modifier = pam_sf_stroke_of_god_modifier + } + } + + option = { # I will... obey... + name = pam_secular_faith_events.0051.a + add_internal_flag = dangerous + flavor = pam_sf_lord_your_god_tt + custom_tooltip = pam_sf_lord_your_god_effect_tt + change_spiritual_fulfillment = 100 + hidden_effect = { + random_list = { + 10 = { + send_interface_toast = { + type = event_toast_effect_good + title = pam_sf_voice_of_jesus_toast + left_icon = root + add_character_modifier = { + modifier = pam_sf_voice_of_jesus_modifier + years = 15 + } + } + } + 80 = { + send_interface_toast = { + type = event_toast_effect_bad + title = pam_sf_stroke_of_god_toast + left_icon = root + add_character_modifier = { + modifier = pam_sf_stroke_of_god_modifier + years = 5 + } + } + } + 9 = { + if = { + limit = { + NOT = { + has_trait = withering_mind + } + } + add_trait = withering_mind + } + else = { + add_trait_xp = { trait = withering_mind track = withering_mind value = 10 } + } + } + 1 = { + death = { death_reason = death_apoplexy } + } + } + } + } +} + +########################################################################################## +# 0052 - After You're Gone (an old ruler settles where they will lie; pays off at their funeral) +########################################################################################## +pam_secular_faith_events.0052 = { + type = character_event + title = pam_secular_faith_events.0052.t + desc = pam_secular_faith_events.0052.desc + theme = christian + override_background = temple_church + + left_portrait = { + character = root + animation = contemplating + } + right_portrait = { + character = scope:chaplain + animation = divine_gesture_3 + } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + has_dlc_feature = legends_of_the_dead + is_old_character = yes + NOT = { has_character_flag = pam_sf_tomb_planned } + exists = dynasty + exists = primary_heir + rite = { + NOR = { + rite_has_parameter = cremation_funeral + rite_has_parameter = sky_burials_active + } + } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + capital_county ?= { + any_county_province = { has_holding_type = church_holding } + } + } + + immediate = { + add_character_flag = pam_sf_tomb_planned + cp:councillor_court_chaplain = { save_scope_as = chaplain } + capital_county = { + random_county_province = { + limit = { has_holding_type = church_holding } + barony = { save_scope_as = resting_church } + } + } + } + + option = { # Commission a proud effigy in stone - unveiled at your funeral + name = pam_secular_faith_events.0052.a + remove_short_term_gold = minor_gold_value + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + custom_tooltip = pam_sf_effigy_planned_tt + hidden_effect = { + dynasty = { + add_to_variable_list = { + name = pam_sf_planned_effigies + target = root + } + } + } + stress_and_fulfillment_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = humble factor = 0 } + } + } + + option = { # Ask to be buried in the plain cowl - hallows your funeral + name = pam_secular_faith_events.0052.b + add_prestige = minor_prestige_loss + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + custom_tooltip = pam_sf_cowl_burial_planned_tt + hidden_effect = { + dynasty = { + add_to_variable_list = { + name = pam_sf_planned_cowl_burials + target = root + } + } + } + stress_and_fulfillment_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = arrogant factor = 0 } + } + } + + option = { # Wave the question away + name = pam_secular_faith_events.0052.c + stress_and_fulfillment_impact = { + humble = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = zealous + } + } + } + } +} + +########################################################################################## +# 0053 - The Saint Goes Forth (a held relic is borne in procession) +########################################################################################## +pam_secular_faith_events.0053 = { + type = character_event + title = pam_secular_faith_events.0053.t + desc = pam_secular_faith_events.0053.desc + theme = christian + override_background = temple + override_effect_2d = { reference = smoke } + widgets = { + widget = { + gui = event_window_widget_vfx_godray + container = background_shader_vfx_container + } + } + + left_portrait = { + character = root + animation = prayer_standing + camera = camera_event_crowd + } + right_portrait = { + character = scope:chaplain + animation = thurible + camera = camera_event_right_forward + } + artifact = { + target = scope:procession_relic + position = lower_center_portrait + } + + cooldown = { years = 15 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + exists = capital_county + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + any_character_artifact = { + is_holy_relic_for = root.faith + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + random_character_artifact = { + limit = { + is_holy_relic_for = root.faith + } + save_scope_as = procession_relic + } + capital_province = { barony = { save_scope_as = loc_province } } + } + + option = { # Carry the reliquary through the town yourself - the crowd may harm the relic + name = pam_secular_faith_events.0053.a + custom_tooltip = pam_sf_procession_gamble_tt + add_piety = major_piety_gain + capital_county = { + add_county_modifier = { + modifier = pam_sf_relic_procession_county_modifier + years = 10 + } + } + hidden_effect = { + random = { + chance = 25 + send_interface_toast = { + type = event_toast_effect_bad + title = pam_sf_relic_jostled_toast + left_icon = root + right_icon = scope:procession_relic + scope:procession_relic = { + add_durability = { + value = artifact_durability + multiply = -0.25 + } + } + } + } + } + stress_and_fulfillment_impact = { + 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 = { # Keep vigil before the relic alone + name = pam_secular_faith_events.0053.b + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = gregarious factor = 0 } + } + } + + option = { # The bones stay in their vault, tended and safe + name = pam_secular_faith_events.0053.c + scope:procession_relic = { + add_durability = 10 + } + scope:chaplain = { + add_opinion = { + target = root + modifier = upset_opinion + opinion = -10 + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + paranoid = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } +} + +########################################################################################## +# 0054 - The Basin and the Towel (the ruler washes the feet of the poor) +########################################################################################## +scripted_trigger pam_sf_maundy_pauper_valid_trigger = { + is_available_healthy_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + faith = root.faith +} + +pam_secular_faith_events.0054 = { + type = character_event + title = pam_secular_faith_events.0054.t + desc = pam_secular_faith_events.0054.desc + theme = christian + override_background = temple + + left_portrait = { + character = root + animation = situla + camera = camera_event_left_pointing_right + } + right_portrait = { + character = scope:pauper + animation = worry + camera = camera_event_very_right_far + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + any_pool_character = { + province = root.location + pam_sf_maundy_pauper_valid_trigger = yes + } + } + + immediate = { + random_pool_character = { + province = root.location + limit = { pam_sf_maundy_pauper_valid_trigger = yes } + save_scope_as = pauper + hidden_effect = { + add_character_flag = peasant_outfit + add_character_flag = no_hat + } + } + } + + option = { # Clean the feet with your tongue + name = pam_secular_faith_events.0054.deviant + trigger = { + has_trait = deviant + } + add_prestige = massive_prestige_loss + change_spiritual_fulfillment = major_spiritual_fulfillment_value + add_stress = -300 + add_character_modifier = { + modifier = best_meal_of_my_life_modifier + years = 15 + } + reverse_add_opinion = { + target = scope:pauper + modifier = absolutely_horrified_opinion + } + every_courtier = { + add_opinion = { + target = root + modifier = absolutely_horrified_opinion + } + } + ai_chance = { + base = 100 + modifier = { has_trait = arrogant factor = 0 } + } + } + + option = { # Kneel and wash their feet before the court + name = pam_secular_faith_events.0054.a + custom_tooltip = pam_sf_odorous_feet_tt + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + hidden_effect = { + random = { + chance = 25 + send_interface_toast = { + type = event_toast_effect_bad + title = pam_sf_odorous_feet_toast + left_icon = root + right_icon = scope:pauper + add_character_modifier = { + modifier = pam_sf_lingering_stench_modifier + years = 2 + } + } + } + } + stress_and_fulfillment_impact = { + humble = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = arrogant factor = 0 } + } + } + + option = { # Kiss the feet as well, as the saints did - the deeper the bow, the sharper the smell + name = pam_secular_faith_events.0054.b + custom_tooltip = pam_sf_odorous_feet_tt + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + hidden_effect = { + random = { + chance = 50 + send_interface_toast = { + type = event_toast_effect_bad + title = pam_sf_odorous_feet_toast + left_icon = root + right_icon = scope:pauper + add_character_modifier = { + modifier = pam_sf_lingering_stench_modifier + years = 2 + } + } + } + } + stress_and_fulfillment_impact = { + humble = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = humble + has_trait = zealous + } + } + } + } + + option = { # Think better of it and call the ritual off + name = pam_secular_faith_events.0054.c + stress_and_fulfillment_impact = { + humble = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = zealous + } + } + } + } +} + +########################################################################################## +# 0055 - A Voice of Bronze (a newly recast church bell is baptized) +########################################################################################## +pam_secular_faith_events.0055 = { + type = character_event + title = pam_secular_faith_events.0055.t + desc = pam_secular_faith_events.0055.desc + theme = christian + override_background = courtyard + + left_portrait = { + character = root + animation = interested + camera = camera_event_left_away_3_4 + } + right_portrait = { + character = scope:chaplain + animation = situla + camera = camera_event_right_away + } + + cooldown = { years = 50 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + capital_county ?= { + any_county_province = { has_holding_type = church_holding } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + capital_county = { + random_county_province = { + limit = { has_holding_type = church_holding } + barony = { save_scope_as = bell_church } + } + } + } + + option = { # Scholar: bronze is bronze, and the capitularies agree + name = pam_secular_faith_events.0055.b + trigger = { + has_trait = lifestyle_scholar + } + show_as_unavailable = { always = yes } + add_scholar_trait_or_xp_effect = { VALUE = 30 } + scope:chaplain = { + add_opinion = { + target = root + modifier = upset_opinion + opinion = -25 + } + } + ai_chance = { + base = 100 + } + } + + option = { # Baptize the bell and name it + name = pam_secular_faith_events.0055.a + add_piety = minor_piety_gain + capital_county = { + add_county_modifier = { + modifier = pam_sf_blessed_bell_county_modifier + years = 25 + } + } + stress_and_fulfillment_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # A plain blessing, then let it ring + name = pam_secular_faith_events.0055.c + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } +} + +########################################################################################## +# 0056 - A Sparrow in the Hall (Bede's sparrow flies through the evening meal) +########################################################################################## +pam_secular_faith_events.0056 = { + type = character_event + title = pam_secular_faith_events.0056.t + desc = pam_secular_faith_events.0056.desc + theme = christian + override_background = feast + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight_dark container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = drink_goblet + camera = camera_event_very_left + } + right_portrait = { + character = scope:chaplain + animation = divine_gesture_4 + camera = camera_event_very_right_far + } + + cooldown = { years = 30 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + drinks_alcohol_trigger = yes + character_capital_has_winter_trigger = yes + capital_province = { geographical_region = world_europe } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # Scholar: Bede wrote the same, almost to the word + name = pam_secular_faith_events.0056.scholar + trigger = { + has_trait = lifestyle_scholar + } + show_as_unavailable = { always = yes } + reverse_add_opinion = { + target = scope:chaplain + modifier = impressed_opinion + opinion = 30 + } + add_scholar_trait_or_xp_effect = { VALUE = 20 } + ai_chance = { + base = 100 + } + } + + option = { # Take the sparrow's flight to heart + name = pam_secular_faith_events.0056.a + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + stress_and_fulfillment_impact = { + base = minor_stress_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = cynical factor = 0 } + } + } + + option = { # It was a bird + name = pam_secular_faith_events.0056.b + if = { + limit = { + has_royal_court = yes + } + change_current_court_grandeur = minor_court_grandeur_gain + } + add_prestige = miniscule_prestige_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = zealous factor = 0 } + } + } +} + +########################################################################################## +# 0057 - The Church Ale (the parish brews to pay for the church roof) +########################################################################################## +pam_secular_faith_events.0057 = { + type = character_event + title = pam_secular_faith_events.0057.t + desc = pam_secular_faith_events.0057.desc + theme = christian + override_background = holy_site_generic_scope + + left_portrait = { + character = root + animation = interested + camera = camera_event_very_left + } + right_portrait = { + character = scope:chaplain + animation = drink + camera = camera_event_right_forward + } + + cooldown = { years = 15 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + # A monks' brewery somewhere in the domain does the brewing. + any_held_title = { + tier = tier_county + any_county_province = { + has_holding_type = church_holding + has_building_or_higher = breweries_01 + } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + random_held_title = { + limit = { + tier = tier_county + any_county_province = { + has_holding_type = church_holding + has_building_or_higher = breweries_01 + } + } + save_scope_as = ale_county + save_scope_as = holy_site_scope + random_county_province = { + limit = { + has_holding_type = church_holding + has_building_or_higher = breweries_01 + } + barony = { save_scope_as = ale_church } + } + } + } + + option = { # Drink with the parish - the brew is strong + name = pam_secular_faith_events.0057.a + flavor = pam_sf_church_ale_gamble_tt + scope:ale_county = { + add_county_modifier = { + modifier = pam_sf_church_ale_county_modifier + years = 10 + } + } + hidden_effect = { + random = { + chance = 35 + send_interface_toast = { + type = event_toast_effect_bad + title = pam_sf_church_ale_toast + left_icon = root + add_character_modifier = { + modifier = legend_hangover_modifier + months = 6 + } + } + } + } + stress_and_fulfillment_impact = { + gregarious = minor_stress_impact_loss + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = temperate factor = 0 } + } + } + + option = { # Pay for the roof yourself, no revel needed + name = pam_secular_faith_events.0057.b + remove_short_term_gold = minor_gold_value + add_piety = medium_piety_gain + stress_and_fulfillment_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = greedy factor = 0 } + } + } + + option = { # Forbid drink on holy ground + name = pam_secular_faith_events.0057.c + add_piety = minor_piety_gain + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:chaplain + opinion = -10 + } + stress_and_fulfillment_impact = { + gregarious = minor_stress_impact_gain + drunkard = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = drunkard + } + } + } + } +} + +########################################################################################## +# 0058 - Quid Mus Sumit? (a mouse has eaten of the reserved Host) +########################################################################################## +pam_secular_faith_events.0058 = { + type = character_event + title = pam_secular_faith_events.0058.t + desc = pam_secular_faith_events.0058.desc + theme = christian + override_background = temple + widgets = { + widget = { gui = event_window_widget_vfx_background_flickering_candlelight container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_left_character_flickering_candlelight container = foreground_shader_vfx_container } + widget = { gui = event_window_widget_vfx_right_character_flickering_candlelight container = foreground_shader_vfx_container } + } + + left_portrait = { + character = root + animation = contemplating + camera = camera_event_left_to_the_left + } + right_portrait = { + character = scope:chaplain + animation = worry + } + + cooldown = { years = 30 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + rite = { + has_at_least_tenet_status = { + tenet = tenet_communion + status = permitted + } + } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # Scholar: the mouse ate bread, and nothing more + name = pam_secular_faith_events.0058.scholar + trigger = { + has_trait = lifestyle_scholar + } + show_as_unavailable = { always = yes } + add_piety = medium_piety_gain + add_scholar_trait_or_xp_effect = { VALUE = 20 } + scope:chaplain = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + ai_chance = { + base = 100 + } + } + + option = { # Blow the negligence out of proportion and drive the chaplain from office + name = pam_secular_faith_events.0058.mean + trigger = { + learning >= 12 + } + show_as_unavailable = { always = yes } + add_piety = minor_piety_loss + fire_councillor = scope:chaplain + scope:chaplain = { + select_and_move_to_pool_effect = yes + add_opinion = { + target = root + modifier = hate_opinion + opinion = -30 + } + } + stress_and_fulfillment_impact = { + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + has_trait = just + } + } + } + } + + option = { # Buy a pyx with a better lock + name = pam_secular_faith_events.0058.a + remove_short_term_gold = miniscule_gold_value + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { has_trait = greedy factor = 0 } + } + } + + option = { # Laugh in the poor man's face + name = pam_secular_faith_events.0058.b + add_stress = minor_stress_loss + scope:chaplain = { + add_opinion = { + target = root + modifier = upset_opinion + opinion = -10 + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = compassionate + } + } + } + } +} + +########################################################################################## +# 0059 - The Lord's Day (the chaplain bars the hunt on the day of rest) +########################################################################################## +pam_secular_faith_events.0059 = { + type = character_event + title = pam_secular_faith_events.0059.t + desc = pam_secular_faith_events.0059.desc + theme = christian + override_background = courtyard + + left_portrait = { + character = root + animation = horse_archer_idle + camera = camera_event_horse_left + } + right_portrait = { + character = scope:chaplain + animation = condemnation + camera = camera_event_very_right_fov35 + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_christian_actor_trigger = yes + is_at_war = no + OR = { + is_clergy = no + has_trait = lifestyle_hunter + } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + # The sighted game must have somewhere in the domain to be. + any_held_title = { + tier = tier_county + hunt_activity_recent_hunt_sighting_trigger = no + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + hidden_effect = { + every_held_title = { + limit = { + tier = tier_county + hunt_activity_recent_hunt_sighting_trigger = no + } + add_to_list = sighting_counties + } + random_in_list = { + list = sighting_counties + weight = { + base = 1 + hunt_activity_sighting_county_modifier = yes + } + save_scope_as = sighting_county + 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 + } + } + scope:sighting_county = { + hunt_activity_standard_game_effect = { PROVINCE = scope:sighting_province HUNTER = root } + hunt_create_sighting_effect = { + TYPE = standard + ANIMAL = var:animal_type + OWNER = root + } + } + } + } + + option = { # Ride on regardless + name = pam_secular_faith_events.0059.b + add_prestige = minor_prestige_gain + scope:chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + scope:sighting_county = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_standard_modifier + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = humble + } + } + } + } + + option = { # Unsaddle and hear mass + name = pam_secular_faith_events.0059.a + add_piety = minor_piety_gain + scope:chaplain = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + hidden_effect = { + scope:sighting_county = { + hunt_remove_sighting_effect = yes + remove_variable = recent_sighting + } + } + stress_and_fulfillment_impact = { + humble = minor_stress_impact_loss + impatient = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = arrogant + } + } + } + } +} + +########################################################################################## +# 0060 - A Life Unburdened (A beggar is happier than you) +########################################################################################## +pam_secular_faith_events.0060 = { + type = character_event + title = pam_secular_faith_events.0060.t + desc = pam_secular_faith_events.0060.desc + theme = faith + override_background = { reference = market } + override_effect_2d = { reference = rain } + + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_left + } + right_portrait = { + character = scope:hermit + animation = dancing + camera = camera_event_center_close_to_right + hide_info = yes + } + + cooldown = { years = 10 } + + trigger = { + pam_secular_faith_clergy_ok_actor_trigger = yes + spiritual_fulfillment < 0 + is_in_debt = yes + NOT = { + any_personal_tenet = { + pam_poverty_tenets_trigger = yes + } + } + exists = location.county.faith + location = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + terrain = oasis + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + OR = { + has_trait = greedy + has_trait = cynical + has_trait = arrogant + has_trait = gluttonous + } + } + modifier = { + add = 1 + OR = { + has_trait = generous + has_trait = zealous + has_trait = improvident + has_trait = content + has_trait = humble + has_trait = temperate + } + } + } + + immediate = { + create_character = { + location = root.location + template = generic_peasant_character + faith = root.location.county.faith + rite = root.location.county.rite + culture = root.location.county.culture + save_scope_as = hermit + } + random_tenet = { + limit = { + pam_poverty_tenets_trigger = yes + } + save_scope_as = tenet_pick + } + } + + option = { # Add a personal tenet of poverty to your faith, or replace an existing one + name = pam_secular_faith_events.0060.a + change_spiritual_fulfillment = major_spiritual_fulfillment_value + force_set_personal_tenet = scope:tenet_pick + stress_and_fulfillment_impact = { + greedy = major_stress_impact_gain + cynical = major_stress_impact_gain + generous = medium_stress_impact_loss + zealous = medium_stress_impact_loss + improvident = medium_stress_impact_loss + content = medium_stress_impact_loss + humble = medium_stress_impact_loss + temperate = medium_stress_impact_loss + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_greed = -1 + ai_zeal = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = cynical + } + } + } + } + + option = { # Get back to work + name = pam_secular_faith_events.0060.b + change_spiritual_fulfillment = medium_spiritual_fulfillment_loss + add_character_modifier = { + modifier = pam_sf_grinding_modifier + years = 5 + } + stress_and_fulfillment_impact = { + generous = minor_stress_impact_gain + zealous = minor_stress_impact_gain + content = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_zeal = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = content + has_trait = humble + has_trait = generous + } + } + } + } + + option = { # Opt out + name = pam_secular_faith_events.0060.c + add_prestige = miniscule_prestige_gain + ai_chance = { + base = 100 + } + } + + after = { + scope:hermit = { + silent_disappearance_ai_if_created_effect = yes + } + } +} diff --git a/events/dlc/pam/pam_theocratic_ruler_events.txt b/events/dlc/pam/pam_theocratic_ruler_events.txt new file mode 100644 index 000000000..36e53bcb6 --- /dev/null +++ b/events/dlc/pam/pam_theocratic_ruler_events.txt @@ -0,0 +1,3149 @@ +namespace = pam_theocratic_ruler_events + +########################### - By JosH +## pam_theocratic_ruler_events.0001 - A Bequest for the Church +## pam_theocratic_ruler_events.0002 - A Traveler from Across the Border +## pam_theocratic_ruler_events.0003 - Counsel for a Hardened Border +## pam_theocratic_ruler_events.0004 - Brethern as Neighbors +## pam_theocratic_ruler_events.0005 - Swords for the Faith +## pam_theocratic_ruler_events.0006 - Tithes or Mercy +## pam_theocratic_ruler_events.0007 - Blissful Harmony +## pam_theocratic_ruler_events.0008 - Stone upon Stone +## pam_theocratic_ruler_events.0009 - Try to Be the Shepherd +## pam_theocratic_ruler_events.0010 - The Sword or the Crozier +## pam_theocratic_ruler_events.0011 - Sword of the Fallen Knight +## pam_theocratic_ruler_events.0012 - A Sacred Grove (travel) +## pam_theocratic_ruler_events.0013 - An Angelic Anthem +## pam_theocratic_ruler_events.0014 - A Convert's Plea +## pam_theocratic_ruler_events.0015 - Prayer Hearing +############################ + + +########################### +## pam_theocratic_ruler_events.0001 — A Bequest for the Church +############################ + +# Same faith landed theocrat in your archdiocese clerical region (may not be your feudal vassal). +# Scope: county holder. root: the theocratic ruler. +scripted_trigger pam_theocratic_ruler_0001_clerical_region_priest_trigger = { + this != root + is_available = yes + faith = root.faith + government_has_flag = government_is_theocracy + is_landed = yes +} + +# Suffragans use plain theocracy, not government_is_ecclesiastical +# Scope: candidate character. root: the theocratic ruler +scripted_trigger pam_theocratic_ruler_0001_subordinate_priest_trigger = { + this != root + is_available = yes + faith = root.faith + government_has_flag = government_is_theocracy + is_landed = yes +} + +pam_theocratic_ruler_events.0001 = { + type = character_event + title = pam_theocratic_ruler_events.0001.t + desc = pam_theocratic_ruler_events.0001.desc + theme = christian + override_background = { reference = council_chamber } + + left_portrait = { + character = root + animation = priest_corrupt + } + right_portrait = { + character = scope:subordinate_priest + animation = reading + } + + cooldown = { years = 15 } + + trigger = { + pam_government_is_religious_playable_trigger = yes # In pam_scripted_triggers + is_landed = yes + is_available_adult = yes + OR = { + any_vassal_or_below = { + pam_theocratic_ruler_0001_subordinate_priest_trigger = yes + } + AND = { + exists = capital_county + capital_county = { + exists = clerical_region_title + clerical_region_title = { + any_county_in_clerical_region = { + holder = { + pam_theocratic_ruler_0001_clerical_region_priest_trigger = yes + } + } + } + } + } + cp:councillor_court_chaplain ?= { + is_imprisoned = no + faith = root.faith + } + } + } + + immediate = { + every_vassal_or_below = { + limit = { + pam_theocratic_ruler_0001_subordinate_priest_trigger = yes + } + add_to_list = pam_theocratic_ruler_0001_priest_candidates + } + if = { + limit = { + exists = capital_county + capital_county = { + exists = clerical_region_title + } + } + capital_county.clerical_region_title = { + every_county_in_clerical_region = { + limit = { + holder = { + pam_theocratic_ruler_0001_clerical_region_priest_trigger = yes + } + } + holder = { + add_to_list = pam_theocratic_ruler_0001_priest_candidates + } + } + } + } + if = { + limit = { + list_size = { + name = pam_theocratic_ruler_0001_priest_candidates + value > 0 + } + } + random_in_list = { + list = pam_theocratic_ruler_0001_priest_candidates + save_scope_as = subordinate_priest + } + } + if = { + limit = { + NOT = { exists = scope:subordinate_priest } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + this != root + is_alive = yes + is_imprisoned = no + faith = root.faith + } + } + cp:councillor_court_chaplain = { + save_scope_as = subordinate_priest + } + } + } + + # Frame the priest: I find evidence he mishandled sacred funds… + option = { + name = pam_theocratic_ruler_events.0001.a + skill = intrigue + trigger = { + intrigue >= high_skill_rating + } + show_as_unavailable = { + always = yes + } + add_short_term_gold = medium_gold_value + add_piety = medium_piety_loss + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:subordinate_priest + IMPRISONER = root + } + if = { + limit = { + scope:subordinate_priest = { + is_councillor_of = root + } + } + fire_councillor = scope:subordinate_priest + } + if = { + limit = { + scope:subordinate_priest = { + is_courtier_of = root + } + } + remove_courtier_or_guest = scope:subordinate_priest + } + scope:subordinate_priest = { + add_opinion = { + modifier = blamed_me_unjustly + target = root + } + add_stress = major_stress_gain + } + stress_and_fulfillment_impact = { + honest = medium_stress_impact_gain + just = minor_stress_impact_gain + deceitful = medium_stress_impact_loss + callous = minor_stress_impact_loss + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = 0.35 + ai_rationality = 0.2 + } + } + } + + # "Lets reason together as clergy." + option = { + name = pam_theocratic_ruler_events.0001.b + duel = { + skills = { diplomacy intrigue } + target = scope:subordinate_priest + 50 = { + desc = pam_theocratic_ruler_events.0001.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + add_short_term_gold = medium_gold_value + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + add_intrigue_lifestyle_xp = minor_lifestyle_xp + send_interface_toast = { + type = event_toast_effect_good + title = pam_theocratic_ruler_events.0001.b.toast.success + left_icon = scope:subordinate_priest + right_icon = root + scope:subordinate_priest = { + if = { + limit = { + can_add_hook = { + target = root + type = favor_hook + } + } + add_hook = { + type = favor_hook + target = root + } + } + } + } + } + 50 = { + desc = pam_theocratic_ruler_events.0001.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_theocratic_ruler_events.0001.b.toast.failure + left_icon = scope:subordinate_priest + right_icon = root + add_stress = minor_stress_gain + scope:subordinate_priest = { + add_opinion = { + modifier = upset_opinion + target = root + opinion = -25 + } + } + } + } + } + stress_and_fulfillment_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 35 + ai_value_modifier = { + ai_rationality = 0.35 + ai_sociability = 0.25 + ai_honor = 0.15 + } + } + } + + # Into the treasury, with thanksgiving and care. + option = { + name = pam_theocratic_ruler_events.0001.c + add_treasury_or_gold = minor_treasury_or_gold_value + add_piety = medium_piety_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + humble = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 55 + ai_value_modifier = { + ai_zeal = 0.45 + ai_compassion = 0.2 + ai_greed = -0.35 + } + } + } +} + + +########################### +## pam_theocratic_ruler_events.0002 — A Traveler from Across the Border +############################ + +scripted_trigger pam_theocratic_ruler_0002_foreign_neighbor_trigger = { + top_liege != root.top_liege + is_available = yes + NOR = { + is_allied_to = root + has_truce = root + } + faith = { + has_doctrine_parameter = unreformed + this != root.faith + } + culture != root.culture +} + +pam_theocratic_ruler_events.0002 = { + type = character_event + title = pam_theocratic_ruler_events.0002.t + desc = pam_theocratic_ruler_events.0002.desc + theme = christian + override_background = { reference = activity_tour } + + left_portrait = { + character = root + animation = personality_compassionate + } + right_portrait = { + character = scope:foreign_ruler + animation = personality_honorable + } + + cooldown = { years = 10 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_landed = yes + is_available_adult = yes + trigger_if = { + limit = { + top_liege != this + } + any_neighboring_realm_same_rank_owner = { + culture != root.culture + pam_theocratic_ruler_0002_foreign_neighbor_trigger = yes + } + } + trigger_else = { + any_neighboring_top_liege_realm_owner = { + culture != root.culture + pam_theocratic_ruler_0002_foreign_neighbor_trigger = yes + } + } + } + + immediate = { + if = { + limit = { + top_liege != this + } + random_neighboring_realm_same_rank_owner = { + limit = { + pam_theocratic_ruler_0002_foreign_neighbor_trigger = yes + } + save_scope_as = foreign_ruler + } + } + else = { + random_neighboring_top_liege_realm_owner = { + limit = { + pam_theocratic_ruler_0002_foreign_neighbor_trigger = yes + } + save_scope_as = foreign_ruler + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + diplomacy >= medium_skill_rating + } + modifier = { + add = 0.25 + has_trait = zealous + } + } + + # A modest gift and offer of peace. + option = { + name = pam_theocratic_ruler_events.0002.a + trigger = { + short_term_gold >= minor_gold_value + } + add_truce_both_ways = { + character = scope:foreign_ruler + years = 5 + name = TRUCE_PAM_NEIGHBOR_GIFT + } + pay_short_term_gold = { + target = scope:foreign_ruler + gold = minor_gold_value + } + scope:foreign_ruler = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + ai_chance = { + base = 35 + ai_value_modifier = { + ai_greed = -0.25 + ai_zeal = 0.5 + ai_rationality = 0.35 + } + } + } + + # I seek honest understanding between our peoples. + option = { + name = pam_theocratic_ruler_events.0002.b + skill = diplomacy + duel = { + skill = diplomacy + target = scope:foreign_ruler + 45 = { + desc = pam_theocratic_ruler_events.0002.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_theocratic_ruler_events.0002.b.toast.success + left_icon = scope:foreign_ruler + right_icon = root + root.culture = { + change_cultural_acceptance = { + target = scope:foreign_ruler.culture + value = medium_cultural_acceptance_gain + desc = pam_theocratic_ruler_events.0002.b.acceptance + } + } + } + } + 45 = { + desc = pam_theocratic_ruler_events.0002.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_theocratic_ruler_events.0002.b.toast.failure + left_icon = scope:foreign_ruler + right_icon = root + scope:foreign_ruler = { + add_opinion = { + modifier = insult_opinion + target = root + opinion = low_negative_opinion + } + } + } + } + } + stress_and_fulfillment_impact = { + shy = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 45 + ai_value_modifier = { + ai_sociability = 0.45 + ai_rationality = 0.25 + ai_boldness = 0.15 + } + } + } + + # Heathens have no place in our lands. + option = { + name = pam_theocratic_ruler_events.0002.c + add_piety = medium_piety_gain + scope:foreign_ruler = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_insulted_me + OPINION = 0 + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.65 + ai_compassion = -0.35 + ai_honor = -0.25 + } + } + } +} + + +########################### +## pam_theocratic_ruler_events.0003 - Counsel for a Hardened Border +############################ + + +scripted_trigger pam_theocratic_ruler_0003_alliance_target_trigger = { + this != root + highest_held_title_tier >= tier_county + government_has_flag = government_is_theocracy + faith = root.faith + NOR = { + is_allied_to = root + has_truce = root + is_at_war_with = root + } + in_diplomatic_range = root +} + +pam_theocratic_ruler_events.0003 = { + type = character_event + title = pam_theocratic_ruler_events.0003.t + desc = pam_theocratic_ruler_events.0003.desc + theme = christian + override_background = { reference = council_chamber } + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:advisor + animation = personality_honorable + } + lower_center_portrait = { + character = scope:alliance_target + } + + cooldown = { years = 8 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_landed = yes + is_available_adult = yes + exists = scope:advisor + any_ruler = { + pam_theocratic_ruler_0003_alliance_target_trigger = yes + } + OR = { + any_memory = { + OR = { + has_memory_type = battle_won_memory + has_memory_type = battle_lost_memory + } + } + any_sub_realm_county = { + title_province = { + OR = { + has_province_modifier = recently_looted_modifier + has_province_modifier = recently_bartered_modifier + } + } + } + } + } + + immediate = { + if = { + limit = { + exists = cp:councillor_marshal + } + cp:councillor_marshal = { save_scope_as = advisor } + } + else_if = { + limit = { + exists = cp:councillor_chancellor + } + cp:councillor_chancellor = { save_scope_as = advisor } + } + else_if = { + limit = { + exists = cp:councillor_steward + } + cp:councillor_steward = { save_scope_as = advisor } + } + + random_ruler = { + limit = { + pam_theocratic_ruler_0003_alliance_target_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 8 + is_independent_ruler = no + } + modifier = { + add = 4 + highest_held_title_tier = tier_county + } + modifier = { + add = 3 + highest_held_title_tier = tier_duchy + } + modifier = { + add = -20 + primary_title = { + is_head_of_faith = yes + } + } + modifier = { + add = -8 + highest_held_title_tier >= tier_kingdom + } + } + save_scope_as = alliance_target + } + + if = { + limit = { + any_sub_realm_county = { + title_province = { + OR = { + has_province_modifier = recently_looted_modifier + has_province_modifier = recently_bartered_modifier + } + } + } + } + random_sub_realm_county = { + limit = { + title_province = { + OR = { + has_province_modifier = recently_looted_modifier + has_province_modifier = recently_bartered_modifier + } + } + } + save_scope_as = raided_county + } + } + } + + # Send envoys. We must stand together. + option = { + name = pam_theocratic_ruler_events.0003.a + custom_tooltip = pam_theocratic_ruler_events.0003.a.tt + create_alliance = { + target = scope:alliance_target + allied_through_owner = root + allied_through_target = scope:alliance_target + } + add_prestige = minor_prestige_loss + ai_chance = { + base = 45 + ai_value_modifier = { + ai_rationality = 0.6 + ai_honor = 0.3 + } + } + } + + # Raise a retinue from faithful peasants for border defense. + option = { + name = pam_theocratic_ruler_events.0003.b + spawn_army = { + levies = 150 + location = root.capital_province + name = pam_theocratic_ruler_events.0003.b.army + inheritable = no + } + add_piety = minor_piety_loss + ai_chance = { + base = 30 + ai_value_modifier = { + ai_boldness = 0.35 + ai_zeal = 0.2 + } + } + } + + # Send aid and restore one recently raided county. + option = { + name = pam_theocratic_ruler_events.0003.c + trigger = { + exists = scope:raided_county + } + scope:raided_county.title_province = { + remove_province_modifier = recently_looted_modifier + remove_province_modifier = recently_bartered_modifier + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_compassion = 0.2 + ai_rationality = 0.2 + } + } + } + + # I place this in God's hands. + option = { + name = pam_theocratic_ruler_events.0003.d + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + zealous = miniscule_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 0.4 + } + } + } +} + +########################### +## pam_theocratic_ruler_events.0004 — Brethern as Neighbors +############################ + +pam_theocratic_ruler_events.0004 = { + type = character_event + title = pam_theocratic_ruler_events.0004.t + desc = pam_theocratic_ruler_events.0004.desc + theme = christian + + left_portrait = { + character = root + animation = chaplain + } + right_portrait = { + character = scope:monastic_order_head + animation = prayer_crossing + } + lower_center_portrait = { + character = scope:monastic_monk + } + + cooldown = { years = 8 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_available_adult = yes + any_sub_realm_county = { + any_county_province = { + barony = { + is_leased_out = yes + exists = lessee + lessee = { + government_has_flag = government_is_monastic_holy_order + is_alive = yes + } + } + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + barony = { + is_leased_out = yes + exists = lessee + lessee = { + government_has_flag = government_is_monastic_holy_order + is_alive = yes + } + } + } + } + save_scope_as = pam_monastic_lease_county + random_county_province = { + limit = { + barony = { + is_leased_out = yes + lessee ?= { + government_has_flag = government_is_monastic_holy_order + } + } + } + barony = { + lessee = { save_scope_as = monastic_order_head } + } + } + } + + if = { + limit = { + scope:pam_monastic_lease_county = { + any_neighboring_county = { + holder = { + top_liege = root.top_liege + } + } + } + } + scope:pam_monastic_lease_county = { + random_neighboring_county = { + limit = { + holder = { + top_liege = root.top_liege + } + } + save_scope_as = aided_neighbor_county + } + } + } + else_if = { + limit = { + capital_county = { + any_neighboring_county = { + holder = { + top_liege = root.top_liege + } + } + } + } + capital_county = { + random_neighboring_county = { + limit = { + holder = { + top_liege = root.top_liege + } + } + save_scope_as = aided_neighbor_county + } + } + } + + if = { + limit = { + scope:monastic_order_head = { + any_courtier_or_guest = { + is_alive = yes + is_imprisoned = no + faith = scope:monastic_order_head.faith + OR = { + has_trait = devoted + has_trait = celibate + } + } + } + } + scope:monastic_order_head = { + random_courtier_or_guest = { + limit = { + is_alive = yes + is_imprisoned = no + faith = scope:monastic_order_head.faith + OR = { + has_trait = devoted + has_trait = celibate + } + } + save_scope_as = monastic_monk + } + } + } + else_if = { + limit = { + scope:monastic_order_head = { + any_courtier_or_guest = { + is_alive = yes + is_imprisoned = no + } + } + } + scope:monastic_order_head = { + random_courtier_or_guest = { + limit = { + is_alive = yes + is_imprisoned = no + } + save_scope_as = monastic_monk + } + } + } + else = { + if = { + limit = { + scope:monastic_order_head.faith = { + faith_has_monasticism_trigger = yes + } + } + create_character = { + location = root.capital_province + template = monk_character_template + faith = scope:monastic_order_head.faith + rite = scope:monastic_order_head.rite + culture = scope:monastic_order_head.culture + gender_female_chance = root_faith_clergy_gender_female_chance + trait = devoted + save_scope_as = monastic_monk + } + set_variable = pam_theocratic_ruler_events_0004_created_character + } + else = { + create_character = { + location = root.capital_province + template = priest_character_template + faith = scope:monastic_order_head.faith + rite = scope:monastic_order_head.rite + culture = scope:monastic_order_head.culture + gender_female_chance = root_faith_clergy_gender_female_chance + save_scope_as = monastic_monk + } + set_variable = pam_theocratic_ruler_events_0004_created_character + } + } + } + + # Please, let your brethren bless my lands. + option = { + name = pam_theocratic_ruler_events.0004.a + trigger = { + exists = scope:aided_neighbor_county + short_term_gold >= miniscule_gold_value + } + scope:aided_neighbor_county = { + add_county_modifier = { + modifier = pam_monastic_order_improvement_modifier + years = 10 + } + } + pay_short_term_gold = { + target = scope:monastic_order_head + gold = minor_gold_value + } + ai_chance = { + base = 40 + modifier = { + short_term_gold >= medium_gold_value + factor = 0 + } + ai_value_modifier = { + ai_rationality = 0.45 + ai_greed = 0.25 + } + } + } + + # Your disciple would strengthen my court. + option = { + name = pam_theocratic_ruler_events.0004.b + if = { + limit = { + NOT = { + scope:monastic_monk = { + is_courtier_of = root + } + } + } + add_courtier = scope:monastic_monk + scope:monastic_monk = { + court_event_character_flag_effect = yes + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_tutor + CANDIDATE = scope:monastic_monk + } + ai_chance = { + base = 35 + ai_value_modifier = { + ai_rationality = 0.35 + ai_boldness = 0.15 + } + } + } + + # Let us share some prayers. + option = { + name = pam_theocratic_ruler_events.0004.c + add_learning_lifestyle_xp = 100 + add_piety = miniscule_piety_gain + stress_and_fulfillment_impact = { + zealous = miniscule_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + after = { + if = { + limit = { + has_variable = pam_theocratic_ruler_events_0004_created_character + is_ai = yes + } + remove_variable = pam_theocratic_ruler_events_0004_created_character + scope:monastic_monk = { silent_disappearance_effect = yes } + } + } +} + +########################### +## pam_theocratic_ruler_events.0005 — Swords for the Faith +############################ + +pam_theocratic_ruler_events.0005 = { + type = character_event + title = pam_theocratic_ruler_events.0005.t + desc = pam_theocratic_ruler_events.0005.desc + theme = christian + + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:military_order_head + animation = zealous_superior + } + lower_center_portrait = { + character = scope:order_knight + } + + cooldown = { years = 8 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_available_adult = yes + any_sub_realm_county = { + any_county_province = { + barony = { + is_leased_out = yes + exists = lessee + lessee = { + government_has_flag = government_is_military_holy_order + faith = root.faith + is_alive = yes + } + } + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + barony = { + is_leased_out = yes + exists = lessee + lessee = { + government_has_flag = government_is_military_holy_order + faith = root.faith + } + } + } + } + save_scope_as = pam_military_lease_county + random_county_province = { + limit = { + barony = { + is_leased_out = yes + exists = lessee + lessee ?= { + government_has_flag = government_is_military_holy_order + faith = root.faith + } + } + } + barony = { + lessee = { save_scope_as = military_order_head } + } + } + } + + if = { + limit = { + scope:pam_military_lease_county = { + any_neighboring_county = { + holder = { + top_liege = root.top_liege + } + } + } + } + scope:pam_military_lease_county = { + random_neighboring_county = { + limit = { + holder = { + top_liege = root.top_liege + } + } + save_scope_as = aided_military_county + } + } + } + else_if = { + limit = { + root.capital_county = { + any_neighboring_county = { + holder = { + top_liege = root.top_liege + } + } + } + } + root.capital_county = { + random_neighboring_county = { + limit = { + holder = { + top_liege = root.top_liege + } + } + save_scope_as = aided_military_county + } + } + } + + if = { + limit = { + scope:military_order_head = { + any_courtier_or_guest = { + is_alive = yes + is_imprisoned = no + faith = root.faith + prowess >= 8 + } + } + } + scope:military_order_head = { + random_courtier_or_guest = { + limit = { + is_alive = yes + is_imprisoned = no + faith = root.faith + prowess >= 8 + } + save_scope_as = order_knight + } + } + } + else = { + create_character = { + location = root.capital_province + template = culture_defender_knight_template + faith = scope:military_order_head.faith + rite = scope:military_order_head.rite + culture = scope:military_order_head.culture + save_scope_as = order_knight + } + set_variable = pam_theocratic_ruler_events_0005_created_character + } + } + + # Drill my fighters in your order's discipline. + option = { + name = pam_theocratic_ruler_events.0005.a + trigger = { + exists = scope:aided_military_county + } + scope:aided_military_county = { + add_county_modifier = { + modifier = pam_military_order_improvement_modifier + years = 5 + } + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_rationality = 0.35 + ai_boldness = 0.25 + } + } + } + + # Let your knight stand as my bodyguard. + option = { + name = pam_theocratic_ruler_events.0005.b + if = { + limit = { + NOT = { + scope:order_knight = { + is_courtier_of = root + } + } + } + add_courtier = scope:order_knight + scope:order_knight = { + court_event_character_flag_effect = yes + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = bodyguard + CANDIDATE = scope:order_knight + } + ai_chance = { + base = 35 + ai_value_modifier = { + ai_honor = 0.35 + ai_boldness = 0.3 + } + } + } + + # Let us speak of righteous war. + option = { + name = pam_theocratic_ruler_events.0005.c + add_martial_lifestyle_xp = minor_lifestyle_xp + add_prestige = minor_prestige_gain + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.35 + ai_honor = 0.2 + } + } + } + after = { + if = { + limit = { + has_variable = pam_theocratic_ruler_events_0005_created_character + is_ai = yes + } + remove_variable = pam_theocratic_ruler_events_0005_created_character + scope:order_knight = { silent_disappearance_effect = yes } + } + } +} + +########################### +## pam_theocratic_ruler_events.0006 — Tithes or Mercy +############################ + +pam_theocratic_ruler_events.0006 = { + type = character_event + title = pam_theocratic_ruler_events.0006.t + desc = pam_theocratic_ruler_events.0006.desc + theme = christian + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = temperate + has_trait = humble + } + } + animation = priest_good + } + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = callous + has_trait = arbitrary + has_trait = greedy + } + } + animation = priest_corrupt + } + animation = prayer_crossing + } + right_portrait = { + character = scope:local_peasant_leader + animation = crying + } + + cooldown = { years = 8 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_available_adult = yes + any_sub_realm_county = { + holder.top_liege = root.top_liege + } + } + + immediate = { + random_sub_realm_county = { + limit = { + holder.top_liege = root.top_liege + } + save_scope_as = troubled_county + } + create_character = { + location = scope:troubled_county.title_province + template = generic_peasant_character + faith = scope:troubled_county.faith + rite = scope:troubled_county.rite + culture = scope:troubled_county.culture + save_scope_as = local_peasant_leader + } + set_variable = pam_theocratic_ruler_events_0006_created_character + } + + # My steward failed me. The blame is his. (Moved this option up). + option = { + name = pam_theocratic_ruler_events.0006.c + skill = intrigue + trigger = { + intrigue >= high_skill_rating + exists = cp:councillor_steward + can_add_hook = { + target = cp:councillor_steward + type = obligation_hook + } + } + if = { + limit = { + can_add_hook = { + target = cp:councillor_steward + type = strong_obligation_hook + } + } + add_hook = { + target = cp:councillor_steward + type = strong_obligation_hook + } + } + else = { + add_hook = { + target = cp:councillor_steward + type = obligation_hook + } + } + cp:councillor_steward = { + add_opinion = { + modifier = blamed_me_unjustly + target = root + } + } + stress_and_fulfillment_impact = { + deceitful = minor_stress_impact_loss + honest = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_rationality = 0.35 + ai_vengefulness = 0.25 + } + } + } + + # No exceptions and seize the ringleader. + option = { + name = pam_theocratic_ruler_events.0006.a + add_treasury_or_gold = minor_treasury_or_gold_value + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:local_peasant_leader + IMPRISONER = root + } + scope:troubled_county = { + add_county_modifier = { + modifier = pam_tithes_or_mercy_harsh_tithes_modifier + years = 5 + } + } + stress_and_fulfillment_impact = { + wrathful = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 45 + ai_value_modifier = { + ai_greed = 0.4 + ai_zeal = 0.2 + } + } + } + + # Let this pass. Mercy can also serve God. + option = { + name = pam_theocratic_ruler_events.0006.b + add_piety = minor_piety_gain + scope:troubled_county = { + add_county_modifier = { + modifier = pam_tithes_or_mercy_show_mercy_modifier + years = 5 + } + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_compassion = 0.45 + ai_zeal = 0.15 + } + } + } + after = { + if = { + limit = { + has_variable = pam_theocratic_ruler_events_0006_created_character + is_ai = yes + } + remove_variable = pam_theocratic_ruler_events_0006_created_character + scope:local_peasant_leader = { silent_disappearance_effect = yes } + } + } +} + +########################### +## pam_theocratic_ruler_events.0007 — Blissful Harmony +############################ + +pam_theocratic_ruler_events.0007 = { + type = character_event + title = pam_theocratic_ruler_events.0007.t + desc = pam_theocratic_ruler_events.0007.desc + theme = christian + override_background = garden + override_effect_2d = { reference = legend_glow } + left_portrait = { + character = root + animation = acknowledging_crozier + camera = camera_event_very_right_close + } + lower_right_portrait = { + character = liege + } + + immediate = { + capital_county = { + save_scope_as = blissful_harmony_capital + } + } + + cooldown = { years = 20 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_landed = yes + primary_title = { + title_held_years >= 10 + } + is_available_healthy_adult = yes + is_at_war = no + is_in_debt = no + NOT = { + any_sub_realm_county = { + county_control <= 90 + } + } + exists = liege + liege = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + stress >= 50 + } + modifier = { + add = 0.25 + spiritual_fulfillment <= -25 + } + } + + # Ambitious: This peace is only a pause, there is still more to do. + option = { + name = pam_theocratic_ruler_events.0007.a + trigger = { + has_trait = ambitious + } + add_prestige = minor_prestige_gain + add_character_modifier = { + modifier = pam_blissful_harmony_restless_ambition_modifier + years = 5 + } + stress_and_fulfillment_impact = { + ambitious = medium_stress_impact_loss + content = medium_stress_impact_gain + lazy = major_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + has_trait = ambitious + factor = 2 + } + modifier = { + OR = { + has_trait = content + has_trait = lazy + has_trait = calm + } + factor = 0 + } + } + } + + # Spread the gospel of the good life. + option = { + name = pam_theocratic_ruler_events.0007.b + add_piety = medium_piety_gain + capital_county = { + add_county_modifier = { + modifier = pam_blissful_harmony_gospel_modifier + years = 5 + } + } + stress_and_fulfillment_impact = { + shy = minor_stress_impact_gain + cynical = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 35 + modifier = { + OR = { + has_trait = zealous + has_trait = gregarious + } + factor = 2 + } + modifier = { + OR = { + has_trait = shy + has_trait = cynical + has_trait = callous + } + factor = 0.5 + } + } + } + + # Let me just listen and be still. + option = { + name = pam_theocratic_ruler_events.0007.c + stress_and_fulfillment_impact = { + base = medium_stress_impact_loss + ambitious = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 55 + modifier = { + OR = { + has_trait = content + has_trait = calm + has_trait = temperate + } + factor = 2 + } + modifier = { + OR = { + has_trait = ambitious + has_trait = wrathful + } + factor = 0.5 + } + } + } +} + +########################### +## pam_theocratic_ruler_events.0008 — The Use of Stone +############################ + +pam_theocratic_ruler_events.0008 = { + type = character_event + title = pam_theocratic_ruler_events.0008.t + desc = pam_theocratic_ruler_events.0008.desc + theme = christian + override_background = pam_cathedral_construction + left_portrait = { + character = root + animation = admiration + camera = camera_body_left + } + + cooldown = { years = 15 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_landed = yes + is_available_adult = yes + domicile ?= { + NOT = { has_domicile_building = episcopal_palace_03 } + has_ongoing_domicile_construction = no + NOR = { + has_domicile_construction = episcopal_palace_01 + has_domicile_construction = episcopal_palace_02 + has_domicile_construction = episcopal_palace_03 + } + OR = { + has_domicile_building = episcopal_palace_01 + has_domicile_building = episcopal_palace_02 + free_external_domicile_building_slots >= 1 + } + } + OR = { + primary_title = { title_held_years <= 15 } + any_held_title = { + title_held_years <= 15 + tier >= tier_duchy + } + } + any_sub_realm_county = { + holder = root + title_held_years <= 15 + any_county_province = { + has_holding_type = castle_holding + has_building_or_higher = curtain_walls_01 + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + holder = root + title_held_years <= 15 + any_county_province = { + has_holding_type = castle_holding + has_building_or_higher = curtain_walls_01 + } + } + save_scope_as = inherited_stone_county + random_county_province = { + limit = { + has_holding_type = castle_holding + has_building_or_higher = curtain_walls_01 + } + weight = { + base = 1 + modifier = { + add = 5 + has_building_or_higher = curtain_walls_05 + } + modifier = { + add = 3 + has_building_or_higher = curtain_walls_03 + } + } + save_scope_as = stone_province + } + } + } + + # Architect: direct future stone toward the estate. + option = { + name = pam_theocratic_ruler_events.0008.a + trigger = { + has_trait = architect + } + add_character_modifier = { + modifier = pam_stone_for_god_estate_build_discount_modifier + years = 5 + } + ai_chance = { + base = 15 + modifier = { + has_trait = architect + factor = 2 + } + } + } + + # Repurpose walls for the Episcopal Palace. + option = { + name = pam_theocratic_ruler_events.0008.b + scope:stone_province = { + destroy_or_downgrade_building_effect = { BUILDING = curtain_walls } + } + domicile ?= { + switch = { + trigger = has_domicile_building + episcopal_palace_02 = { construct_domicile_building = episcopal_palace_03 } + episcopal_palace_01 = { construct_domicile_building = episcopal_palace_02 } + fallback = { + construct_domicile_building = episcopal_palace_01 + } + } + } + scope:inherited_stone_county = { + change_county_control = medium_county_control_loss + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + diligent = minor_stress_impact_loss + content = minor_stress_impact_gain + } + ai_chance = { # Setting to zero since we do not want the ai to remove their lieges work. + base = 0 + } + } + + # Ora et labora: Every building is an act of worship. + option = { + name = pam_theocratic_ruler_events.0008.c + flavor = pam_theocratic_ruler_events.0008.c.flavor + reason = has_tenet + trigger = { + OR = { + has_personal_tenet = tenet_ora_et_labora + rite = { rite_has_tenet = tenet_ora_et_labora } + } + } + add_piety = medium_piety_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + OR = { + has_trait = zealous + has_trait = diligent + } + factor = 2 + } + modifier = { + OR = { + has_trait = lazy + has_trait = cynical + } + factor = 0.25 + } + } + } + + # Leave the walls - Opt out + option = { + name = pam_theocratic_ruler_events.0008.d + trigger = { + NOR = { + has_personal_tenet = tenet_ora_et_labora + rite = { rite_has_tenet = tenet_ora_et_labora } + } + } + ai_chance = { + base = 20 + } + } +} + +########################### +## pam_theocratic_ruler_events.0009 - Trouble with the flock +############################ + +pam_theocratic_ruler_events.0009 = { + type = character_event + title = pam_theocratic_ruler_events.0009.t + desc = pam_theocratic_ruler_events.0009.desc + theme = christian + left_portrait = { + character = root + animation = acknowledging_crozier + camera = camera_event_center_pointing_right + } + + right_portrait = { + character = player_heir + animation = anger + camera = camera_event_right_pointing_right + } + + cooldown = { years = 15 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_landed = yes + is_available_adult = yes + exists = player_heir + player_heir = { + NOT = { has_trait = wounded } + has_personality_emotional_trigger = yes + } + } + + immediate = { + player_heir = { + save_scope_as = heir + } + } + + + # Counsel the heir in patience and doctrine. + option = { + name = pam_theocratic_ruler_events.0009.a + skill = learning + duel = { + skill = learning + value = medium_skill_rating + 60 = { + desc = pam_theocratic_ruler_events.0009.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_theocratic_ruler_events.0009.a.toast.success + left_icon = scope:heir + right_icon = root + primary_title = { + change_appointment_investment = { + target = scope:heir + value = 20 + } + } + scope:heir = { + add_opinion = { + modifier = mentored_me_opinion + target = root + } + } + add_learning_lifestyle_xp = minor_lifestyle_xp + } + } + 40 = { + desc = pam_theocratic_ruler_events.0009.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pam_theocratic_ruler_events.0009.a.toast.failure + left_icon = scope:heir + right_icon = root + add_stress = minor_stress_gain + scope:heir = { + add_stress = minor_stress_gain + } + } + } + } + ai_chance = { + base = 50 + compare_modifier = { + value = learning + multiplier = 1 + } + } + } + option = { + name = pam_theocratic_ruler_events.0009.b + flavor = pam_theocratic_ruler_events.0009.b.flavor + primary_title = { + change_appointment_investment = { + target = scope:heir + value = -50 + } + } + scope:heir = { + add_opinion = { + modifier = upset_opinion + target = root + opinion = low_negative_opinion + } + } + ai_chance = { + base = 50 + modifier = { + has_trait = callous + factor = 2 + } + modifier = { + has_trait = compassionate + factor = 0.5 + } + } + } + # Say your prayers. Discipline your flesh. + option = { + name = pam_theocratic_ruler_events.0009.c + add_piety = minor_piety_gain + if = { + limit = { has_trait = flagellant } + add_stress = minor_stress_loss + } + scope:heir = { + if = { + limit = { has_trait = flagellant } + increase_wounds_effect = { REASON = whipping } + add_stress = minor_stress_loss + } + else = { + increase_wounds_effect = { REASON = whipping } + if = { + limit = { can_be_flagellant = yes } + random = { + chance = 35 + add_trait = flagellant + } + } + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 35 + modifier = { + has_trait = flagellant + factor = 2 + } + modifier = { + has_trait = zealous + factor = 1.5 + } + modifier = { + has_trait = compassionate + factor = 0.25 + } + } + } +} + +########################### +## pam_theocratic_ruler_events.0010 — Sword or the Crozier +############################ + +pam_theocratic_ruler_events.0010 = { + type = character_event + title = pam_theocratic_ruler_events.0010.t + desc = pam_theocratic_ruler_events.0010.desc + theme = christian + override_background = throne_room + left_portrait = { + character = root + animation = divine_gesture_2 + camera = camera_event_center_moved_left + } + lower_center_portrait = { + character = cp:councillor_marshal + animation = celebrate_sword + } + lower_right_portrait = { + character = cp:councillor_court_chaplain + animation = acknowledging + } + + cooldown = { years = 15 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_landed = yes + is_available_adult = yes + has_trait = pilgrim + any_memory = { + memory_type = completed_pilgrimage + } + any_memory = { + OR = { + has_memory_type = battle_won_memory + has_memory_type = battle_lost_memory + } + } + cp:councillor_marshal ?= { + is_available_adult = yes + } + cp:councillor_court_chaplain ?= { + is_available_adult = yes + } + } + + immediate = { + if = { + limit = { + any_memory = { + memory_type = completed_pilgrimage + var:first_pilgrimage = flag:completed_pilgrimage + } + } + random_memory = { + memory_type = completed_pilgrimage + limit = { + var:first_pilgrimage = flag:completed_pilgrimage + } + save_scope_as = pilgrimage_memory + } + } + else = { + random_memory = { + memory_type = completed_pilgrimage + save_scope_as = pilgrimage_memory + } + } + random_memory = { + limit = { + OR = { + has_memory_type = battle_won_memory + has_memory_type = battle_lost_memory + } + } + save_scope_as = battle_memory + } + } + + # The sword + option = { + name = pam_theocratic_ruler_events.0010.a + skill = martial + add_martial_skill = 1 + add_martial_lifestyle_xp = medium_lifestyle_xp + cp:councillor_marshal= { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = low_positive_opinion + } + } + ai_chance = { + base = 35 + compare_modifier = { + value = martial + multiplier = 1 + } + ai_value_modifier = { + ai_boldness = 0.35 + ai_energy = 0.2 + } + } + } + + # The crozier + option = { + name = pam_theocratic_ruler_events.0010.b + skill = learning + add_learning_skill = 1 + add_learning_lifestyle_xp = medium_lifestyle_xp + cp:councillor_court_chaplain = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = low_positive_opinion + } + } + ai_chance = { + base = 35 + compare_modifier = { + value = learning + multiplier = 1 + } + ai_value_modifier = { + ai_rationality = 0.35 + ai_zeal = 0.2 + } + } + } + + # Both sword and crozier + option = { + name = pam_theocratic_ruler_events.0010.c + add_piety = medium_piety_gain + cp:councillor_marshal = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = low_positive_opinion + } + } + cp:councillor_court_chaplain = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = low_positive_opinion + } + } + ai_chance = { + base = 30 + ai_value_modifier = { + ai_zeal = 0.5 + ai_honor = 0.25 + } + } + } +} + +########################### +## pam_theocratic_ruler_events.0011 — Rest for the Fallen +############################ + +pam_theocratic_ruler_events.0011 = { + type = character_event + title = pam_theocratic_ruler_events.0011.t + desc = pam_theocratic_ruler_events.0011.desc + theme = christian + override_background = { reference = temple } + + left_portrait = { + character = root + animation = prayer + } + right_portrait = { + character = scope:landed_subject + animation = grief + } + artifact = { + target = scope:crusader_sword + position = lower_center_portrait + } + + cooldown = { years = 8 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_available_adult = yes + OR = { + has_religion = religion:catholic_religion + has_religion = religion:protestant_religion + has_religion = religion:eastern_orthodox_religion + has_religion = religion:oriental_orthodox_religion + } + NOT = { + any_character_artifact = { + artifact_type = sword + } + } + any_vassal_or_below = { + this != root + is_available = yes + is_landed = yes + faith = root.faith + } + } + + immediate = { + random_vassal_or_below = { + limit = { + this != root + is_available = yes + is_landed = yes + faith = root.faith + } + save_scope_as = landed_subject + } + hidden_effect = { + create_artifact = { + name = pam_fallen_knight_crusader_sword_name + description = pam_fallen_knight_crusader_sword_desc + type = sword + visuals = sword + modifier = artifact_prowess_2_modifier + save_scope_as = crusader_sword + } + scope:crusader_sword = { + set_artifact_rarity_common = yes + set_max_durability = 40 + } + } + } + + # Grant church burial with the crusader sword. + option = { + name = pam_theocratic_ruler_events.0011.a + flavor = pam_theocratic_ruler_events.0011.a.flavor + scope:landed_subject = { + pay_treasury_or_gold = { + target = root + value = minor_treasury_or_gold_value + } + } + if = { + limit = { + can_add_hook = { + target = scope:landed_subject + type = strong_favor_hook + } + } + add_hook = { + target = scope:landed_subject + type = strong_favor_hook + } + } + add_piety = minor_piety_loss + destroy_artifact = scope:crusader_sword + scope:landed_subject = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + zealous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 45 + ai_value_modifier = { + ai_compassion = 0.35 + ai_zeal = 0.25 + ai_honor = 0.2 + } + } + } + + # Keep the sword while still granting burial. + option = { + name = pam_theocratic_ruler_events.0011.b + flavor = pam_theocratic_ruler_events.0011.b.flavor + scope:crusader_sword = { set_owner = root } + scope:landed_subject = { + add_opinion = { + modifier = upset_opinion + target = root + opinion = -20 + } + } + stress_and_fulfillment_impact = { + deceitful = minor_stress_impact_loss + greedy = minor_stress_impact_loss + honest = minor_stress_impact_gain + } + ai_chance = { + base = 30 + ai_value_modifier = { + ai_greed = 0.4 + ai_rationality = 0.2 + } + } + } + + # Bury the knight beneath the open sky. + option = { + name = pam_theocratic_ruler_events.0011.c + flavor = pam_theocratic_ruler_events.0011.c.flavor + add_piety = medium_piety_gain + destroy_artifact = scope:crusader_sword + scope:landed_subject = { + add_opinion = { + modifier = upset_opinion + target = root + opinion = -10 + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.45 + ai_boldness = 0.2 + } + } + } +} + +########################### +## pam_theocratic_ruler_events.0012 — A Once Sacred Grove (travel) +############################ + +pam_theocratic_ruler_events.0012 = { + type = character_event + title = pam_theocratic_ruler_events.0012.t + desc = pam_theocratic_ruler_events.0012.desc + theme = travel + override_background = { reference = wilderness_forest } + + left_portrait = { + character = root + animation = holding_staff + camera = camera_event_center_pointing_forward + } + right_portrait = { + character = scope:grove_subject + animation = preaching_no_book + } + + cooldown = { years = 8 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_available_travelling_adult = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + is_liege_or_above_of = location.county.holder + location = { + terrain = forest + province_has_no_holding_trigger = yes + } + } + + immediate = { + location = { save_scope_as = grove_province } + location.county = { save_scope_as = grove_county } + create_character = { + location = scope:grove_province + template = generic_peasant_character + faith = scope:grove_county.faith + rite = scope:grove_county.rite + culture = scope:grove_county.culture + save_scope_as = grove_subject + } + set_variable = pam_theocratic_ruler_events_0012_created_character + } + + # Embrace nature: adopt Sanctity of Nature and fund a forest temple. + option = { + name = pam_theocratic_ruler_events.0012.a + reason = has_tenet + trigger = { + free_personal_tenet_slots > 0 + NOT = { has_personal_tenet = tenet:tenet_sanctity_of_nature } + any_character_tenet = { + this = tenet:tenet_sanctity_of_nature + knowledge_filter = known + } + short_term_treasury_or_gold >= pam_sacred_grove_temple_cost_value + } + show_as_unavailable = { + always = yes + } + set_personal_tenet = tenet:tenet_sanctity_of_nature + remove_treasury_or_gold = pam_sacred_grove_temple_cost_value + scope:grove_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = pam_sacred_grove_temple_cost_value } + } + } + add_piety = minor_piety_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + humble = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_zeal = 0.45 + ai_compassion = 0.25 + ai_greed = -0.35 + } + } + } + + # Trick the subject into revealing the groves, then harvest the timber. + option = { + name = pam_theocratic_ruler_events.0012.b + skill = intrigue + duel = { + skill = intrigue + target = scope:grove_subject + 50 = { + desc = pam_theocratic_ruler_events.0012.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_theocratic_ruler_events.0012.b.toast.success + left_icon = root + right_icon = scope:grove_subject + add_short_term_gold = medium_gold_value + scope:grove_county = { + change_county_control = minor_county_control_loss + } + } + } + 50 = { + desc = pam_theocratic_ruler_events.0012.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pam_theocratic_ruler_events.0012.b.toast.failure + left_icon = root + right_icon = scope:grove_subject + scope:grove_county = { + change_county_control = miniscule_county_control_loss + } + } + } + } + stress_and_fulfillment_impact = { + deceitful = minor_stress_impact_loss + greedy = minor_stress_impact_loss + honest = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 30 + compare_modifier = { + value = intrigue + multiplier = 1 + } + ai_value_modifier = { + ai_greed = 0.4 + ai_rationality = 0.2 + } + } + } + + # Condemn the wilderness as diabolical. + option = { + name = pam_theocratic_ruler_events.0012.c + add_piety = medium_piety_gain + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 30 + ai_value_modifier = { + ai_zeal = 0.45 + ai_boldness = 0.2 + } + } + } + + after = { + if = { + limit = { + has_variable = pam_theocratic_ruler_events_0012_created_character + is_ai = yes + } + remove_variable = pam_theocratic_ruler_events_0012_created_character + scope:grove_subject = { silent_disappearance_effect = yes } + } + } +} + +########################### +## pam_theocratic_ruler_events.0013 — An Angelic Anthem +############################ + +pam_theocratic_ruler_events.0013 = { + type = character_event + title = pam_theocratic_ruler_events.0013.t + desc = pam_theocratic_ruler_events.0013.desc + theme = christian + override_background = { reference = temple } + + left_portrait = { + character = root + animation = prayer_standing_eyes + camera = camera_event_center_pointing_forward + } + right_portrait = { + character = scope:angelic_singer + animation = divine_ecstasy + } + + cooldown = { years = 8 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_available_adult = yes + } + + immediate = { + create_character = { + location = root.capital_province + template = beautiful_peasant_character + gender_female_chance = 100 + faith = root.faith + rite = root.rite + culture = root.culture + dynasty = none + save_scope_as = angelic_singer + } + set_variable = pam_theocratic_ruler_events_0013_created_character + } + + # Convince the singer to take vows and join the choir permanently. + option = { + name = pam_theocratic_ruler_events.0013.a + skill = learning + duel = { + skills = { learning diplomacy } + target = scope:angelic_singer + 50 = { + desc = pam_theocratic_ruler_events.0013.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_theocratic_ruler_events.0013.a.toast.success + left_icon = scope:angelic_singer + right_icon = root + add_courtier = scope:angelic_singer + scope:angelic_singer = { + add_trait = devoted + } + add_piety = medium_piety_gain + } + remove_variable = pam_theocratic_ruler_events_0013_created_character + } + 50 = { + desc = pam_theocratic_ruler_events.0013.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_neutral + title = pam_theocratic_ruler_events.0013.a.toast.failure + left_icon = scope:angelic_singer + right_icon = root + } + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + diligent = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 45 + compare_modifier = { + value = learning + multiplier = 0.5 + } + compare_modifier = { + value = diplomacy + multiplier = 0.5 + } + ai_value_modifier = { + ai_zeal = 0.4 + ai_rationality = 0.2 + } + } + } + + # Keep her at court and begin a seduction. + option = { + name = pam_theocratic_ruler_events.0013.b + trigger = { + has_trait = lustful + sex_opposite_of = scope:angelic_singer + NOR = { + has_trait = celibate + has_sexuality = asexual + } + can_start_scheme = { + type = seduce + target_character = scope:angelic_singer + } + } + show_as_unavailable = { + always = yes + } + add_visiting_courtier = scope:angelic_singer + hidden_effect = { + root = { save_scope_as = host } + scope:angelic_singer = { + save_scope_as = guest + trigger_event = courtier_guest_management.1001 + } + } + start_scheme = { + type = seduce + target_character = scope:angelic_singer + } + remove_variable = pam_theocratic_ruler_events_0013_created_character + stress_and_fulfillment_impact = { + lustful = minor_stress_impact_loss + chaste = medium_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 30 + ai_value_modifier = { + ai_boldness = 0.35 + ai_rationality = -0.2 + } + modifier = { + factor = 0 + NOT = { has_trait = lustful } + } + } + } + + # Singing should be left to the cantors. + option = { + name = pam_theocratic_ruler_events.0013.c + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + lustful = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.35 + ai_honor = 0.2 + } + } + } + + after = { + if = { + limit = { + has_variable = pam_theocratic_ruler_events_0013_created_character + is_ai = yes + } + remove_variable = pam_theocratic_ruler_events_0013_created_character + scope:angelic_singer = { + if = { + limit = { + NOR = { + is_courtier_of = root + is_foreign_court_guest_of = root + } + } + silent_disappearance_effect = yes + } + } + } + } +} + +########################### +## pam_theocratic_ruler_events.0014 — A Convert's Plea +############################ + +scripted_trigger pam_theocratic_ruler_0014_neighbour_county_trigger = { + culture != root.culture + faith != root.faith +} + +scripted_effect pam_theocratic_ruler_events_0014_grant_mass_conversion_discount_effect = { + set_variable = pam_theocratic_ruler_events_0014_mass_conversion_discount +} + +pam_theocratic_ruler_events.0014 = { + type = character_event + title = pam_theocratic_ruler_events.0014.t + desc = pam_theocratic_ruler_events.0014.desc + theme = christian + override_background = { reference = temple } + + left_portrait = { + character = root + animation = prayer_crossing + } + right_portrait = { + character = scope:convert_peasant + animation = personality_compassionate + } + + cooldown = { years = 8 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_available_adult = yes + free_personal_tenet_slots > 0 + OR = { + any_sub_realm_county = { + any_neighboring_county = { + pam_theocratic_ruler_0014_neighbour_county_trigger = yes + } + } + any_held_title = { + title_tier = county + is_landless_type_title = no + any_neighboring_county = { + pam_theocratic_ruler_0014_neighbour_county_trigger = yes + } + } + } + } + + immediate = { + if = { + limit = { + any_sub_realm_county = { + any_neighboring_county = { + pam_theocratic_ruler_0014_neighbour_county_trigger = yes + } + } + } + random_sub_realm_county = { + limit = { + any_neighboring_county = { + pam_theocratic_ruler_0014_neighbour_county_trigger = yes + } + } + random_neighboring_county = { + limit = { + pam_theocratic_ruler_0014_neighbour_county_trigger = yes + } + save_scope_as = neighbour_county + } + } + } + else = { + random_held_title = { + limit = { + tier = county + any_neighboring_county = { + pam_theocratic_ruler_0014_neighbour_county_trigger = yes + } + } + random_neighboring_county = { + limit = { + pam_theocratic_ruler_0014_neighbour_county_trigger = yes + } + save_scope_as = neighbour_county + } + } + } + scope:neighbour_county.faith = { + save_scope_as = neighbour_faith + main_rite = { + random_rite_tenet = { + status = core + limit = { + NOT = { root = { has_personal_tenet = this } } + NOT = { + root = { + rite = { + has_tenet_status = { + tenet = this + status = core + } + } + } + } + } + save_scope_as = offered_tenet_a + } + if = { + limit = { + exists = scope:offered_tenet_a + } + random_rite_tenet = { + status = core + limit = { + this != scope:offered_tenet_a + NOT = { root = { has_personal_tenet = this } } + NOT = { + root = { + rite = { + has_tenet_status = { + tenet = this + status = core + } + } + } + } + } + save_scope_as = offered_tenet_b + } + } + } + } + create_character = { + location = root.capital_province + template = generic_peasant_character + faith = root.faith + rite = root.rite + culture = scope:neighbour_county.culture + dynasty = none + save_scope_as = convert_peasant + } + set_variable = pam_theocratic_ruler_events_0014_created_character + } + + # Remove this filth from my sight. + option = { + name = pam_theocratic_ruler_events.0014.a + trigger = { + has_trait = arrogant + } + show_as_unavailable = { + always = yes + } + add_dread = minor_dread_gain + root.culture = { + change_cultural_acceptance = { + target = scope:neighbour_county.culture + value = minor_cultural_acceptance_loss + desc = pam_theocratic_ruler_events.0014.a.acceptance + } + } + scope:convert_peasant = { + silent_disappearance_effect = yes + } + every_vassal_or_below = { + limit = { + has_vassal_stance = zealot + } + custom = every_zealot_vassal + add_opinion = { + modifier = zealot_approves_of_religious_display_opinion + target = root + } + } + remove_variable = pam_theocratic_ruler_events_0014_created_character + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 30 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 0.2 + } + modifier = { + factor = 0 + NOT = { has_trait = arrogant } + } + } + } + + # Adopt the first neighbouring core tenet as a personal tenet. + option = { + name = pam_theocratic_ruler_events.0014.b + trigger = { + exists = scope:offered_tenet_a + free_personal_tenet_slots > 0 + } + show_as_unavailable = { + always = yes + } + add_known_tenet = scope:offered_tenet_a + set_personal_tenet = scope:offered_tenet_a + pam_theocratic_ruler_events_0014_grant_mass_conversion_discount_effect = yes + custom_tooltip = pam_theocratic_ruler_events.0014.b.tt + remove_variable = pam_theocratic_ruler_events_0014_created_character + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = -0.15 + ai_rationality = 0.35 + ai_compassion = 0.25 + } + } + } + + # Adopt the second neighbouring core tenet as a personal tenet. + option = { + name = pam_theocratic_ruler_events.0014.c + trigger = { + exists = scope:offered_tenet_b + free_personal_tenet_slots > 0 + } + show_as_unavailable = { + always = yes + } + add_known_tenet = scope:offered_tenet_b + set_personal_tenet = scope:offered_tenet_b + pam_theocratic_ruler_events_0014_grant_mass_conversion_discount_effect = yes + custom_tooltip = pam_theocratic_ruler_events.0014.c.tt + remove_variable = pam_theocratic_ruler_events_0014_created_character + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = -0.15 + ai_rationality = 0.35 + ai_compassion = 0.25 + } + } + } + + # Does the sheep guide the shepherd? + option = { + name = pam_theocratic_ruler_events.0014.d + add_piety = medium_piety_gain + every_vassal_or_below = { + limit = { + has_vassal_stance = zealot + } + custom = every_zealot_vassal + add_opinion = { + modifier = zealot_approves_of_religious_display_opinion + target = root + } + } + stress_and_fulfillment_impact = { + zealous = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.4 + ai_honor = 0.25 + } + } + } + + after = { + if = { + limit = { + has_variable = pam_theocratic_ruler_events_0014_created_character + is_ai = yes + } + remove_variable = pam_theocratic_ruler_events_0014_created_character + scope:convert_peasant = { + if = { + limit = { + is_alive = yes + } + silent_disappearance_effect = yes + } + } + } + } +} + +########################### +## pam_theocratic_ruler_events.0015 — Prayer Hearing +############################ + +scripted_effect pam_theocratic_ruler_events_0015_highest_clerical_skill_point_effect = { + if = { + limit = { + stewardship >= learning + stewardship >= intrigue + } + add_stewardship_skill = 1 + } + else_if = { + limit = { + learning >= intrigue + } + add_learning_skill = 1 + } + else = { + add_intrigue_skill = 1 + } +} + +pam_theocratic_ruler_events.0015 = { + type = character_event + title = pam_theocratic_ruler_events.0015.t + desc = pam_theocratic_ruler_events.0015.desc + theme = christian + window = big_event_window + override_background = { reference = temple } + + left_portrait = { + character = root + animation = divine_gesture_3 + camera = camera_event_center_close_to_right + } + center_portrait = { + character = scope:succession_heir_first + animation = prayer_standing_eyes + camera = camera_event_center_pointing_forward_fov35 + } + right_portrait = { + character = scope:succession_heir_second + animation = prayer_standing + camera = camera_event_center_moved_left + } + + cooldown = { years = 8 } + + trigger = { + pam_government_is_religious_playable_trigger = yes + is_landed = yes + is_available_adult = yes + primary_title = { + any_title_heir = { + save_temporary_scope_as = heir_temp + prev = { + place_in_line_of_succession = { + target = scope:heir_temp + value = 2 + } + } + } + } + } + + immediate = { + primary_title = { + save_scope_as = appointment_title + every_title_heir = { + limit = { + save_temporary_scope_as = heir_temp + scope:appointment_title = { + place_in_line_of_succession = { + target = scope:heir_temp + value = 1 + } + } + } + save_scope_as = succession_heir_first + } + every_title_heir = { + limit = { + save_temporary_scope_as = heir_temp + scope:appointment_title = { + place_in_line_of_succession = { + target = scope:heir_temp + value = 2 + } + } + } + save_scope_as = succession_heir_second + } + } + } + + # Tutor the first successor in scripture. + option = { + name = pam_theocratic_ruler_events.0015.a + scope:succession_heir_first = { + pam_theocratic_ruler_events_0015_highest_clerical_skill_point_effect = yes + } + primary_title = { + change_appointment_investment = { + target = scope:succession_heir_first + value = clerical_appointment_score_medium_value + } + } + stress_and_fulfillment_impact = { + diligent = minor_stress_impact_loss + patient = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_rationality = 0.25 + ai_compassion = 0.2 + } + } + } + + # Guide the second successor through the holy texts. + option = { + name = pam_theocratic_ruler_events.0015.b + scope:succession_heir_second = { + pam_theocratic_ruler_events_0015_highest_clerical_skill_point_effect = yes + } + primary_title = { + change_appointment_investment = { + target = scope:succession_heir_second + value = clerical_appointment_score_medium_value + } + } + stress_and_fulfillment_impact = { + diligent = minor_stress_impact_loss + patient = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_rationality = 0.25 + ai_compassion = 0.2 + } + } + } + + # Demonstrate superior mastery of doctrine. + option = { + name = pam_theocratic_ruler_events.0015.c + skill = learning + duel = { + skill = learning + value = medium_skill_rating + 60 = { + desc = pam_theocratic_ruler_events.0015.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_effect_good + title = pam_theocratic_ruler_events.0015.c.toast.success + left_icon = root + add_piety = medium_piety_gain + add_learning_lifestyle_xp = minor_lifestyle_xp + } + } + 40 = { + desc = pam_theocratic_ruler_events.0015.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pam_theocratic_ruler_events.0015.c.toast.failure + left_icon = root + add_stress = minor_stress_gain + } + } + } + stress_and_fulfillment_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + base = 20 + compare_modifier = { + value = learning + multiplier = 1 + } + ai_value_modifier = { + ai_boldness = 0.2 + } + } + } +} diff --git a/events/story_cycles/ep3_story_cycle_el_cid.txt b/events/story_cycles/ep3_story_cycle_el_cid.txt new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/events/story_cycles/ep3_story_cycle_el_cid.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/events/story_cycles/fp2_story_cycle_bell_of_huesca.txt b/events/story_cycles/fp2_story_cycle_bell_of_huesca.txt new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/events/story_cycles/fp2_story_cycle_bell_of_huesca.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/events/story_cycles/pam_story_cycle_slavic_rite_events.txt b/events/story_cycles/pam_story_cycle_slavic_rite_events.txt new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/events/story_cycles/pam_story_cycle_slavic_rite_events.txt @@ -0,0 +1 @@ + \ No newline at end of file