diff --git a/common/coat_of_arms/coat_of_arms/01_holy_order_coas.txt b/common/coat_of_arms/coat_of_arms/01_holy_order_coas.txt index 2a65e781b..5e2673981 100644 --- a/common/coat_of_arms/coat_of_arms/01_holy_order_coas.txt +++ b/common/coat_of_arms/coat_of_arms/01_holy_order_coas.txt @@ -188,6 +188,62 @@ ho_contemplative_hospitaller_lazareans = { texture = "ce_ordinary_cross_5.dds" } } +d_knights_hospitaller = { + pattern = "pattern_solid.dds" + color1 = "red" + colored_emblem = { + texture = "ce_cross_05_maltese.dds" + color1 = "white" + color2 = "white" + } +} + +d_teutonic_order = { + pattern = "pattern_solid.dds" + color1 = "white" + colored_emblem = { + texture = "ce_ordinary_cross_5.dds" + color1 = "black" + color2 = "black" + } +} +d_knights_of_st_lazarus = { + pattern = "pattern_solid.dds" + color1 = white + colored_emblem = { + color1 = green + color2 = green + texture = "ce_ordinary_cross_5.dds" + } +} +d_contemplative_hospitaller_johannics = { + pattern = "pattern_solid.dds" + color1 = "red" + colored_emblem = { + texture = "ce_cross_05_maltese.dds" + color1 = "white" + color2 = "white" + } +} + +d_contemplative_teutonic_order = { + pattern = "pattern_solid.dds" + color1 = "white" + colored_emblem = { + texture = "ce_ordinary_cross_5.dds" + color1 = "black" + color2 = "black" + } +} +d_contemplative_hospitaller_lazareans = { + pattern = "pattern_solid.dds" + color1 = white + colored_emblem = { + color1 = green + color2 = green + texture = "ce_ordinary_cross_5.dds" + } +} ho_order_of_christ={ pattern="pattern_solid.dds" color1=white diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index 712d6e88f..cdb66c757 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -732,10 +732,10 @@ holy_order_government = { # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). flags = { government_uses_crown_authority - cannot_be_vassal_or_liege - gov_uses_non_crown_coa + #cannot_be_vassal_or_liege government_is_holy_order government_is_military_holy_order + gov_uses_non_crown_coa } mechanic_type = holy_order @@ -776,7 +776,7 @@ monastic_holy_order_government = { # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). flags = { government_uses_crown_authority - cannot_be_vassal_or_liege + #cannot_be_vassal_or_liege government_is_holy_order government_is_monastic_holy_order gov_uses_non_crown_coa diff --git a/common/holy_orders/00_christian_holy_orders.txt b/common/holy_orders/00_christian_holy_orders.txt index 0d336d65e..cf49e25eb 100644 --- a/common/holy_orders/00_christian_holy_orders.txt +++ b/common/holy_orders/00_christian_holy_orders.txt @@ -16,10 +16,17 @@ ho_christian_knights_hospitaller = { trigger = { trigger_if = { limit = { - scope:founder = { has_variable = militantholyorder02_game_start_founder } - current_year >= 2555 + scope:founder = { has_variable = military_order_game_start_founder_2 } + } + always = no + } + trigger_else = { + scope:founder = { + faith = faith:roman_catholic_faith + culture = { + has_cultural_pillar = heritage_italian + } } - scope:province.county ?= title:c_roma } } @@ -28,7 +35,7 @@ ho_christian_knights_hospitaller = { #Should be founded in Italy if = { limit = { - scope:province.county ?= title:c_roma + scope:province.county ?= title:c_spoleto } add = 10 } @@ -38,13 +45,13 @@ ho_christian_knights_hospitaller = { years_from_game_start < 1 current_year >= 2555 - scope:province.county ?= title:c_roma + scope:province.county ?= title:c_spoleto } add = 10000 } } - men_at_arms = { order_knights } + men_at_arms = { order_knights order_serjeants } effect = { scope:leader = { @@ -54,6 +61,7 @@ ho_christian_knights_hospitaller = { value = { 25 50 } } } + scope:new_holy_order = { set_order_tenet = tenet:tenet_celestial_hierarchy } } } @@ -69,10 +77,17 @@ ho_christian_teutonic_order = { trigger = { trigger_if = { limit = { - scope:founder = { has_variable = militantholyorder01_game_start_founder } - current_year >= 2555 + scope:founder = { has_variable = military_order_game_start_founder_1 } + } + always = no + } + trigger_else = { + scope:founder = { + faith = faith:roman_catholic_faith + culture = { + has_cultural_pillar = heritage_central_germanic + } } - scope:province.county ?= title:c_vienna } } @@ -110,6 +125,7 @@ ho_christian_teutonic_order = { add_realm_law = cultural_holy_order_succession_law } } + scope:new_holy_order = { set_order_tenet = tenet:tenet_peace_of_god } } } @@ -126,19 +142,25 @@ ho_knights_of_st_lazarus = { trigger = { trigger_if = { limit = { - scope:founder = { has_variable = militantholyorder03_game_start_founder } - current_year >= 2555 + scope:founder = { has_variable = military_order_game_start_founder_3 } + } + always = no + } + trigger_else = { + scope:founder = { + faith = faith:roman_catholic_faith + culture = { + has_cultural_pillar = heritage_goidelic + } } - scope:province.county ?= title:c_vienna } } weight = { value = 10 - #Should be founded in Italy if = { limit = { - scope:province.county ?= title:c_dublin + scope:province.county ?= title:c_kildare } add = 5 } @@ -148,7 +170,7 @@ ho_knights_of_st_lazarus = { years_from_game_start < 1 current_year >= 2555 - scope:province.county ?= title:c_dublin + scope:province.county ?= title:c_kildare } add = 10000 } @@ -163,11 +185,8 @@ ho_knights_of_st_lazarus = { trait = lifestyle_physician value = { 25 50 } } - random = { - chance = 10 - add_trait = leper - } } + scope:new_holy_order = { set_order_tenet = tenet:tenet_dulia } } } @@ -189,10 +208,11 @@ ho_contemplative_hospitaller_johannics = { trigger = { trigger_if = { limit = { - scope:founder = { has_variable = monastic_game_start_founder } - current_year >= 2555 + scope:founder = { has_variable = monastic_game_start_founder_2 } } - scope:province.county ?= title:c_roma + scope:province.county ?= title:c_capua + } + trigger_else = { } } @@ -201,7 +221,7 @@ ho_contemplative_hospitaller_johannics = { #Should be founded in Italy if = { limit = { - scope:province.county ?= title:c_roma + scope:province.county ?= title:c_capua } add = 10 } @@ -211,7 +231,7 @@ ho_contemplative_hospitaller_johannics = { years_from_game_start < 1 current_year >= 2555 - scope:province.county ?= title:c_roma + scope:province.county ?= title:c_capua } add = 10000 } @@ -226,6 +246,7 @@ ho_contemplative_hospitaller_johannics = { value = { 25 50 } } } + scope:new_holy_order = { set_order_tenet = tenet:tenet_celestial_hierarchy } } } @@ -240,10 +261,11 @@ ho_contemplative_teutonic_order = { trigger = { trigger_if = { limit = { - scope:founder = { has_variable = monastic_game_start_founder } - current_year >= 2555 + scope:founder = { has_variable = monastic_game_start_founder_1 } } - scope:province.county ?= title:c_roma + scope:province.county ?= title:c_wiener_neustadt + } + trigger_else = { } } @@ -252,7 +274,7 @@ ho_contemplative_teutonic_order = { #Should be founded in Italy if = { limit = { - scope:province.county ?= title:c_roma + scope:province.county ?= title:c_wiener_neustadt } add = 10 } @@ -262,7 +284,7 @@ ho_contemplative_teutonic_order = { years_from_game_start < 1 current_year >= 2555 - scope:province.county ?= title:c_roma + scope:province.county ?= title:c_wiener_neustadt } add = 10000 } @@ -277,6 +299,7 @@ ho_contemplative_teutonic_order = { value = { 25 50 } } } + scope:new_holy_order = { set_order_tenet = tenet:tenet_peace_of_god } } } @@ -291,10 +314,11 @@ ho_contemplative_hospitaller_lazareans = { trigger = { trigger_if = { limit = { - scope:founder = { has_variable = monastic_game_start_founder } - current_year >= 2555 + scope:founder = { has_variable = monastic_game_start_founder_3 } } - scope:province.county ?= title:c_dublin + scope:province.county ?= title:c_offaly + } + trigger_else = { } } @@ -303,7 +327,7 @@ ho_contemplative_hospitaller_lazareans = { #Should be founded in Italy if = { limit = { - scope:province.county ?= title:c_dublin + scope:province.county ?= title:c_offaly } add = 10 } @@ -313,7 +337,7 @@ ho_contemplative_hospitaller_lazareans = { years_from_game_start < 1 current_year >= 2555 - scope:province.county ?= title:c_dublin + scope:province.county ?= title:c_offaly } add = 10000 } @@ -328,5 +352,6 @@ ho_contemplative_hospitaller_lazareans = { value = { 25 50 } } } + scope:new_holy_order = { set_order_tenet = tenet:tenet_dulia } } } \ No newline at end of file diff --git a/common/landed_titles/NEOW_holy_orders.txt b/common/landed_titles/NEOW_holy_orders.txt index 218129fbc..b0ee25587 100644 --- a/common/landed_titles/NEOW_holy_orders.txt +++ b/common/landed_titles/NEOW_holy_orders.txt @@ -17,7 +17,7 @@ d_knights_hospitaller = { color = { 180 180 180 } - capital = c_roma + capital = c_spoleto definite_form = yes landless = yes @@ -27,7 +27,7 @@ d_knights_hospitaller = { d_knights_of_st_lazarus = { color = { 40 125 21 } - capital = c_dublin + capital = c_kildare definite_form = yes landless = yes @@ -36,7 +36,7 @@ d_knights_of_st_lazarus = { d_contemplative_teutonic_order = { color = { 50 50 50 } - capital = c_vienna + capital = c_wiener_neustadt definite_form = yes landless = yes @@ -46,7 +46,7 @@ d_contemplative_teutonic_order = { d_contemplative_hospitaller_johannics = { color = { 180 180 180 } - capital = c_roma + capital = c_capua definite_form = yes landless = yes @@ -56,7 +56,7 @@ d_contemplative_hospitaller_johannics = { d_contemplative_hospitaller_lazareans = { color = { 40 125 21 } - capital = c_dublin + capital = c_offaly definite_form = yes landless = yes diff --git a/common/on_action/game_start.txt b/common/on_action/game_start.txt index c8a4517d5..e50356c81 100644 --- a/common/on_action/game_start.txt +++ b/common/on_action/game_start.txt @@ -714,6 +714,9 @@ on_game_start = { # set_subject_contract_modification_blocked = no # } #} + set_up_historical_monastic_orders_effect = yes + set_up_historical_military_orders_effect = yes + ### CORONATION LOCATION SETUP ### if = { diff --git a/common/religion/faith_types/NEOW_faiths_catholic.txt b/common/religion/faith_types/NEOW_faiths_catholic.txt index f9f2a5629..40375cdd4 100644 --- a/common/religion/faith_types/NEOW_faiths_catholic.txt +++ b/common/religion/faith_types/NEOW_faiths_catholic.txt @@ -52,14 +52,11 @@ special_doctrine_banner_default } - holy_order_names = { #placeholder - { name = "holy_order_knights_templar" coat_of_arms = "ho_knights_templar" } - { name = "holy_order_knights_hospitaller" coat_of_arms = "ho_knights_hospitaller" } - { name = "holy_order_teutonic_order" coat_of_arms = "ho_teutonic_order" } - { name = "holy_order_order_of_calatrava" coat_of_arms = "ho_order_of_calatrava" } - { name = "holy_order_order_of_alcantara" coat_of_arms = "ho_order_of_alcantara" } - { name = "holy_order_knights_of_santiago" coat_of_arms = "ho_knights_of_santiago" } - } + holy_order_names = { + { name = "holy_order_knights_hospitaller" coat_of_arms = "ho_knights_hospitaller" } + { name = "holy_order_teutonic_order" coat_of_arms = "ho_teutonic_order" } + { name = "holy_order_knights_of_st_lazarus" coat_of_arms = "ho_knights_of_st_lazarus" } + } } compostelan_catholic_faith = { @@ -150,12 +147,6 @@ mariavite_catholic_faith = { } holy_order_names = { #placeholder - { name = "holy_order_knights_templar" coat_of_arms = "ho_knights_templar" } - { name = "holy_order_knights_hospitaller" coat_of_arms = "ho_knights_hospitaller" } - { name = "holy_order_teutonic_order" coat_of_arms = "ho_teutonic_order" } - { name = "holy_order_order_of_calatrava" coat_of_arms = "ho_order_of_calatrava" } - { name = "holy_order_order_of_alcantara" coat_of_arms = "ho_order_of_alcantara" } - { name = "holy_order_knights_of_santiago" coat_of_arms = "ho_knights_of_santiago" } } } @@ -200,12 +191,6 @@ penitente_faith = { } holy_order_names = { #placeholder - { name = "holy_order_knights_templar" coat_of_arms = "ho_knights_templar" } - { name = "holy_order_knights_hospitaller" coat_of_arms = "ho_knights_hospitaller" } - { name = "holy_order_teutonic_order" coat_of_arms = "ho_teutonic_order" } - { name = "holy_order_order_of_calatrava" coat_of_arms = "ho_order_of_calatrava" } - { name = "holy_order_order_of_alcantara" coat_of_arms = "ho_order_of_alcantara" } - { name = "holy_order_knights_of_santiago" coat_of_arms = "ho_knights_of_santiago" } } } @@ -249,12 +234,6 @@ cadaverist_faith = { } holy_order_names = { #placeholder - { name = "holy_order_knights_templar" coat_of_arms = "ho_knights_templar" } - { name = "holy_order_knights_hospitaller" coat_of_arms = "ho_knights_hospitaller" } - { name = "holy_order_teutonic_order" coat_of_arms = "ho_teutonic_order" } - { name = "holy_order_order_of_calatrava" coat_of_arms = "ho_order_of_calatrava" } - { name = "holy_order_order_of_alcantara" coat_of_arms = "ho_order_of_alcantara" } - { name = "holy_order_knights_of_santiago" coat_of_arms = "ho_knights_of_santiago" } } } @@ -317,12 +296,6 @@ catholic_tribunal_faith = { } holy_order_names = { #placeholder - { name = "holy_order_knights_templar" coat_of_arms = "ho_knights_templar" } - { name = "holy_order_knights_hospitaller" coat_of_arms = "ho_knights_hospitaller" } - { name = "holy_order_teutonic_order" coat_of_arms = "ho_teutonic_order" } - { name = "holy_order_order_of_calatrava" coat_of_arms = "ho_order_of_calatrava" } - { name = "holy_order_order_of_alcantara" coat_of_arms = "ho_order_of_alcantara" } - { name = "holy_order_knights_of_santiago" coat_of_arms = "ho_knights_of_santiago" } } } @@ -360,12 +333,6 @@ neo_fraticelli_faith = { } holy_order_names = { #placeholder - { name = "holy_order_knights_templar" coat_of_arms = "ho_knights_templar" } - { name = "holy_order_knights_hospitaller" coat_of_arms = "ho_knights_hospitaller" } - { name = "holy_order_teutonic_order" coat_of_arms = "ho_teutonic_order" } - { name = "holy_order_order_of_calatrava" coat_of_arms = "ho_order_of_calatrava" } - { name = "holy_order_order_of_alcantara" coat_of_arms = "ho_order_of_alcantara" } - { name = "holy_order_knights_of_santiago" coat_of_arms = "ho_knights_of_santiago" } } } @@ -403,11 +370,5 @@ illuminated_faith = { } holy_order_names = { #placeholder - { name = "holy_order_knights_templar" coat_of_arms = "ho_knights_templar" } - { name = "holy_order_knights_hospitaller" coat_of_arms = "ho_knights_hospitaller" } - { name = "holy_order_teutonic_order" coat_of_arms = "ho_teutonic_order" } - { name = "holy_order_order_of_calatrava" coat_of_arms = "ho_order_of_calatrava" } - { name = "holy_order_order_of_alcantara" coat_of_arms = "ho_order_of_alcantara" } - { name = "holy_order_knights_of_santiago" coat_of_arms = "ho_knights_of_santiago" } } } \ No newline at end of file diff --git a/common/religion/religion_types/NEOW_octobrist.txt b/common/religion/religion_types/NEOW_octobrist.txt index 965fb060a..c1bc1b58a 100644 --- a/common/religion/religion_types/NEOW_octobrist.txt +++ b/common/religion/religion_types/NEOW_octobrist.txt @@ -81,7 +81,6 @@ { name = "holy_order_christian" coat_of_arms = "ho_christian" } } - holy_order_maa = { teutonic_knights } #placeholder localization = { PantheonTerm = octobrist_pantheon diff --git a/common/scripted_effects/00_holy_order_effects.txt b/common/scripted_effects/00_holy_order_effects.txt new file mode 100644 index 000000000..b5c409a7d --- /dev/null +++ b/common/scripted_effects/00_holy_order_effects.txt @@ -0,0 +1,3065 @@ + + +send_child_to_holy_order_tooltip_effect = { + scope:recipient = { + add_trait = order_member + add_piety_level = 1 + custom_tooltip = character_will_leave_court_holy_order + if = { + limit = { + is_married = yes + } + every_spouse = { + divorce = scope:recipient + } + } + if = { + limit = { + exists = betrothed + } + break_betrothal = betrothed + if = { + limit = { + has_been_promised_grand_wedding = yes + } + break_grand_wedding_betrothal_effect = yes + } + } + if = { + limit = { + is_concubine = yes + } + this.concubinist = { + remove_concubine = scope:recipient + } + } + if = { + limit = { + number_of_concubines > 0 + } + every_concubine = { + scope:recipient = { + remove_concubine = prev + } + } + } + } +} + +send_child_to_holy_order_effect = { + $GRANDMASTER$ = { + add_courtier = scope:recipient + if = { + limit = { + scope:recipient = { + is_close_family_of = scope:actor + NOT = { + has_trait = bastard + } + } + } + add_opinion = { + target = scope:actor + modifier = pleased_opinion + opinion = 25 + } + } + else_if = { + limit = { + scope:recipient = { + is_close_family_of = scope:actor + } + } + add_opinion = { + target = scope:actor + modifier = pleased_opinion + opinion = 15 + } + } + } + scope:recipient = { + add_trait = order_member + add_piety_level = 1 + if = { + limit = { is_ruler = yes } + depose = yes + } + if = { + limit = { + faith != $GRANDMASTER$.faith + } + set_character_faith = $GRANDMASTER$.faith + set_character_rite = $GRANDMASTER$.rite + } + if = { + limit = { + is_married = yes + } + every_spouse = { + divorce = scope:recipient + } + } + if = { + limit = { + exists = betrothed + } + break_betrothal = betrothed + if = { + limit = { + has_been_promised_grand_wedding = yes + } + break_grand_wedding_betrothal_effect = yes + } + } + if = { + limit = { + is_concubine = yes + } + this.concubinist = { + remove_concubine = scope:recipient + } + } + if = { + limit = { + number_of_concubines > 0 + } + every_concubine = { + scope:recipient = { + remove_concubine = prev + } + } + } + } + take_vows_faith_opinion_effect = yes + if = { + limit = { + $GRANDMASTER$ = { + has_realm_law = cultural_holy_order_succession_law + NOT = { + culture = { + has_same_culture_heritage = scope:recipient.culture + } + } + } + } + $GRANDMASTER$ = { save_scope_as = grandmaster } + custom_tooltip = military_order_wrong_culture_tt + } +} + +send_child_to_clergy_effect = { + scope:recipient = { + if = { + limit = { + NOT = { has_character_flag = pam_simony_paid_vows } + } + if = { + limit = { + OR = { + scope:demand ?= yes + AND = { + is_imprisoned_by = scope:puppet_or_actor + OR = { + is_heir_of = scope:puppet_or_actor + any_claim = { + exists = this + } + } + } + } + } + add_opinion = { + modifier = forced_taking_vows + target = scope:puppet_or_actor + } + } + else = { + add_opinion = { + modifier = demanded_taking_vows + target = scope:puppet_or_actor + } + } + } + simplified_clergy_effect = { RECIPIENT = scope:recipient } + } + scope:puppet_or_actor = { + #Spiritual fulfillment gain + if = { + limit = { + scope:recipient = { + is_child_of = scope:puppet_or_actor + NOT = { + has_trait = bastard + } + } + } + change_spiritual_fulfillment = { + value = medium_spiritual_fulfillment_value + if = { + limit = { + scope:recipient = { + is_imprisoned = yes + } + } + multiply = 0.5 + } + } + } + else_if = { + limit = { + scope:recipient = { + trigger_if = { + limit = { + has_trait = bastard + } + is_child_of = scope:puppet_or_actor + } + OR = { + house ?= scope:puppet_or_actor.house + is_close_family_of = scope:puppet_or_actor + } + } + } + change_spiritual_fulfillment = { + value = minor_spiritual_fulfillment_value + if = { + limit = { + scope:recipient = { + is_imprisoned = yes + } + } + multiply = 0.5 + } + } + } + else_if = { + limit = { + scope:recipient = { + trigger_if = { + limit = { + has_trait = bastard + } + OR = { + house ?= scope:puppet_or_actor.house + is_close_family_of = scope:puppet_or_actor + } + } + trigger_else = { + OR = { + dynasty ?= scope:puppet_or_actor.dynasty + is_close_or_extended_family_of = scope:puppet_or_actor + } + } + } + } + change_spiritual_fulfillment = { + value = miniscule_spiritual_fulfillment_value + if = { + limit = { + scope:recipient = { + is_imprisoned = yes + } + } + multiply = 0.5 + } + } + } + else = { + change_spiritual_fulfillment = { + value = miniscule_spiritual_fulfillment_value + multiply = 0.5 + if = { + limit = { + scope:recipient = { + is_imprisoned = yes + } + } + multiply = 0.5 + } + } + } + } +} + + + +simplified_clergy_effect = { + $RECIPIENT$ = { + # Full monastic vows supersede a deacon's ordination + remove_trait = cleric + add_trait = devoted + add_piety_level = 1 + if = { + limit = { is_ruler = yes } + depose = yes + } + if = { + limit = { + is_married = yes + } + every_spouse = { + divorce = $RECIPIENT$ + } + } + if = { + limit = { + exists = betrothed + } + break_betrothal = betrothed + if = { + limit = { + has_been_promised_grand_wedding = yes + } + break_grand_wedding_betrothal_effect = yes + } + } + if = { + limit = { + is_concubine = yes + } + this.concubinist = { + remove_concubine = $RECIPIENT$ + } + } + if = { + limit = { + number_of_concubines > 0 + } + every_concubine = { + $RECIPIENT$ = { + remove_concubine = prev + } + } + } + } +} + +release_as_executioner_effect = { + scope:actor = { + court_position_grant_effect = { + EMPLOYER = scope:actor + POS = executioner + CANDIDATE = scope:recipient + } + save_scope_as = liege + } +} + +create_monastic_decision_effect = { + save_scope_as = root_scope + custom_tooltip = create_monastic_order_decision_effect_message_tenet + custom_tooltip = create_monastic_order_decision_effect_message + if = { + limit = { + OR = { + has_realm_law = church_authority_1 + has_realm_law = church_authority_2 + has_realm_law = church_authority_3 + } + } + custom_tooltip = create_monastic_order_gain_hook + } + custom_tooltip = create_monastic_order_decision_effect_message_warning + + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + stress_impact = { + zealous = minor_stress_impact_loss + impatient = miniscule_stress_impact_gain + patient = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + } + + if = { # If you have no valid barony this will throw errors when you open the decision - we add this check to avoid that + limit = { + exists = scope:title + } + hidden_effect = { + scope:title = { + ordered_county_province = { + order_by = { + value = 0 + if = { + limit = { + OR = { + terrain = hills + terrain = mountains + terrain = desert_mountains + terrain = desert + } + } + add = 2 + } + if = { + limit = { + OR = { + terrain = forest + terrain = drylands + terrain = wetlands + terrain = jungle + terrain = terraced_hills + } + } + add = 1 + } + } + limit = { + has_holding = no + has_ongoing_construction = no + } + begin_create_holding = church_holding + save_scope_as = province + set_variable = { + name = monastic_order_capital + value = root.faith + years = 50 + } + } + } + } + } + trigger_event = holy_order.2009 +} + +create_monastic_order_leader_and_notification_effect = { + if = { + limit = { + exists = scope:chosen_leader + } + scope:chosen_leader = { + save_scope_as = new_monastic_leader + } + } + else = { + scope:leader = { save_scope_as = new_monastic_leader } + } + hidden_effect = { + if = { # set up currencies for the HO leader, has to be saved as scope:leader + limit = { + exists = scope:new_monastic_leader + } + scope:new_monastic_leader = { + set_variable = founding_monastic + } + scope:new_holy_order.leader.primary_title = { + set_variable = { + name = founder + value = scope:founder + } + } + #If we have to transfer Order from default leader to someone else + if = { + limit = { + scope:new_monastic_leader = { + has_character_flag = created_char + } + } + scope:new_monastic_leader = { + remove_character_flag = created_char + } + } + if = { + limit = { + NOT = { + scope:new_holy_order.leader ?= scope:new_monastic_leader + } + } + scope:new_holy_order.leader.primary_title = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + change_title_holder_include_vassals = { + holder = scope:new_monastic_leader + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + scope:new_monastic_leader = { + every_courtier = { + add_trait = devoted + } + } + + } + + scope:new_monastic_leader = { + add_gold = 100 #So that they have some money to lend out + add_piety_level = 2 + add_gold = holy_order_starting_gold + } + every_in_list = { + list = grabbed_monks + limit = { + NOR = { + this = scope:new_monastic_leader + is_courtier_of = scope:new_monastic_leader + } + } + scope:new_monastic_leader = { add_courtier = prev } + remove_character_flag = created_char + } + + # send messages + send_interface_toast = { + type = monastic_holy_order_founded_message + desc = i_created_monastic_holy_order_message + custom_tooltip = monastic_order_tenet_advocated_tt + left_icon = scope:new_monastic_leader + right_icon = scope:new_holy_order.title + } + } + # send messages to relevant characters that HO got created + save_scope_as = holy_order_creator + every_player = { + limit = { + faith = scope:holy_order_creator.faith + this != scope:holy_order_creator + } + send_interface_message = { + type = monastic_holy_order_founded_message + desc = someone_created_monastic_holy_order_message + custom_tooltip = monastic_order_tenet_advocated_tt + left_icon = scope:holy_order_creator + right_icon = scope:new_holy_order.title + } + } + } +} + +create_monastic_order_founder_effect = { + # gain opinion with your HoF, if you have one and it's not you + if = { + limit = { + exists = faith.religious_head + faith.religious_head != root + } + faith.religious_head = { + add_opinion = { + target = root + modifier = founded_monastic_order_opinion + opinion = 20 + } + } + } + # get a nice modifier + if = { + limit = { + NOT = { has_character_modifier = founded_monastic_order_modifier } + } + add_character_modifier = { + modifier = founded_monastic_order_modifier + years = 5 + } + } + # boost the fervor + faith = { + change_fervor = { + value = notable_fervor_gain + desc = fervor_gain_monastic_order_founded + } + } + + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + + scope:leader = { + save_scope_as = order_master + } + + create_character_memory = { + type = founded_monastic_order_memory + participants = { + order_master = scope:leader + } + } + + # PAM - Catalysts + if = { + limit = { + has_pam_dlc_trigger = yes + religion = religion:christianity_religion + situation:the_christian_church ?= { + situation_top_has_catalyst = catalyst_the_christian_church_founded_monastic_order + } + } + situation:the_christian_church = { + trigger_situation_catalyst = catalyst_the_christian_church_founded_monastic_order + } + } +} + +grab_best_monk_for_tenet_effect = { + $TENET$ = { + save_scope_as = monk_grabbin_tenet + } + if = { + limit = { + exists = dynasty + } + dynasty = { + ordered_dynasty_member = { + order_by = learning + #Family member courtier + limit = { + is_close_family_of = scope:founder + house ?= scope:founder.house + is_courtier_of = scope:founder + potential_abbot_trigger = yes + OR = { + rite = { + rite_has_tenet = scope:monk_grabbin_tenet + } + has_personal_tenet = scope:monk_grabbin_tenet + } + } + #Family member + alternative_limit = { + is_close_family_of = scope:founder + house ?= scope:founder.house + is_ruler = no + in_diplomatic_range = scope:founder + potential_abbot_trigger = yes + #Don't steal players' courtiers + trigger_if = { + limit = { + is_courtier = yes + NOT = { + is_courtier_of = scope:founder + } + } + NOT = { + liege = { + is_ai = no + } + } + } + } + #House member courtier + alternative_limit = { + house ?= scope:founder.house + is_courtier_of = scope:founder + potential_abbot_trigger = yes + } + #House member + alternative_limit = { + house ?= scope:founder.house + is_ruler = no + in_diplomatic_range = scope:founder + potential_abbot_trigger = yes + #Don't steal players' courtiers + trigger_if = { + limit = { + is_courtier = yes + NOT = { + is_courtier_of = scope:founder + } + } + NOT = { + liege = { + is_ai = no + } + } + } + } + #dynasty member courtier + alternative_limit = { + is_courtier_of = scope:founder + potential_abbot_trigger = yes + } + #Dynasty member + alternative_limit = { + is_ruler = no + in_diplomatic_range = scope:founder + potential_abbot_trigger = yes + #Don't steal players' courtiers + trigger_if = { + limit = { + is_courtier = yes + NOT = { + is_courtier_of = scope:founder + } + } + NOT = { + liege = { + is_ai = no + } + } + } + } + save_scope_as = abbot_prospect + } + } + } + if = { + limit = { + NOT = { + exists = scope:abbot_prospect + } + } + #Grab monk courtiers ordered by family importance + ordered_courtier = { + order_by = learning + #Bastards first + limit = { + is_close_family_of = scope:founder + potential_abbot_trigger = yes + } + #friends + alternative_limit = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:founder } + potential_abbot_trigger = yes + } + alternative_limit = { + potential_abbot_trigger = yes + } + save_scope_as = abbot_prospect + } + } + if = { + limit = { + NOT = { + exists = scope:abbot_prospect + } + } + random_list = { + #male monk that belongs to local culture + 2 = { + trigger = { + trigger_if = { + limit = { + exists = scope:leader.primary_title + } + scope:leader.primary_title = { + NOT = { has_variable = female_order } + } + } + } + #Create newly-generated option + create_character = { + template = monastic_order_leader_character + culture = scope:barony.county.culture + location = scope:founder.location + gender = male + save_scope_as = abbot_prospect + } + } + #male lowborn monk that belongs to local culture + 2 = { + trigger = { + trigger_if = { + limit = { + exists = scope:leader.primary_title + } + scope:leader.primary_title = { + NOT = { has_variable = female_order } + } + } + } + #Create newly-generated option + create_character = { + template = monastic_order_leader_character + dynasty = none + culture = scope:barony.county.culture + location = scope:founder.location + gender = male + save_scope_as = abbot_prospect + } + } + #male lowborn monk that belongs to founder culture + 1 = { + trigger = { + trigger_if = { + limit = { + exists = scope:leader.primary_title + } + scope:leader.primary_title = { + NOT = { has_variable = female_order } + } + } + } + #Create newly-generated option + create_character = { + template = monastic_order_leader_character + dynasty = none + culture = scope:barony.county.culture + location = scope:founder.location + gender = male + save_scope_as = abbot_prospect + } + } + #male monk that belongs to founder culture + 1 = { + trigger = { + trigger_if = { + limit = { + exists = scope:leader.primary_title + } + scope:leader.primary_title = { + NOT = { has_variable = female_order } + } + } + } + #Create newly-generated option + create_character = { + template = monastic_order_leader_character + culture = scope:barony.county.culture + location = scope:founder.location + gender = male + save_scope_as = abbot_prospect + } + } + #female nun that belongs to local culture + 2 = { + trigger = { + trigger_if = { + limit = { + exists = scope:leader.primary_title + } + scope:leader.primary_title = { + NOT = { has_variable = male_order } + } + } + } + #Create newly-generated option + create_character = { + template = monastic_order_leader_character + culture = scope:barony.county.culture + location = scope:founder.location + gender = female + save_scope_as = abbot_prospect + } + } + + #female nun that belongs to founder culture + 1 = { + trigger = { + trigger_if = { + limit = { + exists = scope:leader.primary_title + } + scope:leader.primary_title = { + NOT = { has_variable = male_order } + } + } + } + #Create newly-generated option + create_character = { + template = monastic_order_leader_character + culture = scope:barony.county.culture + location = scope:founder.location + gender = female + save_scope_as = abbot_prospect + } + } + } + scope:abbot_prospect = { + add_character_flag = { + flag = created_char + days = 60 + } + } + } + scope:abbot_prospect = { + add_to_list = grabbed_monks + } +} +pick_monastic_founder_option_effect = { + if = { + limit = { + exists = scope:monastic_order + } + custom_tooltip = monastic_tenet_pick_tt + } + else = { + custom_tooltip = monastic_tenet_pick_unformed_order_tt + } + # holy_order.2009 stored the founder boost on the province until this order title existed + if = { + limit = { + exists = scope:monastic_order + scope:barony.title_province ?= { has_variable = new_order_ascetic_boost } + } + scope:barony.title_province = { + var:new_order_ascetic_boost = { save_temporary_scope_as = new_order_ascetic_founder } + remove_variable = new_order_ascetic_boost + } + scope:monastic_order = { + set_variable = { + name = ascetic_order_founder + value = scope:new_order_ascetic_founder + years = 50 + } + } + } + #Gain popularity if taking holding from old order + if = { + limit = { + exists = scope:target_order_tenet + } + faith = { + if = { + limit = { has_tenet_popularity_trigger = yes } + if = { + limit = { + list_size = { + name = revoked_leases + value >= 5 + } + } + change_tenet_popularity = { + target = scope:tenet_pick + change = { + value = medium_tenet_popularity_gain + multiply = 4 + } + } + } + else_if = { + limit = { + list_size = { + name = revoked_leases + value >= 4 + } + } + change_tenet_popularity = { + target = scope:tenet_pick + change = { + value = medium_tenet_popularity_gain + multiply = 3 + } + } + } + else_if = { + limit = { + list_size = { + name = revoked_leases + value >= 3 + } + } + change_tenet_popularity = { + target = scope:tenet_pick + change = { + value = medium_tenet_popularity_gain + multiply = 2 + } + } + } + else_if = { + limit = { + list_size = { + name = revoked_leases + value >= 2 + } + } + change_tenet_popularity = { + target = scope:tenet_pick + change = { + value = medium_tenet_popularity_gain + multiply = 1.5 + } + } + } + else = { + change_tenet_popularity = { + target = scope:tenet_pick + change = { + value = medium_tenet_popularity_gain + multiply = 1 + } + } + } + } + } + + if = { + limit = { + rite = { + OR = { + has_tenet_status = { tenet = tenet_dulia status = core } + has_tenet_status = { tenet = tenet_dulia status = permitted } + } + } + } + custom_tooltip = monastic_founder_become_saint_tt + } + #Reward high church authority theocrat with a hook + if = { + limit = { + root = { + OR = { + has_realm_law = church_authority_1 + has_realm_law = church_authority_2 + has_realm_law = church_authority_3 + } + } + } + } + root = { + add_hook = { + type = indebted_hook + target = scope:chosen_leader + } + } + } + if = { + limit = { + exists = scope:target_lessee + } + scope:target_lessee = { + set_relation_rival = { + target = scope:chosen_leader + reason = rival_shattered_order + } + } + } +} + +take_vows_demand_effect = { + if = { + limit = { + scope:recipient = { + is_heir_of = scope:puppet_or_actor + } + } + add_tyranny = medium_tyranny_gain + } + + scope:recipient = { + if = { + limit = { + NOT = { + has_relation_rival = scope:puppet_or_actor + } + OR = { + ai_zeal <= low_negative_ai_value + ai_greed >= low_positive_ai_value + ai_vengefulness >= low_positive_ai_value + } + NOR = { + has_trait = forgiving + has_trait = craven + has_trait = zealous + has_trait = content + has_trait = humble + has_trait = bastard + } + } + set_relation_rival = { + target = scope:puppet_or_actor + reason = rival_forced_to_take_vows + } + } + else = { + if = { + limit = { + #Bastards with decently matching personality don't see this as betrayal + NAND = { + has_trait = bastard + ai_vengefulness < low_positive_ai_value + ai_greed < low_positive_ai_value + ai_zeal > low_negative_ai_value + } + } + progress_towards_rival_effect = { + CHARACTER = scope:puppet_or_actor + REASON = rival_forced_to_take_vows + OPINION = 0 + } + } + } + every_parent = { + limit = { + NOR = { + this = scope:puppet_or_actor + #Doesn't have other kid in root's line succession + any_child = { + NOT = { + this = scope:recipient + } + is_heir_of = scope:puppet_or_actor + } + has_trait = zealous + } + } + add_opinion = { + modifier = forced_child_take_vows + target = scope:puppet_or_actor + } + } + } +} + +send_child_to_monastic_order_effect = { + # Legitimacy loss if you're doing this to your children + if = { + limit = { + has_legitimacy = yes + scope:recipient = { is_primary_heir_of = scope:puppet_or_actor } + } + if = { + limit = { + hyperdulia_take_the_vows_trigger = yes + } + add_legitimacy = { + value = miniscule_legitimacy_gain + multiply = scope:puppet_or_actor.primary_title.tier + } + } + else = { + add_legitimacy = { + value = minor_legitimacy_loss + multiply = scope:puppet_or_actor.primary_title.tier + } + } + } + else_if = { + limit = { + has_legitimacy = yes + scope:recipient = { is_heir_of = scope:puppet_or_actor } + } + if = { + limit = { + hyperdulia_take_the_vows_trigger = yes + } + add_legitimacy = { + value = minor_legitimacy_gain + multiply = scope:puppet_or_actor.primary_title.tier + } + } + else = { + add_legitimacy = { + value = miniscule_legitimacy_loss + multiply = scope:puppet_or_actor.primary_title.tier + } + } + } + else_if = { + limit = { + has_legitimacy = yes + hyperdulia_take_the_vows_trigger = yes + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = scope:puppet_or_actor.primary_title.tier + } + } + + #Spiritual fulfillment gain + if = { + limit = { + scope:recipient = { + is_child_of = scope:puppet_or_actor + NOT = { + has_trait = bastard + } + } + } + change_spiritual_fulfillment = { + value = major_spiritual_fulfillment_value + if = { + limit = { + scope:recipient = { + is_imprisoned = yes + } + } + multiply = 0.5 + } + } + } + else_if = { + limit = { + scope:recipient = { + trigger_if = { + limit = { + has_trait = bastard + } + is_child_of = scope:puppet_or_actor + } + OR = { + house ?= scope:puppet_or_actor.house + is_close_family_of = scope:puppet_or_actor + } + } + } + change_spiritual_fulfillment = { + value = medium_spiritual_fulfillment_value + if = { + limit = { + scope:recipient = { + is_imprisoned = yes + } + } + multiply = 0.5 + } + } + } + else_if = { + limit = { + scope:recipient = { + trigger_if = { + limit = { + has_trait = bastard + } + OR = { + house ?= scope:puppet_or_actor.house + is_close_family_of = scope:puppet_or_actor + } + } + trigger_else = { + OR = { + dynasty ?= scope:puppet_or_actor.dynasty + is_close_or_extended_family_of = scope:puppet_or_actor + } + } + } + } + change_spiritual_fulfillment = { + value = minor_spiritual_fulfillment_value + if = { + limit = { + scope:recipient = { + is_imprisoned = yes + } + } + multiply = 0.5 + } + } + } + else = { + change_spiritual_fulfillment = { + value = miniscule_spiritual_fulfillment_value + if = { + limit = { + scope:recipient = { + is_imprisoned = yes + } + } + multiply = 0.5 + } + } + } + + + #Send to holy order if we can, if not... make just rando monk in a bishop's court + scope:archabbot = { + add_courtier = scope:recipient + if = { + limit = { + scope:recipient = { + is_close_family_of = scope:puppet_or_actor + NOT = { + has_trait = bastard + } + } + } + } + else_if = { + limit = { + scope:recipient = { + is_close_family_of = scope:puppet_or_actor + } + } + add_opinion = { + target = scope:puppet_or_actor + modifier = pleased_opinion + opinion = 15 + } + } + if = { + limit = { + scope:recipient = { + OR = { + house ?= scope:puppet_or_actor.house + is_close_family_of = scope:puppet_or_actor + } + } + } + dynastic_monks_gain_xp_effect = yes + } + } + + scope:recipient = { + add_trait = devoted + add_piety_level = 1 + if = { + limit = { is_ruler = yes } + depose = yes + } + if = { + limit = { + is_married = yes + } + every_spouse = { + divorce = scope:recipient + } + } + if = { + limit = { + exists = betrothed + } + break_betrothal = betrothed + if = { + limit = { + has_been_promised_grand_wedding = yes + } + break_grand_wedding_betrothal_effect = yes + } + } + if = { + limit = { + is_concubine = yes + } + this.concubinist = { + remove_concubine = scope:recipient + } + } + if = { + limit = { + number_of_concubines > 0 + } + every_concubine = { + scope:recipient = { + remove_concubine = prev + } + } + } + } + if = { + limit = { + house = { + has_house_aspiration_parameter = humility_take_the_vows_bonus + } + } + add_piety_experience = 100 + add_character_modifier = { + modifier = tgp_humility_take_the_vows_bonus_modifier + years = 10 + } + } +} +take_vows_faith_opinion_effect = { + if = { + limit = { + exists = cp:councillor_court_chaplain + scope:recipient = { + is_close_family_of = scope:puppet_or_actor + NOT = { + has_trait = bastard + } + } + } + cp:councillor_court_chaplain = { + add_opinion = { + target = scope:puppet_or_actor + modifier = pious_opinion + opinion = 20 + } + } + } + #bastards + else_if = { + limit = { + exists = cp:councillor_court_chaplain + scope:recipient = { + is_close_family_of = scope:puppet_or_actor + } + } + cp:councillor_court_chaplain = { + add_opinion = { + target = scope:puppet_or_actor + modifier = pious_opinion + opinion = 10 + } + } + } + if = { + limit = { + exists = faith.religious_head + faith.religious_head != scope:puppet_or_actor + scope:recipient = { + is_close_family_of = scope:puppet_or_actor + NOT = { + has_trait = bastard + } + } + } + faith.religious_head = { + add_opinion = { + target = scope:puppet_or_actor + modifier = pious_opinion + opinion = 10 + } + } + } +} +monastic_lifestyle_xp_yearly_gain_effect = { + + if = { + limit = { + has_trait = education_learning_5 + } + add_learning_lifestyle_xp = { + value = medium_lifestyle_xp + } + } + else_if = { + limit = { + has_trait = education_learning_4 + } + add_learning_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.9 + } + } + else_if = { + limit = { + has_trait = education_learning_3 + } + add_learning_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.8 + } + } + else_if = { + limit = { + has_trait = education_learning_2 + } + add_learning_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.7 + } + } + else_if = { + limit = { + has_trait = education_learning_1 + } + add_learning_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.6 + } + } + else = { + add_learning_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.3 + } + } + #Stewardship + if = { + limit = { + has_trait = education_stewardship_5 + } + add_stewardship_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.8 + } + } + else_if = { + limit = { + has_trait = education_stewardship_4 + } + add_stewardship_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.7 + } + } + else_if = { + limit = { + has_trait = education_stewardship_3 + } + add_stewardship_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.6 + } + } + else_if = { + limit = { + has_trait = education_stewardship_2 + } + add_stewardship_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.5 + } + } + else_if = { + limit = { + has_trait = education_stewardship_1 + } + add_stewardship_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.4 + } + } + else = { + add_stewardship_lifestyle_xp = { + value = medium_lifestyle_xp + multiply = 0.2 + } + } +} +military_order_lifestyle_xp_yearly_gain_effect = { + if = { + limit = { + has_trait = education_martial_5 + } + add_martial_lifestyle_xp = { + value = minor_lifestyle_xp + } + } + else_if = { + limit = { + has_trait = education_martial_4 + } + add_martial_lifestyle_xp = { + value = minor_lifestyle_xp + multiply = 0.9 + } + } + else_if = { + limit = { + has_trait = education_martial_3 + } + add_martial_lifestyle_xp = { + value = minor_lifestyle_xp + multiply = 0.8 + } + } + else_if = { + limit = { + has_trait = education_martial_2 + } + add_martial_lifestyle_xp = { + value = minor_lifestyle_xp + multiply = 0.7 + } + } + else_if = { + limit = { + has_trait = education_martial_1 + } + add_martial_lifestyle_xp = { + value = minor_lifestyle_xp + multiply = 0.6 + } + } + else = { + add_martial_lifestyle_xp = { + value = minor_lifestyle_xp + multiply = 0.3 + } + } +} + +military_order_yearly_trait_gain_effect = { + #Lazarites might gain a little leprosy... + #Hospital orders gain physician trait XP + if = { + limit = { + primary_title = { + OR = { + this = title:d_knights_of_st_lazarus + this = title:d_knights_hospitaller + } + } + } + every_courtier = { + limit = { + has_trait = lifestyle_physician + } + add_trait_xp = { + trait = lifestyle_physician + value = { 1 10 } + } + } + random = { + chance = 50 + ordered_courtier = { + order_by = learning + limit = { + NOT = { + has_trait = lifestyle_physician + } + } + add_trait = lifestyle_physician + } + } + } +} +set_up_historical_monastic_orders_effect = { + #BENEDICTINES + #Store-brand Benedictines + if = { + limit = { + #Benedictines in Italy are eternal + always = yes + } + title:b_bruck = { + save_scope_as = monastic_barony_1 + barony.holder = { + save_scope_as = game_start_founder_1 + set_variable = { + name = monastic_game_start_founder_1 + days = 10 + } + } + } + character:contemplativeholyorder01 = { + save_scope_as = monastic_leader_1 + } + scope:game_start_founder_1 = { + create_holy_order_neutral_effect = { + LEADER = scope:monastic_leader_1 + CAPITAL = scope:monastic_barony_1 + NEW_HO_SCOPE = new_holy_order + FOUNDER = scope:game_start_founder + ORDER_TYPE = monastic + } + } + scope:monastic_leader_1 = { + #Add now-unneeded abbots as courtiers + every_courtier = { + add_trait = devoted + add_trait_xp = { + trait = devoted + value = { 20 80 } + } + } + faith = { + random_faith_holy_order = { + limit = { + leader = scope:monastic_leader_1 + } + save_scope_as = contemplativeteutons + } + } + } + title:b_bruck = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativeteutons } + title:b_wieselburg = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativeteutons } + title:b_horn = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativeteutons } + title:b_kapfenberg = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativeteutons } + } + if = { + limit = { + #Benedictines in Italy are eternal + always = yes + } + title:b_velletri = { + save_scope_as = monastic_barony_2 + barony.holder = { + save_scope_as = game_start_founder_2 + set_variable = { + name = monastic_game_start_founder_2 + days = 10 + } + } + } + character:contemplativeholyorder02 = { + save_scope_as = monastic_leader_2 + } + scope:game_start_founder_2 = { + create_holy_order_neutral_effect = { + LEADER = scope:monastic_leader_2 + CAPITAL = scope:monastic_barony_2 + NEW_HO_SCOPE = new_holy_order + FOUNDER = scope:game_start_founder + ORDER_TYPE = monastic + } + } + scope:monastic_leader_2 = { + #Add now-unneeded abbots as courtiers + every_courtier = { + add_trait = devoted + add_trait_xp = { + trait = devoted + value = { 20 80 } + } + } + faith = { + random_faith_holy_order = { + limit = { + leader = scope:monastic_leader_2 + } + save_scope_as = contemplativehospitallers + } + } + } + title:b_velletri = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativehospitallers } + title:b_camaldoli = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativehospitallers } + title:b_civitas_castelli = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativehospitallers } + } + if = { + limit = { + #Benedictines in Italy are eternal + always = yes + } + title:b_da_chainoc = { + save_scope_as = monastic_barony_3 + barony.holder = { + save_scope_as = game_start_founder_3 + set_variable = { + name = monastic_game_start_founder + days = 10 + } + } + } + character:contemplativeholyorder03 = { + save_scope_as = monastic_leader_3 + } + scope:game_start_founder_3 = { + create_holy_order_neutral_effect = { + LEADER = scope:monastic_leader_3 + CAPITAL = scope:monastic_barony_3 + NEW_HO_SCOPE = new_holy_order + FOUNDER = scope:game_start_founder_3 + ORDER_TYPE = monastic + } + } + scope:monastic_leader_3 = { + #Add now-unneeded abbots as courtiers + every_courtier = { + add_trait = devoted + add_trait_xp = { + trait = devoted + value = { 20 80 } + } + } + faith = { + random_faith_holy_order = { + limit = { + leader = scope:monastic_leader_3 + } + save_scope_as = contemplativelazarites + } + } + } + title:b_da_chainoc = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativelazarites } + title:b_ardee = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativelazarites } + title:b_clonmel = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativelazarites } + title:b_kilmallock = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:contemplativelazarites } + } + + #Give all monastic leaders some monastic trait XP + every_religion_global = { + every_faith = { + limit = { + any_faith_holy_order = { + exists = this + } + } + every_faith_holy_order = { + limit = { + leader = { + has_trait = devoted + } + } + leader = { + add_trait_xp = { + trait = devoted + value = { 40 90 } + } + } + } + } + } + +} +set_up_historical_military_orders_effect = { + #CHRISTIAN MILITARY ORDERS + #Create Teutons + if = { + limit = { + always = yes + } + character:militantholyorder01 = { + save_scope_as = leader_1 + } + title:b_floridsdorf = { + save_scope_as = barony_1 + barony.holder = { + save_scope_as = game_start_founder_1 + set_variable = { + name = military_order_game_start_founder_1 + days = 10 + } + } + } + create_holy_order = { + leader = scope:leader_1 + founder = scope:game_start_founder_1 + random_holy_order_type = military + capital = scope:barony_1 + save_scope_as = new_holy_order + } + scope:leader_1 = { + every_courtier = { + add_trait = order_member + } + faith = { + random_faith_holy_order = { + limit = { + leader = scope:leader_1 + } + save_scope_as = militantteutons + } + } + } + title:b_floridsdorf = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militantteutons } + title:b_kamnik = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militantteutons } + title:b_wels = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militantteutons } + title:b_freistadt = { lease_out_to_holy_order = scope:militantteutons } + } + #hospitallers + if = { + limit = { + always = yes + } + character:militantholyorder02 = { + save_scope_as = leader_2 + } + title:b_gubbio = { + save_scope_as = barony_2 + barony.holder = { + save_scope_as = game_start_founder_2 + set_variable = { + name = military_order_game_start_founder_2 + days = 10 + } + } + } + create_holy_order = { + leader = scope:leader_2 + founder = scope:game_start_founder_2 + random_holy_order_type = military + capital = scope:barony_2 + save_scope_as = new_holy_order + } + scope:leader_2 = { + every_courtier = { + add_trait = order_member + } + faith = { + random_faith_holy_order = { + limit = { + leader = scope:leader_2 + } + save_scope_as = militanthospitallers + } + } + } + title:b_gubbio = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militanthospitallers } + title:b_guastalla = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militanthospitallers } + title:b_brescello = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militanthospitallers } + title:b_melfi = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militanthospitallers } + } + #Lazarites + if = { + limit = { + always = yes + } + character:militantholyorder03 = { + save_scope_as = leader_3 + } + title:b_balrothery = { + save_scope_as = barony_3 + barony.holder = { + save_scope_as = game_start_founder_3 + set_variable = { + name = military_order_game_start_founder_3 + days = 10 + } + } + } + create_holy_order = { + leader = scope:leader_3 + founder = scope:game_start_founder_3 + random_holy_order_type = military + capital = scope:barony_3 + save_scope_as = new_holy_order + } + scope:leader_3 = { + every_courtier = { + add_trait = order_member + } + faith = { + random_faith_holy_order = { + limit = { + leader = scope:leader_3 + } + save_scope_as = militantlazarites + } + } + } + title:b_kildare = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militantlazarites } + title:b_kinsale = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militantlazarites } + title:b_roscrea = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militantlazarites } + title:b_trim = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = title:c_coimbra.holder + change = scope:change + } + resolve_title_and_vassal_change = scope:change + lease_out_to_holy_order = scope:militantlazarites } + } +} + +dynastic_monks_gain_xp_effect = { + if = { + limit = { NOT = { exists = scope:puppet_or_actor } } + scope:actor = { save_scope_as = puppet_or_actor } + } + every_courtier = { + limit = { + has_trait = devoted + OR = { + AND = { + exists = scope:puppet_or_actor.dynasty + dynasty ?= scope:puppet_or_actor.dynasty + } + is_close_family_of = scope:puppet_or_actor + } + } + add_trait_xp = { + trait = devoted + value = { + value = 2 + if = { + limit = { + is_close_family_of = scope:puppet_or_actor + } + add = 2 + } + if = { + limit = { + house ?= scope:puppet_or_actor.house + } + add = 2 + } + #increase for lease granting interaction + if = { + limit = { + exists = scope:target + } + multiply = 2 + } + #Increase for huge donation + if = { + limit = { + scope:huge_donation ?= yes + } + multiply = 2.5 + } + } + } + } +} +#Holy Order patronage loss warning +grant_title_holy_order_patronage_warning_effect = { + if = { + limit = { + #Holy order is actually involved + scope:puppet_or_actor = { + any_patroned_holy_order = { + leader.capital_county ?= { + save_temporary_scope_as = ho_capital_temp + any_this_title_or_de_jure_above = { + OR = { + is_in_list = target_titles + holder ?= { + target_is_same_character_or_above = scope:recipient + } + } + } + } + } + } + #Duchy tier or higher is involved + scope:recipient = { + OR = { + #Is duke + highest_held_title_tier >= tier_duchy + #Will be duke and either already controls duchy or will + AND = { + any_in_list = { + list = target_titles + tier >= tier_duchy + } + OR = { + scope:ho_capital_temp.holder ?= { + target_is_same_character_or_above = scope:recipient + } + any_in_list = { + list = target_titles + this = scope:ho_capital_temp + } + AND = { + scope:ho_capital_temp.holder.highest_held_title_tier = tier_county + any_in_list = { + list = target_titles + tier >= tier_duchy + any_de_jure_county = { + this = scope:ho_capital_temp + } + } + } + } + } + } + } + } + custom_tooltip = holy_order_control_loss_warning_tt + } + #Potential holy order patronage loss warning + if = { + limit = { + #No duchies involved + NOR = { + scope:recipient = { + highest_held_title_tier > tier_county + } + any_in_list = { + list = target_titles + tier > tier_county + } + } + #But you are giving away Order capital + scope:actor = { + any_patroned_holy_order = { + leader.capital_county ?= { + save_temporary_scope_as = ho_capital_temp + is_in_list = target_titles + } + } + } + } + custom_tooltip = potential_holy_order_control_loss_warning_tt + } +} + +monastic_belief_spreading_targeting_effect = { + save_scope_as = holy_order_leader + holy_order = { + save_scope_as = holy_order + } + holy_order.order_tenet = { + save_scope_as = order_tenet + } + rite = { + save_scope_as = order_rite + } + #Make lists of targets + holy_order = { + #Spread Tenet to AI characters as personal tenet + every_leased_title = { + #leases' duchies' counties + duchy ?= { + every_de_jure_county_holder = { + limit = { + pam_monastic_tenet_spread_target_trigger = { ORDER_LEADER = scope:holy_order_leader } + } + add_to_list = personal_tenet_targets + } + } + #Neighboring counties to leases + county ?= { + every_neighboring_county = { + if = { + limit = { + holder ?= { + pam_monastic_tenet_spread_target_trigger = { ORDER_LEADER = scope:holy_order_leader } + } + } + holder = { + add_to_list = personal_tenet_targets + } + } + } + } + } + } + #Change character tenets + every_in_list = { + list = personal_tenet_targets + #Of AI + if = { + limit = { + is_ai = yes + } + random = { + chance = { + value = { + value = scope:holy_order_leader.learning + multiply = 0.5 + } + #Actually want tenet + if = { + limit = { + NOT = { + any_desired_tenet = { + selection_count = 97 + only_positive = yes + threshold = 1 + this = scope:order_tenet + } + } + } + add = 0.1 + } + if = { + limit = { + any_desired_tenet = { + selection_count = 1 + only_positive = yes + this = scope:order_tenet + } + } + multiply = 5 + } + if = { + limit = { + any_desired_tenet = { + selection_count = 3 + only_positive = yes + this = scope:order_tenet + } + } + multiply = 3 + } + if = { + limit = { + any_desired_tenet = { + selection_count = 6 + only_positive = yes + this = scope:order_tenet + } + } + multiply = 2 + } + if = { + limit = { + rite = { + has_tenet_status = { + tenet = scope:order_tenet + status = core + } + } + } + multiply = 2 + } + if = { + limit = { + rite = { + has_tenet_status = { + tenet = scope:order_tenet + status = permitted + } + } + } + multiply = 1.5 + } + if = { + limit = { + rite = { + has_tenet_status = { + tenet = scope:order_tenet + status = prohibited + } + } + } + multiply = 0.25 + } + if = { + limit = { + NOT = { + capital_county.kingdom = scope:holy_order_leader.capital_county.kingdom + } + } + multiply = 0.75 + } + if = { + limit = { + NOT = { + capital_county.empire = scope:holy_order_leader.capital_county.empire + } + } + multiply = 0.75 + } + if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + multiply = 0.25 + } + } + add_to_list = order_tenet_accepted + } + } + } +} + +monastic_tenet_espousing_effect = { + add_character_flag = { + flag = mon_tenet_cooldown + years = 5 + } + #Need to convince at least someone, jeez... + if = { + limit = { + NOT = { + any_in_list = { + count >= 1 + list = order_tenet_accepted + is_ai = yes + } + } + } + random_in_list = { + list = personal_tenet_targets + limit = { + highest_held_title_tier <= tier_county + is_ai = yes + } + limit = { + highest_held_title_tier <= tier_duchy + is_ai = yes + } + alternative_limit = { + is_ai = yes + } + add_to_list = order_tenet_accepted + } + } + save_scope_value_as = { + name = order_tenet_accepted_count + value = list_size:order_tenet_accepted + } + + + #APPLY TO CHARACTERS SELECTED IN monastic_belief_spreading_targeting_effect + if = { + limit = { + any_in_list = { + list = order_tenet_accepted + count >= 1 + } + } + custom_tooltip = order_tenet_accepted_list_tt + } + hidden_effect = { + every_in_list = { + list = order_tenet_accepted + add_character_flag = free_tenet_change + force_set_personal_tenet = scope:order_tenet + remove_character_flag = free_tenet_change + + } + } + + #players choose via interaction + every_in_list = { + list = personal_tenet_targets + limit = { + is_ai = no + } + save_scope_as = tenet_interaction_recipient + run_interaction = { + interaction = pam_evangelize_personal_tenet_interaction + actor = scope:holy_order_leader + recipient = scope:tenet_interaction_recipient + execute_threshold = decline + } + add_to_list = rulers_to_notify + } + #give some correct rite courtiers piety + custom_tooltip = espouse_beliefs_monks_piety_tt + hidden_effect = { + add_piety = medium_piety_gain + every_courtier = { + limit = { + rite = scope:order_rite + has_trait = devoted + } + random = { + chance = { + value = scope:holy_order_leader.learning + multiply = 4 + } + add_piety = medium_piety_gain + } + } + #Set courtier rite to order rite + every_courtier = { + limit = { + faith = scope:holy_order_leader.faith + NOT = { + rite = scope:order_rite + } + } + random = { + chance = { + value = scope:holy_order_leader.learning + multiply = 4 + } + set_character_rite = scope:holy_order_leader.rite + } + } + } + scope:holy_order_leader = { + if = { + limit = { has_trait = devoted } + add_trait_xp = { + trait = devoted + value = 5 + } + } + } + + #Inform their lease holders of what happened + holy_order = { + every_leased_title = { + county.holder ?= { + add_to_list = rulers_to_notify + } + } + } + faith = { + every_faith_playable_ruler = { + limit = { + is_clergy = yes + in_diplomatic_range = scope:holy_order_leader + } + add_to_list = rulers_to_notify + } + } + hidden_effect = { + every_in_list = { + list = rulers_to_notify + limit = { + is_ai = no + } + save_scope_as = msg_receiver + #Personal Tenet spread message + if = { + limit = { + any_in_list = { + list = order_tenet_accepted + count > 2 + NOT = { + this = scope:msg_receiver + } + } + } + ordered_in_list = { + list = order_tenet_accepted + order_by = highest_held_title_tier + limit = { + is_liege_or_above_of = scope:msg_receiver + NOT = { + this = scope:msg_receiver + } + } + alternative_limit = { + OR = { + house ?= scope:msg_receiver.house + has_any_scripted_relation = scope:msg_receiver + } + NOT = { + this = scope:msg_receiver + } + } + alternative_limit = { + liege ?= scope:msg_receiver + NOT = { + this = scope:msg_receiver + } + } + alternative_limit = { + top_liege ?= scope:msg_receiver + NOT = { + this = scope:msg_receiver + } + } + alternative_limit = { + any_character_to_title_neighboring_county = { + holder = scope:msg_receiver + } + NOT = { + this = scope:msg_receiver + } + } + alternative_limit = { + NOT = { + this = scope:msg_receiver + } + } + save_scope_as = tenet_change_1 + } + ordered_in_list = { + list = order_tenet_accepted + order_by = highest_held_title_tier + limit = { + is_liege_or_above_of = scope:msg_receiver + NOR = { + this = scope:tenet_change_1 + this = scope:msg_receiver + } + } + alternative_limit = { + OR = { + house ?= scope:msg_receiver.house + has_any_scripted_relation = scope:msg_receiver + } + NOR = { + this = scope:tenet_change_1 + this = scope:msg_receiver + } + } + alternative_limit = { + liege ?= scope:msg_receiver + NOR = { + this = scope:tenet_change_1 + this = scope:msg_receiver + } + } + alternative_limit = { + top_liege ?= scope:msg_receiver + NOR = { + this = scope:tenet_change_1 + this = scope:msg_receiver + } + } + alternative_limit = { + any_character_to_title_neighboring_county = { + holder = scope:msg_receiver + } + NOR = { + this = scope:tenet_change_1 + this = scope:msg_receiver + } + } + alternative_limit = { + NOR = { + this = scope:tenet_change_1 + this = scope:msg_receiver + } + } + save_scope_as = tenet_change_2 + } + send_interface_message = { + type = msg_order_espousing_beliefs + title = msg_order_espousing_beliefs_title_tenet + left_icon = scope:tenet_change_1 + right_icon = scope:holy_order_leader.primary_title + custom_tooltip = order_spreading_tenet_tt + } + } + else_if = { + limit = { + any_in_list = { + list = order_tenet_accepted + count = 2 + NOT = { + this = scope:msg_receiver + } + } + } + random_in_list = { + list = order_tenet_accepted + limit = { + NOT = { + this = scope:msg_receiver + } + } + save_scope_as = tenet_change_1 + } + random_in_list = { + list = order_tenet_accepted + limit = { + NOR = { + this = scope:msg_receiver + this = scope:tenet_change_1 + } + } + save_scope_as = tenet_change_2 + } + send_interface_message = { + type = msg_order_espousing_beliefs + title = msg_order_espousing_beliefs_title_tenet + left_icon = scope:tenet_change_1 + right_icon = scope:holy_order_leader.primary_title + custom_tooltip = order_spreading_tenet_tt_char_1 + custom_tooltip = order_spreading_tenet_tt_char_2 + } + } + else_if = { + limit = { + any_in_list = { + list = order_tenet_accepted + count = 1 + NOT = { + this = scope:msg_receiver + } + } + } + random_in_list = { + list = order_tenet_accepted + save_scope_as = tenet_change_1 + } + send_interface_message = { + type = msg_order_espousing_beliefs + title = msg_order_espousing_beliefs_title_tenet + left_icon = scope:tenet_change_1 + right_icon = scope:holy_order_leader.primary_title + custom_tooltip = order_spreading_tenet_tt_char_1 + } + } + } + } +} + +#Other effect where they gain monasteries and increase development + +#Get monasteries where Rite and ruler tenet matches theirs +#Increase development in matching-rite duchies they lease in +#improve monk courtiers of leader +#Inform their lease holders of what happened +#Inform lease holders of other monasteries they had monasteries switched +monastic_lease_swapping_effect = { + add_character_flag = { + flag = mon_monastery_gain_cooldown + years = 3 + } + add_character_flag = { + flag = just_swapped_lease + days = 10 + } + save_scope_as = holy_order_leader + holy_order = { + save_scope_as = holy_order + } + holy_order.order_tenet = { + save_scope_as = order_tenet + } + rite = { + save_scope_as = order_rite + } + faith = { + random_faith_holy_order = { + limit = { + NOT = { + this = scope:holy_order + } + any_leased_title = { + monastic_lease_can_be_suborned_trigger = { ORDER = scope:holy_order } + } + scope:holy_order_leader.var:old_order ?= this + } + alternative_limit = { + NOT = { + this = scope:holy_order + } + any_leased_title = { + monastic_lease_can_be_suborned_trigger = { ORDER = scope:holy_order } + } + } + save_scope_as = target_order + ordered_leased_title = { + order_by = { + value = county.development_level + multiply = -1 + } + limit = { + monastic_lease_can_be_suborned_trigger = { ORDER = scope:holy_order } + NOT = { + county = scope:target_order.leader.capital_county + } + } + save_scope_as = taken_monastery + } + #Capital monastery if only available + if = { + limit = { + NOT = { + exists = scope:taken_monastery + } + } + ordered_leased_title = { + order_by = { + value = county.development_level + multiply = -1 + } + limit = { + monastic_lease_can_be_suborned_trigger = { ORDER = scope:holy_order } + } + save_scope_as = taken_monastery + } + } + } + } + if = { + limit = { + exists = scope:taken_monastery + } + #Inform their lease holders of what is happening + holy_order = { + every_leased_title = { + county.holder ?= { + add_to_list = rulers_to_notify + } + } + } + faith.religious_head ?= { + add_to_list = rulers_to_notify + } + rite.head_of_rite ?= { + add_to_list = rulers_to_notify + } + scope:target_order = { + every_leased_title = { + county.holder ?= { + add_to_list = rulers_to_notify + } + } + leader.rite.head_of_rite ?= { + add_to_list = rulers_to_notify + } + } + scope:taken_monastery.county = { + holder ?= { + add_to_list = rulers_to_notify + } + clerical_region_title.holder ?= { + add_to_list = rulers_to_notify + } + } + every_in_list = { + list = rulers_to_notify + limit = { + is_ai = no + } + save_scope_as = msg_receiver + + #Normal message + if = { + limit = { + scope:target_order = { + any_leased_title = { + NOT = { + this = scope:taken_monastery + } + } + } + } + send_interface_message = { + type = msg_order_took_over_monastery + title = msg_order_took_over_monastery.t + left_icon = scope:holy_order_leader.primary_title + right_icon = scope:target_order.leader.primary_title + custom_tooltip = order_took_over_monastery_tt + if = { + limit = { + #Rite mismatch caused this + scope:target_order.leader.rite ?= { + NOT = { + this = scope:order_rite + } + OR = { + NOT = { + scope:taken_monastery.county.clerical_region_title.holder.rite ?= scope:target_order.leader.rite + } + NOT = { + scope:taken_monastery.county.holder.rite ?= this + } + } + } + } + scope:target_order.leader.rite = { save_scope_as = target_rite } + custom_tooltip = monastic_spreading_rite_tt + } + #Influence of patron or puppeteer + else_if = { + limit = { + scope:taken_monastery.county = { + OR = { + clerical_region_title.holder ?= { + OR = { + scope:holy_order.holy_order_patron ?= this + scope:holy_order_leader.puppeteer ?= this + any_personal_tenet = { + this = scope:order_tenet + } + } + } + holder ?= { + OR = { + scope:holy_order.holy_order_patron ?= this + scope:holy_order_leader.puppeteer ?= this + any_personal_tenet = { + this = scope:order_tenet + } + } + } + } + } + } + if = { + limit = { + scope:taken_monastery.county.clerical_region_title.holder ?= { + OR = { + scope:holy_order.holy_order_patron ?= this + scope:holy_order_leader.puppeteer ?= this + any_personal_tenet = { + this = scope:order_tenet + } + } + } + } + scope:taken_monastery.county.clerical_region_title.holder = { + save_scope_as = instigator + } + } + else = { + scope:taken_monastery.county.holder ?= { + save_scope_as = instigator + } + } + custom_tooltip = monastic_spreading_instigated_tt + } + } + } + #Order destroying message + else = { + send_interface_message = { + type = msg_order_took_over_monastery + title = msg_order_took_over_other_order.t + left_icon = scope:holy_order_leader.primary_title + right_icon = scope:target_order.leader.primary_title + custom_tooltip = order_took_over_capital_monastery_tt + if = { + limit = { + #Rite mismatch caused this + scope:target_order.leader.rite ?= { + NOT = { + this = scope:order_rite + } + OR = { + NOT = { + scope:taken_monastery.county.clerical_region_title.holder.rite ?= scope:target_order.leader.rite + } + NOT = { + scope:taken_monastery.county.holder.rite ?= this + } + } + } + } + scope:target_order.leader.rite = { save_scope_as = target_rite } + custom_tooltip = monastic_spreading_rite_tt + } + #Influence of patron or puppeteer + else_if = { + limit = { + scope:taken_monastery.county = { + OR = { + clerical_region_title.holder ?= { + OR = { + scope:holy_order.holy_order_patron ?= this + scope:holy_order_leader.puppeteer ?= this + any_personal_tenet = { + this = scope:order_tenet + } + } + } + holder ?= { + OR = { + scope:holy_order.holy_order_patron ?= this + scope:holy_order_leader.puppeteer ?= this + any_personal_tenet = { + this = scope:order_tenet + } + } + } + } + } + } + if = { + limit = { + scope:taken_monastery.county.clerical_region_title.holder ?= { + OR = { + scope:holy_order.holy_order_patron ?= this + scope:holy_order_leader.puppeteer ?= this + any_personal_tenet = { + this = scope:order_tenet + } + } + } + } + scope:taken_monastery.county.clerical_region_title.holder = { + save_scope_as = instigator + } + } + else = { + scope:taken_monastery.county.holder ?= { + save_scope_as = instigator + } + } + custom_tooltip = monastic_spreading_instigated_tt + } + } + } + + } + scope:taken_monastery = { + revoke_lease = yes + lease_out_to_holy_order = scope:holy_order + } + #Monk courtiers get better + add_trait_xp = { + trait = devoted + value = 10 + } + every_courtier = { + limit = { + has_trait = devoted + } + add_trait_xp = { + trait = devoted + value = 5 + } + } + } +} diff --git a/common/scripted_effects/00_religion_effects.txt b/common/scripted_effects/00_religion_effects.txt new file mode 100644 index 000000000..604f93e16 --- /dev/null +++ b/common/scripted_effects/00_religion_effects.txt @@ -0,0 +1,1492 @@ +#Effects relating to religions + +# check_for_equal_doctrine_effect +# set_bhakti_effect +# ritual_cannibalism_personal_tenet_reward_effect - grants private rewards for eating VICTIM, scaled by rank and close relations + +ritual_cannibalism_personal_tenet_reward_effect = { + if = { + limit = { + has_personal_tenet_flag = tenet_ritual_cannibalism_devour_reward + } + add_stress = { + value = miniscule_stress_loss + if = { + limit = { $VICTIM$ = { highest_held_title_tier >= tier_duchy } } + add = miniscule_stress_loss + } + if = { + limit = { $VICTIM$ = { highest_held_title_tier >= tier_kingdom } } + add = miniscule_stress_loss + } + if = { + limit = { $VICTIM$ = { highest_held_title_tier >= tier_empire } } + add = miniscule_stress_loss + } + if = { + limit = { + OR = { + is_close_family_of = $VICTIM$ + is_consort_of = $VICTIM$ + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = $VICTIM$ } + has_any_best_good_relationship_with_character_trigger = { CHARACTER = $VICTIM$ } + } + } + add = miniscule_stress_loss + } + } + change_spiritual_fulfillment = { + value = miniscule_spiritual_fulfillment_value + if = { + limit = { $VICTIM$ = { highest_held_title_tier >= tier_duchy } } + add = miniscule_spiritual_fulfillment_value + } + if = { + limit = { $VICTIM$ = { highest_held_title_tier >= tier_kingdom } } + add = miniscule_spiritual_fulfillment_value + } + if = { + limit = { $VICTIM$ = { highest_held_title_tier >= tier_empire } } + add = miniscule_spiritual_fulfillment_value + } + if = { + limit = { + OR = { + is_close_family_of = $VICTIM$ + is_consort_of = $VICTIM$ + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = $VICTIM$ } + has_any_best_good_relationship_with_character_trigger = { CHARACTER = $VICTIM$ } + } + } + add = miniscule_spiritual_fulfillment_value + } + } + } +} + +# Used to set Equal Law when the Equal Faith Doctrine is gained +check_for_equal_doctrine_effect = { + if = { + limit = { + is_ruler = yes + rite = { + rite_has_doctrine = doctrine_gender_equal + } + scope:old_faith.main_rite = { + NOT = { rite_has_doctrine = doctrine_gender_equal } + } + NOT = { + has_realm_law = equal_law + } + } + add_realm_law_skip_effects = equal_law + } +} +# $TITLE$ is the barony, and this expects scope:holy_order +lease_barony_to_military_holy_order_effect = { + $TITLE$ = { + if = { #To make sure the effect works properly we have to have the title when we lease it out + limit = { holder != prev } + prev = { get_title = prev } + } + lease_out_to_holy_order = scope:holy_order + } + if = { + limit = { + has_personal_tenet_flag = leasing_to_military_order_give_spiritual_fulfillment_personal + faith = scope:holy_order.faith + } + send_interface_toast = { + type = event_generic_good + title = leasing_to_military_order_give_spiritual_fulfillment_personal_toast + change_spiritual_fulfillment = medium_spiritual_fulfillment_value + } + } +} + +# Used to set a personal god. +set_bhakti_effect = { + # Remove any previous personal god relation. + ## HINDUISM + if = { + limit = { + has_character_modifier = bhakti_hinduism_ganga + } + remove_character_modifier = bhakti_hinduism_ganga + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_hinduism_saraswati + } + remove_character_modifier = bhakti_hinduism_saraswati + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_hinduism_kali + } + remove_character_modifier = bhakti_hinduism_kali + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_hinduism_kubera + } + remove_character_modifier = bhakti_hinduism_kubera + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_vaishnavism_lakishmi + } + remove_character_modifier = bhakti_vaishnavism_lakishmi + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_vaishnavism_jagganath + } + remove_character_modifier = bhakti_vaishnavism_jagganath + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_vaishnavism_hayagriva + } + remove_character_modifier = bhakti_vaishnavism_hayagriva + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_shaivism_parvati + } + remove_character_modifier = bhakti_shaivism_parvati + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_shaivism_virabhadra + } + remove_character_modifier = bhakti_shaivism_virabhadra + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_shaivism_munishwarar + } + remove_character_modifier = bhakti_shaivism_munishwarar + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_shaivism_dakshinamoorthy + } + remove_character_modifier = bhakti_shaivism_dakshinamoorthy + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_smartism_ganesha + } + remove_character_modifier = bhakti_smartism_ganesha + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_smartism_vishnu + } + remove_character_modifier = bhakti_smartism_vishnu + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_smartism_shiva + } + remove_character_modifier = bhakti_smartism_shiva + add_piety = replace_bhakti_piety_loss + } + # GERMANIC + else_if = { + limit = { + has_character_modifier = bhakti_germanic_generic_odin + } + remove_character_modifier = bhakti_germanic_generic_odin + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_germanic_not_danish_ullr + } + remove_character_modifier = bhakti_germanic_not_danish_ullr + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_germanic_danish_tyr + } + remove_character_modifier = bhakti_germanic_danish_tyr + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_germanic_generic_thor + } + remove_character_modifier = bhakti_germanic_generic_thor + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_germanic_generic_freyr + } + remove_character_modifier = bhakti_germanic_generic_freyr + add_piety = replace_bhakti_piety_loss + } + # BUDDHISM + else_if = { + limit = { + has_character_modifier = bhakti_buddhism_amitabha + } + remove_character_modifier = bhakti_buddhism_amitabha + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_buddhism_avalokiteshvara + } + remove_character_modifier = bhakti_buddhism_avalokiteshvara + add_piety = replace_bhakti_piety_loss + } + else_if = { + limit = { + has_character_modifier = bhakti_buddhism_bhaisajyaguru + } + remove_character_modifier = bhakti_buddhism_bhaisajyaguru + add_piety = replace_bhakti_piety_loss + } + else = { + # First personal devotion is spiritually fulfilling; swapping gods later is not + if = { + limit = { is_playable_character = yes } # Only playable characters have spiritual fulfillment + change_spiritual_fulfillment = minor_spiritual_fulfillment_value + } + add_piety = medium_piety_loss + } + + add_character_modifier = $BHAKTI$ +} + +force_create_head_of_faith_title_effect = { # Has no cost, should be done manually on a per-case basis + custom_description = { + text = create_temporal_head_of_faith + subject = root + object = scope:faith + # No scope:rite: creation events only check mainline rite from rite-scoped flows + # Temporal HoF + if = { + limit = { faith = { has_doctrine_parameter = temporal_head_of_faith } } + if = { + limit = { + faith = { NOT = { exists = religious_head_title } } + } + trigger_event = faith_creation.0001 # Creates new dynamic title + } + else = { trigger_event = faith_creation.0011 } # Re-uses existing title + } + + # Spiritual HoF + else_if = { + limit = { faith = { has_doctrine_parameter = spiritual_head_of_faith } } + if = { + limit = { + faith = { NOT = { exists = religious_head_title } } + } + trigger_event = faith_creation.0002 # Creates new dynamic title + } + else = { trigger_event = faith_creation.0012 } # Re-uses existing title + } + } + + # Send an informative message to all players about the new HoF + hidden_effect = { + save_scope_as = reformer + faith = { + save_scope_as = faith + change_fervor = { + value = major_fervor_gain + desc = fervor_gain_recreated_hof + } + } + every_player = { + if = { + limit = { faith = scope:faith } + trigger_event = { + id = faith_creation.1010 + days = 1 + } + } + else = { + trigger_event = { + id = faith_creation.1011 + days = 1 + } + } + } + } +} + +# Faith scope. A faith created by a rite diverging too far starts at 0 fervor - kindle it to the baseline. +diverged_faith_starting_fervor_effect = { + change_fervor = { + value = diverged_faith_starting_fervor_value + desc = fervor_gain_diverged_faith + } +} + +# Dynamic HoF title creation +set_up_dynamic_temporal_hof_title_effect = { + faith = { save_scope_as = my_faith } + create_dynamic_title = { + tier = duchy + name = REL_HEAD_TITLE_NAME + adj = REL_HEAD_TITLE_ADJ + } + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } + scope:new_title = { + set_destroy_if_invalid_heir = yes + set_no_automatic_claims = yes + set_definitive_form = yes + set_always_follows_primary_heir = yes + change_title_holder = { + holder = $NEW_HOLDER$ + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + faith = { set_religious_head_title = scope:new_title } + if = { + limit = { + NOT = { has_realm_law = same_faith_succession_law } + } + add_realm_law_skip_effects = same_faith_succession_law + } + scope:new_title = { + generate_coa = religious_title + add_title_law = temporal_head_of_faith_succession_law + } +} + +set_up_dynamic_spiritual_hof_title_effect = { + # Sort scopes & starting processes. + faith = { save_scope_as = my_faith } + $CREATOR$ = { save_scope_as = hof_creator } + create_dynamic_title = { + tier = duchy + name = REL_HEAD_TITLE_NAME + adj = REL_HEAD_TITLE_ADJ + } + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } + # Clergy take the title, while lay creators prefer clerical puppets over the realm priest + if = { + limit = { + scope:hof_creator = { is_clergy = yes } + } + scope:hof_creator = { save_scope_as = new_religious_head } + } + else_if = { + limit = { + scope:hof_creator.puppet:theological_agent_puppet ?= { + rite = scope:hof_creator.rite + } + } + scope:hof_creator.puppet:theological_agent_puppet = { + save_scope_as = new_religious_head + } + } + else_if = { + limit = { + scope:hof_creator.puppet:external_theological_agent_puppet ?= { + rite = scope:hof_creator.rite + } + } + scope:hof_creator.puppet:external_theological_agent_puppet = { + save_scope_as = new_religious_head + } + } + else_if = { + limit = { + scope:hof_creator.cp:councillor_court_chaplain ?= { + rite = scope:hof_creator.rite + } + } + scope:hof_creator.cp:councillor_court_chaplain = { + save_scope_as = new_religious_head + } + } + else_if = { + limit = { + any_theocratic_vassal = { faith = $CREATOR$.faith } + } + ordered_theocratic_vassal = { + limit = { faith = $CREATOR$.faith } + order_by = head_of_faith_selection_weight + save_scope_as = new_religious_head + } + } + else = { + create_character = { + location = $CREATOR$.capital_province + age = { 30 50 } + gender_female_chance = root_faith_clergy_gender_female_chance + trait = education_learning_4 + faith = $CREATOR$.faith + rite = $CREATOR$.rite + culture = $CREATOR$.culture + learning = { 14 22 } + save_scope_as = new_religious_head + } + } + # Try to land the new title. + scope:my_faith = { + random_holy_site_barony = { + # Prefer a capital that's under $CREATOR$. + limit = { county.holder = $CREATOR$ } + # Even if it's indirectly under $CREATOR$. + alternative_limit = { + county.holder = { target_is_liege_or_above = $CREATOR$ } + } + # Then go for any that's held by someone of the faith. + alternative_limit = { county.holder.faith = $CREATOR$.faith } + # Under *extreme* circumstances, pick any holy site with at least some faithful. + alternative_limit = { county.faith = $CREATOR$.faith } + # Ok, just pick any of them. We're out of options and we need _somewhere_. + alternative_limit = { always = yes } + save_scope_as = holy_site + } + } + if = { + limit = { exists = scope:holy_site } + scope:new_title = { set_capital_county = scope:holy_site.county } + } + # Configure final effects. + hidden_effect = { + scope:new_title = { + set_landless_title = yes + set_destroy_if_invalid_heir = yes + set_no_automatic_claims = yes + set_definitive_form = yes + set_always_follows_primary_heir = yes + change_title_holder = { + holder = scope:new_religious_head + change = scope:change + } + } + } + resolve_title_and_vassal_change = scope:change + faith = { set_religious_head_title = scope:new_title } + scope:new_title = { generate_coa = religious_title } + # The establishing rite becomes the mainline rite of the faith. + if = { + limit = { + scope:hof_creator = { + exists = rite + NOT = { rite = scope:my_faith.main_rite } + } + } + scope:hof_creator.rite = { set_main_rite = yes } + } + # We enclose the law safeguard in an if statement to prevent errors when this is only _about_ to be fired. + hidden_effect = { + if = { + limit = { exists = scope:new_religious_head } + scope:new_religious_head = { + if = { + limit = { + NOT = { has_realm_law = same_faith_theocratic_succession_law } + } + add_realm_law_skip_effects = same_faith_theocratic_succession_law + } + } + } + } +} + +# Excommunication management. +add_excommunication_tooltip_only_effect = { + show_as_tooltip = { + custom_tooltip = { + text = get_excommunicated_tt + add_trait = excommunicated + } + add_character_modifier = { # Minor negative modifier that stops us from immediately getting our excommunication recinded (so you have a guaranteed 'penance period'). + modifier = recent_excommunication + days = 365 + } + } +} +add_excommunication_actual_effect = { + custom_tooltip = { + text = get_excommunicated_tt + add_trait = excommunicated + } + add_character_modifier = { # Minor negative modifier that stops us from immediately getting our excommunication recinded (so you have a guaranteed 'penance period'). + modifier = recent_excommunication + days = 365 + } +} + +add_excommunication_actual_effect_5_years_version = { + custom_tooltip = { + text = get_excommunicated_tt + add_trait = excommunicated + } + add_character_modifier = { # Minor negative modifier that stops us from immediately getting our excommunication recinded (so you have a guaranteed 'penance period'). + modifier = recent_excommunication + years = 5 + } +} + +create_holy_order_neutral_effect = { + # Create a general Holy Order. + create_holy_order = { + leader = $LEADER$ + founder = $FOUNDER$ + random_holy_order_type = $ORDER_TYPE$ + capital = $CAPITAL$ + save_scope_as = $NEW_HO_SCOPE$ + } +} + +# Get random faith +get_random_faith_effect = { + if = { + limit = { $FORBIDROOTFAITH$ = yes } + random_religion_global = { + limit = { any_faith = { this != root.faith } } + random_faith = { + limit = { this != root.faith } + save_scope_as = random_faith + } + } + } + else = { + random_religion_global = { + random_faith = { save_scope_as = random_faith } + } + } +} + +set_up_dynamic_spiritual_hof_title_existing_hof_effect = { + + $RELIGIOUS_HEAD$ = { save_scope_as = new_religious_head } + + # Sort scopes & starting processes. + faith = { save_scope_as = my_faith } + create_dynamic_title = { + tier = duchy + name = REL_HEAD_TITLE_NAME + adj = REL_HEAD_TITLE_ADJ + } + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } + + # Nab a suitable character. + # The decision already chose one. + + # Try to land the new title. + scope:my_faith = { + random_holy_site_barony = { + limit = { county.holder = $CREATOR$ } + alternative_limit = { + county.holder = { target_is_liege_or_above = $CREATOR$ } + } + alternative_limit = { + county.holder = { + faith = $CREATOR$.faith + is_ai = yes + } + } + save_scope_as = holy_site + } + } + if = { + limit = { exists = scope:holy_site } + scope:new_title = { set_capital_county = scope:holy_site.county } + } + # Configure final effects. + hidden_effect = { + scope:new_title = { + set_landless_title = yes + set_destroy_if_invalid_heir = yes + set_no_automatic_claims = yes + set_definitive_form = yes + set_always_follows_primary_heir = yes + change_title_holder = { + holder = scope:new_religious_head + change = scope:change + } + } + } + resolve_title_and_vassal_change = scope:change + faith = { set_religious_head_title = scope:new_title } + scope:new_title = { generate_coa = religious_title } + # We enclose the law safeguard in an if statement to prevent errors when this is only _about_ to be fired. + hidden_effect = { + if = { + limit = { exists = scope:new_religious_head } + scope:new_religious_head = { + if = { + limit = { + NOT = { has_realm_law = same_faith_theocratic_succession_law } + } + add_realm_law_skip_effects = same_faith_theocratic_succession_law + } + } + } + } +} + +### SECRET FAITH ### + +# Openly convert +secret_faith_openly_convert_character = { + if = { + limit = { exists = secret_faith } + set_character_faith_with_conversion = secret_faith # Gets vassals too, if they like you enough + remove_character_secret_faith = yes + } +} + +# Openly convert all secret faith counties in your realm +secret_faith_openly_convert_all_in_realm = { + if = { + limit = { any_sub_realm_county = { has_variable = false_convert } } + save_scope_value_as = { # Keeping track how many counties convert + name = num_false_converts_counties + value = 0 + } + + every_sub_realm_county = { + limit = { has_variable = false_convert } + set_county_faith = var:false_convert # Convert them + remove_county_modifier = false_convert_modifier # Remove modifier too + remove_variable = false_convert # No longer mark them as converts + add_county_modifier = { # Everyone likes practicing their faith in the open! + modifier = relieved_cryptos_modifier + years = 25 + } + save_scope_value_as = { # Updating how many counties convert + name = num_false_converts_counties + value = { + value = scope:num_false_converts_counties + add = 1 + } + } + } + if = { # Include counties in the message if there are any + limit = { scope:num_false_converts_counties > 0 } + root = { # There is an edgecase where root has a link to realm, but is not a character themselves! + send_interface_message = { + type = event_religious_good_text + title = event_false_converts.t + desc = event_false_converts_plus_counties.desc + } + } + } + } +} + +# Openly convert all secret faith counties of your faith in your realm +secret_faith_openly_convert_all_in_realm_specific = { + if = { + limit = { + any_sub_realm_county = { + has_variable = false_convert + var:false_convert = root.faith + faith != root.faith # Discount them if they've already been switched by the conversion action. + } + } + + save_scope_value_as = { # Keeping track how many counties convert + name = num_false_converts_counties + value = 0 + } + + every_sub_realm_county = { + limit = { + has_variable = false_convert + var:false_convert = root.faith + faith != root.faith # Discount them if they've already been switched by the conversion action. + } + set_county_faith = var:false_convert # Change faith + remove_county_modifier = false_convert_modifier + remove_variable = false_convert # Cleanup + add_county_modifier = { # Everyone likes practicing their faith in the open! + modifier = relieved_cryptos_modifier + years = 25 + } + save_scope_value_as = { # Updating how many counties convert + name = num_false_converts_counties + value = { + value = scope:num_false_converts_counties + add = 1 + } + } + } + + if = { # Include counties in the message if there are any + limit = { scope:num_false_converts_counties > 0 } + root = { + send_interface_message = { + type = event_religious_good_text + title = event_false_converts.t + desc = event_false_converts_plus_counties.desc + } + } + } + } +} + +add_heresiarch_trait_effect = { # Flag is need to prevent trait being removed when gaining it close to conversion + add_character_flag = { + flag = new_heresiarch + days = 3 + } + if = { + limit = { + NOT = { has_trait = heresiarch } + } + add_trait = heresiarch + } +} + +self_mutilation_minor_piety_gain_effect = { + if = { + limit = { + has_personal_tenet_flag = self_mutilation_active + } + custom_tooltip = { + text = self_mutilation_minor_piety_gain_tt + add_piety = minor_piety_gain + } + } +} + +self_mutilation_medium_piety_gain_effect = { + if = { + limit = { + has_personal_tenet_flag = self_mutilation_active + } + custom_tooltip = { + text = self_mutilation_medium_piety_gain_tt + add_piety = medium_piety_gain + } + } +} + +self_mutilation_major_piety_gain_effect = { + if = { + limit = { + has_personal_tenet_flag = self_mutilation_active + } + custom_tooltip = { + text = self_mutilation_major_piety_gain_tt + add_piety = major_piety_gain + } + } +} + +remove_sinful_trait_effect = { + save_scope_as = trait_changer + random_character_trait = { + limit = { + scope:trait_changer.rite = { + trait_is_sin_rite = prev + } + } + save_scope_as = sinful_trait + } + remove_trait = scope:sinful_trait +} + +add_virtuous_trait_effect = { + save_scope_as = trait_changer + random_trait = { + limit = { + save_temporary_scope_as = temp_trait + scope:trait_changer.rite = { + trait_is_virtue_rite = prev + } + NOR = { + scope:trait_changer = { + has_trait = scope:temp_trait + } + any_opposite_trait = { + scope:trait_changer = { + has_trait = scope:temp_trait + } + } + } + trigger_if = { + limit = { + this = trait:lustful + } + scope:trait_changer = { + character_is_teen_or_older_trigger = yes + NOR = { + has_sexuality = none + has_sexuality = asexual + } + } + } + } + save_scope_as = virtuous_trait + } + add_trait_force_tooltip = scope:virtuous_trait +} + +replace_sinful_trait_effect = { + remove_sinful_trait_effect = yes + add_virtuous_trait_effect = yes +} + +# Called from Study Faith success outcomes. +discover_syncretism_tenet_effect = { + if = { + limit = { is_playable_character = yes } + if = { + limit = { + scope:target.religion = religion:christianity_religion + religion != religion:christianity_religion + NOT = { + knows_tenet = tenet_christian_syncretism + } + } + add_known_tenet = tenet_christian_syncretism + } + else_if = { + limit = { + scope:target.religion = religion:islam_religion + religion != religion:islam_religion + NOT = { + knows_tenet = tenet_islamic_syncretism + } + } + add_known_tenet = tenet_islamic_syncretism + } + else_if = { + limit = { + scope:target.religion = religion:judaism_religion + religion != religion:judaism_religion + NOT = { + knows_tenet = tenet_jewish_syncretism + } + } + add_known_tenet = tenet_jewish_syncretism + } + else_if = { + limit = { + scope:target.faith = { has_doctrine = eastern_hostility_doctrine } + faith = { + OR = { + has_doctrine = abrahamic_hostility_doctrine + has_doctrine = pagan_hostility_doctrine + has_doctrine = sinitic_hostility_doctrine + } + } + NOT = { knows_tenet = tenet_eastern_syncretism } + } + add_known_tenet = tenet_eastern_syncretism + } + else_if = { + limit = { + scope:target.faith = { has_doctrine = sinitic_hostility_doctrine } + faith = { + OR = { + has_doctrine = abrahamic_hostility_doctrine + has_doctrine = pagan_hostility_doctrine + has_doctrine = eastern_hostility_doctrine + } + } + NOT = { knows_tenet = tenet_sinitic_syncretism } + } + add_known_tenet = tenet_sinitic_syncretism + } + else_if = { + limit = { + scope:target.faith = { + OR = { + has_doctrine = unreformed_faith_doctrine + has_doctrine = west_african_unreformed_faith_doctrine + } + } + faith = { + NOT = { + has_doctrine = pagan_hostility_doctrine + } + } + NOT = { + knows_tenet = tenet_unreformed_syncretism + } + } + add_known_tenet = tenet_unreformed_syncretism + } + } +} + +# This effect sets per-faith Permitted / Prohibited tenet statuses on game start for faiths whose main rite intends a spiritual or temporal head of faith. +# Faith-core tenets that are also in the mainline rite are left alone. +# Faith-only tenets that the mainline rite drops are explicitly Permitted so they are approved rather than merely Known. + +setup_rite_tenet_permissions_effect = { + # Tenet statuses are set in history/faiths/.txt, one entry per date + # The history loader ignores DLC-locked and main-rite core tenets +} + +############################ +# Faith Rite Growth System # +############################ + +# Faith scope. Picks the largest rite to spawn within. +rite_growth_resolve_source_rite_effect = { + ordered_faith_rite = { + limit = { + rite_counties >= 1 + } + order_by = rite_counties + save_scope_as = source_rite + } +} + +# This needs faith scope and scope:source_rite, then we save the pick as scope:founder +rite_growth_pick_founder_effect = { + random_faith_ruler = { + limit = { # Archbishops that actually know shit + is_eligible_rite_growth_founder_trigger = yes + rite_growth_founder_is_well_versed_trigger = yes + OR = { + rite_growth_holds_sizable_clerical_region_trigger = yes # Is an Archbishop with a sizable see + exists = clerical_elector_title # Is a cardinal + } + } + alternative_limit = { # Archbishops making shit up + is_eligible_rite_growth_founder_trigger = yes + OR = { + rite_growth_holds_sizable_clerical_region_trigger = yes # Is an Archbishop with a sizable see + exists = clerical_elector_title # Is a cardinal + } + } + alternative_limit = { # Rulers that know shit + is_eligible_rite_growth_founder_trigger = yes + rite_growth_founder_is_well_versed_trigger = yes + } + alternative_limit = { # Rulers making shit up + is_eligible_rite_growth_founder_trigger = yes + } + + weight = { + base = 1 + # Tier weight - higher tier reaches more land. + modifier = { + add = 5 + highest_held_title_tier >= tier_kingdom + } + # In faiths with archbishops, prefer the archbishops themselves. + modifier = { + add = 50 + root = { has_doctrine_parameter = has_clerical_regions } + rite_growth_holds_sizable_clerical_region_trigger = yes + } + # An archbishop with a king inside an existing clerical region is the "perfect" candidate. + modifier = { + add = 100 + root = { has_doctrine_parameter = has_clerical_regions } + save_temporary_scope_as = ruler_check + any_held_title = { + has_clerical_region = yes + clerical_region_size >= rite_growth_min_clerical_region_size + any_ruler_in_clerical_region = { + faith = root + is_landed = yes + highest_held_title_tier = tier_kingdom + NOR = { + this = scope:ruler_check + has_trait = heresiarch + has_trait = herald + recently_converted_faith_trigger = yes + has_character_flag = recently_converted_by_rite_growth + this = faith.religious_head + rite.head_of_rite ?= this + } + NOT = { any_held_title = { has_clerical_region = yes } } + } + } + } + # No clerical regions: prefer founders amid a dense source-rite cluster + modifier = { + add = 25 + root = { NOT = { has_doctrine_parameter = has_clerical_regions } } + any_sub_realm_county = { + rite = scope:source_rite + count >= 10 + } + } + modifier = { + add = 15 + root = { NOT = { has_doctrine_parameter = has_clerical_regions } } + any_held_title = { + tier = tier_county + rite = scope:source_rite + count >= 3 + } + } + # Would come up with interesting new rites + modifier = { + add = 15 + OR = { + has_trait = eccentric + has_trait = possessed + has_trait = lunatic + } + } + # Theological fitness traits. + modifier = { + add = 10 + OR = { + has_trait = theologian + has_trait = lifestyle_scholar + has_trait = lifestyle_mystic + has_trait = devoted + } + } + modifier = { + factor = 2 + has_focus = learning_theology_focus + } + modifier = { + factor = 2 + has_trait = zealous + } + # Strong negative for those very loyal to the religious head + modifier = { + factor = 0 + # Headless faiths have nobody to be loyal to + exists = faith.religious_head + opinion = { + target = faith.religious_head + value >= 75 + } + } + # Within the clerical region of your head of faith + modifier = { + factor = 0 + exists = faith.religious_head.capital_county.clerical_region_title + capital_county.clerical_region_title ?= faith.religious_head.capital_county.clerical_region_title + } + } + + save_scope_as = founder + } +} + +rite_growth_create_rite_effect = { + create_dynamic_rite = { + save_scope_as = new_rite + convert = yes + target_divergence = $DIVERGENCE$ + include_unknown = $INCLUDE_UNKNOWN$ + override_tenets_first = $OVERRIDE_TENETS_FIRST$ + } +} + +# Requires scope:new_rite and pass founder, as the new rite has no counties for a Head of Rite fallback +# We leave include_unknown open because the founder's knowledge cannot cover the core tenets +rite_growth_spawn_doctrine_divergence_effect = { + if = { + limit = { exists = scope:new_rite } + scope:new_rite = { + change_rite_divergence = { + value = rite_growth_spawn_doctrine_divergence + override_tenets_first = no + include_unknown = yes + character = rite_founder + } + } + } +} + +rite_growth_convert_court_to_new_rite_effect = { + every_courtier_or_guest = { + limit = { + is_physically_able_ai = yes + rite = scope:source_rite + NOT = { has_character_flag = ai_will_not_convert } + } + set_character_rite = scope:new_rite + } + every_courtier_away = { + limit = { + is_physically_able_ai = yes + rite = scope:source_rite + NOT = { has_character_flag = ai_will_not_convert } + } + set_character_rite = scope:new_rite + } + every_pool_character = { + province = capital_province + limit = { + is_physically_able_ai = yes + rite = scope:source_rite + NOT = { has_character_flag = ai_will_not_convert } + } + set_character_rite = scope:new_rite + } +} + +rite_growth_resolve_differences_effect = { + clear_saved_scope = differing_tenet + clear_saved_scope = differing_doctrine + + # Lead with prohibited so the named tenet matches the widget highlight + scope:new_rite = { + random_rite_tenet = { + status = prohibited + limit = { rite_growth_tenet_is_unique_to_new_rite_trigger = yes } + save_scope_as = differing_tenet + } + if = { + limit = { NOT = { exists = scope:differing_tenet } } + random_rite_tenet = { + status = known + limit = { rite_growth_tenet_is_unique_to_new_rite_trigger = yes } + save_scope_as = differing_tenet + } + } + if = { + limit = { NOT = { exists = scope:differing_tenet } } + random_rite_tenet = { + limit = { rite_growth_tenet_is_unique_to_new_rite_trigger = yes } + save_scope_as = differing_tenet + } + } + } + + if = { + limit = { NOT = { exists = scope:differing_tenet } } + scope:founder = { + random_character_doctrine = { + limit = { rite_growth_doctrine_is_unique_to_new_rite_trigger = yes } + save_scope_as = differing_doctrine + } + } + } +} + +# Character scope (an AI ruler being swept into the new rite by rite_growth.0011). +rite_growth_convert_ruler_to_new_rite_effect = { + if = { + limit = { rite != scope:new_rite } + set_character_rite_with_conversion = scope:new_rite + } + every_held_title = { + limit = { + tier = tier_county + rite = scope:source_rite + } + set_county_rite = scope:new_rite + } + # The conversion above can cost the ruler their life + if = { + limit = { is_alive = yes } + add_character_flag = { + flag = recently_converted_by_rite_growth + years = 10 + } + rite_growth_convert_court_to_new_rite_effect = yes + } + if = { + limit = { any_held_title = { has_clerical_region = yes } } + every_held_title = { + limit = { has_clerical_region = yes } + save_temporary_scope_as = title_check + every_county_in_clerical_region = { + limit = { + rite = scope:source_rite + OR = { + this = scope:title_check.title_capital_county + any_neighboring_county = { + this = scope:title_check.title_capital_county + } + } + } + set_county_rite = scope:new_rite + holder = { + if = { + limit = { is_eligible_rite_growth_target_trigger = yes } + rite_growth_convert_ruler_to_new_rite_effect = yes + } + } + } + } + } +} + +# $HOLY_SITE$ is the holy site to elevate, and this is faith scope +elevate_holy_site_effect = { + if = { + limit = { + can_elevate_holy_site = $HOLY_SITE$ + } + elevate_holy_site = $HOLY_SITE$ + } +} + +# Demotion takes $HOLY_SITE$ as the holy site, and this runs on the faith +# An eminent site becomes regular, and a regular site is removed from the faith +demote_holy_site_effect = { + if = { + limit = { + can_demote_holy_site = $HOLY_SITE$ + } + demote_holy_site = $HOLY_SITE$ + } +} + +# After the cost is already waived, a decision effect runs this on the faith +consume_free_holy_site_action_effect = { + if = { + limit = { faith_has_free_holy_site_action_trigger = yes } + change_variable = { + name = free_holy_site_actions + subtract = 1 + } + } +} + +# Faith scope. BARONY = the holy site's barony title. +# Records the de jure kingdom so the faith cannot place a second created or adopted holy site in it. +record_dynamic_holy_site_kingdom_effect = { + if = { + limit = { + exists = $BARONY$.kingdom + # Idempotent: the same kingdom can be recorded from more than one path. + faith_holy_site_kingdom_unused_trigger = { BARONY = $BARONY$ } + } + add_to_variable_list = { + name = dynamic_holy_site_kingdoms + target = $BARONY$.kingdom + } + } +} + +# Faith scope. BARONY = the barony of the holy site that was just removed. +# Frees the kingdom again once the faith has no holy site left anywhere in it. +release_dynamic_holy_site_kingdom_effect = { + if = { + limit = { + has_variable_list = dynamic_holy_site_kingdoms + exists = $BARONY$.kingdom + } + $BARONY$.kingdom = { + save_temporary_scope_as = released_holy_site_kingdom + } + if = { + limit = { + is_target_in_variable_list = { + name = dynamic_holy_site_kingdoms + target = scope:released_holy_site_kingdom + } + NOT = { + any_holy_site = { + holy_site_barony.kingdom ?= scope:released_holy_site_kingdom + } + } + } + remove_list_variable = { + name = dynamic_holy_site_kingdoms + target = scope:released_holy_site_kingdom + } + } + } +} + +# Province scope, $FAITH$ = faith, used at start and on new holy-site creation +add_holy_site_fallback_special_building_slot_effect = { + if = { + limit = { + has_special_building_slot = no + } + if = { + limit = { $FAITH$ = { religion = religion:islam_religion } } + add_special_building_slot = holy_site_mosque_01 + } + else_if = { + limit = { $FAITH$ = { religion = religion:christianity_religion } } + add_special_building_slot = holy_site_cathedral_01 + } + else_if = { + limit = { $FAITH$ = { religion = religion:zoroastrianism_religion } } + add_special_building_slot = holy_site_fire_temple_01 + } + else_if = { + limit = { $FAITH$ = { religion = religion:buddhism_religion } } + add_special_building_slot = holy_site_buddhist_grand_temple_01 + } + else_if = { + limit = { $FAITH$ = { religion = religion:shintoism_religion } } + add_special_building_slot = holy_site_japanese_temple_01 + } + else_if = { + limit = { + $FAITH$ = { + OR = { + religion = religion:taoism_religion + religion = religion:confucianism_religion + } + } + } + add_special_building_slot = holy_site_chinese_temple_01 + } + else_if = { + limit = { + $FAITH$ = { + religion = { + OR = { + this = religion:hinduism_religion + this = religion:jainism_religion + this = religion:tani_religion + this = religion:bon_religion + } + } + } + } + add_special_building_slot = holy_site_indian_grand_temple_01 + } + else_if = { + limit = { + $FAITH$ = { + religion = { + OR = { + this = religion:satsana_phi_religion + this = religion:dayawism_religion + this = religion:hantuism_religion + this = religion:kaharingan_religion + this = religion:tolotang_religion + this = religion:aluk_religion + this = religion:dab_qhuas_religion + this = religion:biliku_religion + } + } + } + } + add_special_building_slot = holy_site_se_asia_pagan_temple_01 + } + else_if = { + limit = { $FAITH$ = { religion = { is_in_family = rf_pagan } } } + add_special_building_slot = holy_site_pagan_grand_temple_01 + } + else = { + add_special_building_slot = holy_site_other_grand_temple_01 + } + } +} + +# on_faith_holy_site_* provides holy_site, title, and actor +# $MESSAGE$ and $MESSAGE_BY_ACTOR$ are the loc keys +# Toast only reaches the local player +# Loc keys must be lowercase +notify_faith_of_holy_site_change_effect = { + save_temporary_scope_as = notified_faith + every_player = { + limit = { faith = scope:notified_faith } + if = { + limit = { exists = scope:actor } + send_interface_toast = { + type = $MESSAGE_BY_ACTOR$ + left_icon = scope:actor + right_icon = scope:title + localization_values = { + notified_faith = scope:notified_faith + changed_holy_site = scope:holy_site + holy_site_actor = scope:actor + } + } + } + else = { + send_interface_toast = { + type = $MESSAGE$ + left_icon = scope:notified_faith + right_icon = scope:title + localization_values = { + notified_faith = scope:notified_faith + changed_holy_site = scope:holy_site + } + } + } + } +} + +# Called from on_rite_change, which fires for any faith or rite change. Character scope +create_conversion_memory_effect = { + if = { + limit = { + exists = scope:old_rite + scope:old_rite != rite # A rite that diverged into its own faith keeps its object; nobody converted + NOT = { has_character_flag = conversion_memory_recently_created } + } + save_temporary_scope_as = conversion_memory_owner + add_character_flag = { # The conversion window fires on_rite_change twice for a same-faith switch + flag = conversion_memory_recently_created + days = 2 + } + if = { + limit = { + exists = scope:old_faith + scope:old_faith != faith + } + create_character_memory = { type = converted_faith_memory } + scope:new_memory = { + set_variable = { + name = old_faith + value = scope:old_faith + } + set_variable = { + name = new_faith + value = scope:conversion_memory_owner.faith + } + set_variable = { + name = new_rite + value = scope:conversion_memory_owner.rite + } + } + } + else = { + create_character_memory = { type = converted_rite_memory } + scope:new_memory = { + set_variable = { + name = old_rite + value = scope:old_rite + } + set_variable = { + name = new_rite + value = scope:conversion_memory_owner.rite + } + } + } + if = { + limit = { is_adult = no } + scope:new_memory = { set_variable = childhood_memory } + } + } +} diff --git a/history/characters/NEOW_holy_orders.txt b/history/characters/NEOW_holy_orders.txt index a8055d343..5f534452f 100644 --- a/history/characters/NEOW_holy_orders.txt +++ b/history/characters/NEOW_holy_orders.txt @@ -3,14 +3,9 @@ militantholyorder01 ={ name="Karl" rite = teutonic_rite culture=bavarian + trait = devoted 2506.1.1={ birth=yes - effect - { - set_variable = { - name = militantholyorder01_game_start_founder - days = 10 - } - } } 2560.1.1={ death=yes @@ -20,14 +15,9 @@ militantholyorder02 ={ name="Riccardo" rite = roman_rite culture=tuscan + trait = devoted 2509.1.1={ birth=yes - effect - { - set_variable = { - name = militantholyorder02_game_start_founder - days = 10 - } - } } 2560.1.1={ death=yes @@ -37,14 +27,9 @@ militantholyorder03 ={ name="Gabriéil" rite = celtic_rite culture=high_irish + trait = devoted 2507.1.1={ birth=yes - effect - { - set_variable = { - name = militantholyorder03_game_start_founder - days = 10 - } - } } 2560.1.1={ death=yes @@ -54,14 +39,9 @@ contemplativeholyorder01 ={ name="Rudolf" rite = teutonic_rite culture=bavarian + trait = devoted 2501.1.1={ birth=yes - effect - { - set_variable = { - name = contemplativeholyorder01_game_start_founder - days = 10 - } - } } 2560.1.1={ death=yes @@ -71,14 +51,9 @@ contemplativeholyorder02 ={ name="Luca" rite = roman_rite culture=tuscan + trait = devoted 2505.1.1={ birth=yes - effect - { - set_variable = { - name = contemplativeholyorder02_game_start_founder - days = 10 - } - } } 2560.1.1={ death=yes @@ -88,14 +63,9 @@ contemplativeholyorder03 ={ name="Eoin" rite = celtic_rite culture=high_irish + trait = devoted 2508.1.1={ birth=yes - effect - { - set_variable = { - name = contemplativeholyorder03_game_start_founder - days = 10 - } - } } 2560.1.1={ death=yes diff --git a/history/provinces/e_britannia.txt b/history/provinces/e_britannia.txt index abb799d19..256442d18 100644 --- a/history/provinces/e_britannia.txt +++ b/history/provinces/e_britannia.txt @@ -1429,7 +1429,7 @@ holding = city_holding } 30 = { - holding = none + holding = castle_holding } ###c_oriel 18 = { diff --git a/history/titles/NEOW_other_titles.txt b/history/titles/NEOW_other_titles.txt index d819ffb40..39c29548d 100644 --- a/history/titles/NEOW_other_titles.txt +++ b/history/titles/NEOW_other_titles.txt @@ -767,64 +767,3 @@ c_claim_rome = { holder = nistria0002 } } - -d_teutonic_order = { - 2555.1.1 = { - holder = militantholyorder01 - } -} -d_contemplative_teutonic_order = { - 2555.1.1 = { - holder = contemplativeholyorder01 - } -} -d_knights_hospitaller = { - 2555.1.1 = { - holder = militantholyorder02 - } -} -d_contemplative_hospitaller_johannics = { - 2555.1.1 = { - holder = contemplativeholyorder02 - } -} -d_knights_of_st_lazarus = { - 2555.1.1 = { - holder = militantholyorder03 - } -} -d_contemplative_hospitaller_lazareans = { - 2555.1.1 = { - holder = contemplativeholyorder03 - } -} -b_bruck = { - 2555.1.1 = { - holder = contemplativeholyorder01 - } -} -b_floridsdorf = { - 2555.1.1 = { - holder = militantholyorder01 - } -} -b_balrothery = { - 2555.1.1 = { - holder = militantholyorder03 - } -} -b_da_chainoc = { - 2555.1.1 = { - holder = contemplativeholyorder03 - } -} -b_palo = { - 2555.1.1 = { - holder = contemplativeholyorder02 - } -} -b_gubbio = { - 2555.1.1 = { - holder = militantholyorder02 - } -} \ No newline at end of file diff --git a/localization/english/replace/zz_NEOW_titles_l_english.yml b/localization/english/replace/zz_NEOW_titles_l_english.yml index d0091e398..b37d90b4a 100644 --- a/localization/english/replace/zz_NEOW_titles_l_english.yml +++ b/localization/english/replace/zz_NEOW_titles_l_english.yml @@ -30,6 +30,12 @@ d_contemplative_hospitaller_lazareans_article: "$d_cistercians_article$" d_contemplative_hospitaller_lazareans: "Order Contemplative of St.Lazarus" d_contemplative_hospitaller_lazareans_adj: "Lazarist" + contemplative_hospitaller_johannics: "Order Contemplative of St.John" + contemplative_hospitaller_lazareans: "Order Contemplative of St.Lazarus" + contemplative_teutonic_order:0 "Order Contemplative of St.Mary" + holy_order_knights_of_st_lazarus: "Order Militant of St.Lazarus" + holy_order_knights_hospitaller: "Order Militant of St.John" + holy_order_teutonic_order:0 "Order Militant of St.Mary" #### Britannia e_britannia:0 "Great Britain" @@ -17112,14 +17118,6 @@ d_kirkuk:0 "Kirkuk" d_kirkuk_adj:0 "Kirkukian" d_kirman:0 "Kirman" - d_knights_calatrava:0 "Knights of Calatrava" - d_knights_calatrava_adj:0 "Calatrava" - d_knights_hospitaler:0 "Knights Hospitaller" - d_knights_hospitaler_adj:0 "Hospitaller" - d_knights_santiago:0 "Knights of Santiago" - d_knights_santiago_adj:0 "Santiago" - d_knights_templar:0 "Knights Templar" - d_knights_templar_adj:0 "Templar" d_taborites:0 "Taborites" d_taborites_adj:0 "Taborite" d_taborites:0 "Orebites" @@ -17521,8 +17519,6 @@ d_tengri_pagan_reformed_article:0 "the " d_tengri_pagan_reformed:0 "Tengri Church" d_tengri_pagan_reformed_adj:0 "Tengri" - d_teutonic_order:0 "Teutonic Order" - d_teutonic_order_adj:0 "Teutonic" d_thessalonika:0 "Thessalonika" d_thessalonika_adj:0 "Thessalonikan" d_thessaly:0 "Thessali"