From 8d9f3e717d7b103a21702cc1b28aa0813ee72b85 Mon Sep 17 00:00:00 2001 From: Greekman Date: Fri, 4 Dec 2026 16:24:49 +0000 Subject: [PATCH] slopfixholystiyeandinteraction --- .../00_historical_artifacts_templates.txt | 46 +- .../00_prison_interactions.txt | 25 +- .../00_religious_interactions.txt | 179 ++-- .../pam_interactions.txt | 260 +----- common/on_action/game_start.txt | 4 +- ...01_ep1_court_artifact_creation_effects.txt | 6 +- .../02_starting_holy_site_relics_effects.txt | 779 ++++++++++-------- .../pam_scripted_triggers.txt | 23 +- .../artifacts/historical_artifacts_events.txt | 89 +- 9 files changed, 605 insertions(+), 806 deletions(-) diff --git a/common/artifacts/templates/00_historical_artifacts_templates.txt b/common/artifacts/templates/00_historical_artifacts_templates.txt index 9ffdae92f..924b5407d 100644 --- a/common/artifacts/templates/00_historical_artifacts_templates.txt +++ b/common/artifacts/templates/00_historical_artifacts_templates.txt @@ -15,7 +15,7 @@ is_holy_relic = { OR = { religion = religion:judaism_religion - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -214,7 +214,7 @@ david_harp_template = { is_holy_relic = { OR = { religion = religion:judaism_religion - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -255,7 +255,7 @@ crown_iron_template = { is_holy_relic = { OR = { - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -350,7 +350,7 @@ throne_solomon_template = { is_holy_relic = { OR = { religion = religion:judaism_religion - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -450,7 +450,7 @@ edessa_template = { is_holy_relic = { OR = { - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -545,7 +545,7 @@ christian_artifact_template = { is_holy_relic = { OR = { - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -688,12 +688,12 @@ branch_germanic_template = { # can this character benefit from the full modifiers of the artifact? can_benefit = { - has_religion = religion:germanic_religion + has_religion = religion:folk_germanic_religion } is_holy_relic = { OR = { - religion = religion:germanic_religion + religion = religion:folk_germanic_religion main_rite = { rite_has_parameter = unreformed_syncretic_actor } } } @@ -713,12 +713,12 @@ branch_slavic_template = { # can this character benefit from the full modifiers of the artifact? can_benefit = { - has_religion = religion:slavic_religion + has_religion = religion:folk_slavic_religion } is_holy_relic = { OR = { - religion = religion:slavic_religion + religion = religion:folk_slavic_religion main_rite = { rite_has_parameter = unreformed_syncretic_actor } } } @@ -788,12 +788,12 @@ relic_finno_ugric_template = { # can this character benefit from the full modifiers of the artifact? can_benefit = { - has_religion = religion:finno_ugric_religion + has_religion = religion:uralic_religion } is_holy_relic = { OR = { - religion = religion:finno_ugric_religion + religion = religion:uralic_religion main_rite = { rite_has_parameter = unreformed_syncretic_actor } } } @@ -838,12 +838,8 @@ branch_general_template = { # can this character benefit from the full modifiers of the artifact? can_benefit = { - trigger_if = { - limit = { - scope:artifact = { exists = var:relic_religion } - } - has_religion = scope:artifact.var:relic_religion - } + scope:artifact = { exists = var:relic_religion } + has_religion = scope:artifact.var:relic_religion } is_holy_relic = { @@ -873,7 +869,7 @@ cross_template = { is_holy_relic = { OR = { - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -898,7 +894,7 @@ christian_relic_template = { is_holy_relic = { OR = { - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -1038,7 +1034,7 @@ saintly_bones_template = { is_holy_relic = { scope:artifact = { has_variable = saint_bone_faith } OR = { - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -1117,7 +1113,7 @@ fp2_chalice_dona_urraca_template = { is_holy_relic = { OR = { - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -1182,7 +1178,7 @@ fp2_santiago_bells_template = { is_holy_relic = { OR = { - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -1218,7 +1214,7 @@ crown_christian_relic_template = { is_holy_relic = { OR = { - religion = religion:christianity_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:eastern_orthodox_religion @@ -1235,7 +1231,7 @@ crown_christian_relic_template = { # Manuscripts, icons and other holy relics reserved for the Orthodox Church. neow_orthodox_holy_relic_template = { can_equip = { always = yes } - can_benefit = { religion = religion:eastern_orthodox_religion } + can_benefit = { has_religion = religion:eastern_orthodox_religion } is_holy_relic = { religion = religion:eastern_orthodox_religion } fallback = { court_grandeur_baseline_add = 2 } unique = yes diff --git a/common/character_interactions/00_prison_interactions.txt b/common/character_interactions/00_prison_interactions.txt index 6f1aa8bf2..890ab822c 100644 --- a/common/character_interactions/00_prison_interactions.txt +++ b/common/character_interactions/00_prison_interactions.txt @@ -2653,8 +2653,8 @@ pay_ransom_interaction = { } } cannot_release_former_regent_whilst_old_regent_holds_power_trigger = { - PRISONER = scope:recipient - REGENT = scope:recipient.var:imprisoned_by_diarch + PRISONER = scope:secondary_recipient + REGENT = scope:secondary_recipient.var:imprisoned_by_diarch } } @@ -3105,6 +3105,12 @@ pay_ransom_interaction = { LIFTER = scope:puppet_or_actor } } + is_valid = { + can_lift_excommunication_interaction_trigger = { + EXCOMMUNICATED = scope:recipient + LIFTER = scope:puppet_or_actor + } + } flag = excommunication localization = RANSOM_EXCOMMUNICATION_OPTION } @@ -4006,6 +4012,12 @@ ransom_me_interaction = { LIFTER = scope:puppet_or_actor } } + is_valid = { + can_lift_excommunication_interaction_trigger = { + EXCOMMUNICATED = scope:recipient + LIFTER = scope:puppet_or_actor + } + } flag = excommunication localization = "RANSOM_EXCOMMUNICATION_OPTION" } @@ -5124,9 +5136,10 @@ release_from_prison_interaction = { if = { limit = { scope:excommunication = yes + scope:puppet_or_actor = { has_trait = excommunicated } } lift_character_excommunication_effect = { - TARGET_CHARACTER = scope:actor + TARGET_CHARACTER = scope:puppet_or_actor REQUESTING_CHARACTER = scope:recipient } } @@ -6186,6 +6199,12 @@ release_from_prison_interaction = { LIFTER = scope:recipient } } + is_valid = { + can_lift_excommunication_interaction_trigger = { + EXCOMMUNICATED = scope:puppet_or_actor + LIFTER = scope:recipient + } + } } cost = { diff --git a/common/character_interactions/00_religious_interactions.txt b/common/character_interactions/00_religious_interactions.txt index fed44f0e0..fd5a92e40 100644 --- a/common/character_interactions/00_religious_interactions.txt +++ b/common/character_interactions/00_religious_interactions.txt @@ -2889,6 +2889,8 @@ declaration_of_repentance_interaction = { } is_valid_showing_failures_only = { + scope:puppet_or_actor = { has_trait = excommunicated } + scope:recipient = { faith = scope:puppet_or_actor.faith } scope:puppet_or_actor ?= { trigger_if = { limit = { @@ -3128,29 +3130,32 @@ declaration_of_repentance_interaction = { ai_max_reply_days = 5 on_accept = { - declaration_of_repentance_interaction_effect = yes + if = { + limit = { scope:puppet_or_actor = { has_trait = excommunicated } } + declaration_of_repentance_interaction_effect = yes - scope:puppet_or_actor = { - #Letter event to inform character that their excommunication has been lifted. - trigger_event = { - id = religious_interaction.1024 + scope:puppet_or_actor = { + #Letter event to inform character that their excommunication has been lifted. + trigger_event = { + id = religious_interaction.1024 + } } - } - non_pope_lifting_excommunication_penalty_effect = yes + non_pope_lifting_excommunication_penalty_effect = yes - pam_offer_pilgrimage_effect = { - ACTOR = scope:puppet_or_actor - CLERIC = scope:recipient - } + pam_offer_pilgrimage_effect = { + ACTOR = scope:puppet_or_actor + CLERIC = scope:recipient + } - # If we're a clan this interaction affects unity - add_house_unity_interaction_effect = { - CHARACTER = scope:puppet_or_actor - TARGET = scope:recipient - VALUE = medium_unity_gain - DESC = clan_unity_repentance.desc - REVERSE_NON_HOUSE_TARGET = no + # If we're a clan this interaction affects unity + add_house_unity_interaction_effect = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_repentance.desc + REVERSE_NON_HOUSE_TARGET = no + } } } @@ -3516,7 +3521,10 @@ lift_excommunication_interaction = { is_valid_showing_failures_only = { scope:puppet_or_actor = { trigger_if = { - limit = { scope:is_puppet_action ?= yes } + limit = { + scope:is_puppet_action ?= yes + NOT = { scope:offer_pilgrimage ?= yes } + } piety >= lift_excommunication_interaction_cost_value } highest_held_title_tier >= tier_duchy @@ -3528,8 +3536,9 @@ lift_excommunication_interaction = { } } } - scope:recipient = { - pam_valid_excommunication_target_trigger = { EXCOMMUNICATOR = scope:puppet_or_actor } + can_lift_excommunication_interaction_trigger = { + EXCOMMUNICATED = scope:recipient + LIFTER = scope:puppet_or_actor } } @@ -3589,73 +3598,81 @@ lift_excommunication_interaction = { } on_accept = { - scope:recipient = { - if = { - limit = { scope:excommunication_demand_gold = yes } - pay_short_term_gold = { - gold = major_gold_value - target = scope:actor - } - } - if = { - limit = { scope:excommunication_demand_hook = yes } - scope:actor = { - add_hook = { - type = indebted_hook - target = scope:recipient - } - } - } - if = { - limit = { scope:offer_pilgrimage = yes } - pam_offer_pilgrimage_effect = { - ACTOR = scope:recipient - CLERIC = scope:actor - } - } - } if = { - limit = { scope:is_puppet_action ?= yes } - scope:puppet_or_actor = { - add_piety = { - value = { - value = lift_excommunication_interaction_cost_value - max = piety - multiply = -1 - } - } + limit = { + scope:recipient = { has_trait = excommunicated } } - } - lift_character_excommunication_effect = { - TARGET_CHARACTER = scope:recipient - REQUESTING_CHARACTER = scope:puppet_or_actor - } - scope:puppet_or_actor = { - if = { - limit = { - NOT = { this = scope:recipient } - any_character_situation = { situation_type = the_christian_church } - situation:the_christian_church ?= { situation_top_has_catalyst = catalyst_lift_excommunication } + scope:recipient = { + if = { + limit = { scope:excommunication_demand_gold = yes } + pay_short_term_gold = { + gold = major_gold_value + target = scope:actor + } } if = { - limit = { - scope:recipient = { highest_held_title_tier >= tier_kingdom } + limit = { scope:excommunication_demand_hook = yes } + scope:actor = { + add_hook = { + type = indebted_hook + target = scope:recipient + } } - situation:the_christian_church = { trigger_situation_catalyst = catalyst_lift_excommunication } } - else = { - situation:the_christian_church = { trigger_situation_catalyst = catalyst_lift_excommunication_minor } + if = { + limit = { scope:offer_pilgrimage = yes } + pam_offer_pilgrimage_effect = { + ACTOR = scope:recipient + CLERIC = scope:actor + } + } + } + if = { + limit = { + scope:is_puppet_action ?= yes + NOT = { scope:offer_pilgrimage ?= yes } + } + scope:puppet_or_actor = { + add_piety = { + value = { + value = lift_excommunication_interaction_cost_value + max = piety + multiply = -1 + } + } + } + } + lift_character_excommunication_effect = { + TARGET_CHARACTER = scope:recipient + REQUESTING_CHARACTER = scope:puppet_or_actor + } + scope:puppet_or_actor = { + if = { + limit = { + NOT = { this = scope:recipient } + any_character_situation = { situation_type = the_christian_church } + situation:the_christian_church ?= { situation_top_has_catalyst = catalyst_lift_excommunication } + } + if = { + limit = { + scope:recipient = { highest_held_title_tier >= tier_kingdom } + } + situation:the_christian_church = { trigger_situation_catalyst = catalyst_lift_excommunication } + } + else = { + situation:the_christian_church = { trigger_situation_catalyst = catalyst_lift_excommunication_minor } + } } } - } - # If we're a clan this interaction affects unity - add_house_unity_interaction_effect = { - CHARACTER = scope:puppet_or_actor - TARGET = scope:recipient - VALUE = medium_unity_gain - DESC = clan_unity_excommunication_lifted - REVERSE_NON_HOUSE_TARGET = no + # If we're a clan this interaction affects unity + add_house_unity_interaction_effect = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient + VALUE = medium_unity_gain + DESC = clan_unity_excommunication_lifted + REVERSE_NON_HOUSE_TARGET = no + } } } @@ -6575,10 +6592,6 @@ temporal_condemnation_interaction = { category = interaction_category_religion desc = { first_valid = { - triggered_desc = { - trigger = { scope:puppet_or_actor.faith = faith:quranist } - desc = temporal_condemnation_interaction_desc_fasiq - } desc = temporal_condemnation_interaction_desc } } diff --git a/common/character_interactions/pam_interactions.txt b/common/character_interactions/pam_interactions.txt index 1ed0e250b..785100d7e 100644 --- a/common/character_interactions/pam_interactions.txt +++ b/common/character_interactions/pam_interactions.txt @@ -2686,7 +2686,7 @@ request_realm_priest_replacement_interaction = { # Catalysts if = { limit = { - scope:actor.religion = religion:christianity_religion + scope:actor = { is_christian_trigger = yes } # Only rulers actually taking part in the situation can move it scope:actor = { exists = top_participant_group:the_christian_church } situation:the_christian_church ?= { situation_top_has_catalyst = catalyst_the_christian_church_requested_realm_priest_replacement } @@ -3712,7 +3712,7 @@ sway_vassal_to_my_rite_interaction = { } modifier = { # More likely to happen during Instability add = 15 - scope:puppet_or_actor.religion = religion:christianity_religion + scope:puppet_or_actor = { is_christian_trigger = yes } situation:the_christian_church ?= { has_situation_top_phase_parameter = the_christian_church_easier_sway_to_rite } @@ -4315,7 +4315,7 @@ sway_ruler_to_my_rite_interaction = { } modifier = { # More likely to happen during Instability add = 15 - scope:puppet_or_actor.religion = religion:christianity_religion + scope:puppet_or_actor = { is_christian_trigger = yes } situation:the_christian_church ?= { has_situation_top_phase_parameter = the_christian_church_easier_sway_to_rite } @@ -4481,238 +4481,9 @@ convert_on_reform_interaction = { pam_sway_schism_stance_interaction = { category = interaction_category_religion icon = religious - interface_priority = 44 - - use_diplomatic_range = yes - ai_maybe = yes - ai_min_reply_days = 1 - ai_max_reply_days = 5 - desc = pam_sway_schism_stance_interaction_desc - - is_available = { - trigger_if = { - limit = { is_ai = yes } - has_variable = pam_schism_stance - NOT = { has_global_variable = pam_great_schism_decision_taken } - is_adult = yes - is_incapable = no - } - } - - is_shown = { - NOT = { has_global_variable = pam_great_schism_decision_taken } - scope:actor = { - pam_can_pick_great_schism_stance_trigger = yes - } - scope:recipient = { - exists = top_participant_group:the_christian_church - faith.religion ?= religion:christianity_religion - is_ruler = yes - is_ai = yes - } - } - - cooldown_against_recipient = { years = 2 } - - is_valid_showing_failures_only = { - scope:actor = { - NOR = { - is_at_war_with = scope:recipient - has_trait = incapable - is_adult = no - } - custom_tooltip = { - text = pam_sway_schism_stance_no_stance_tt - has_variable = pam_schism_stance - } - } - scope:recipient = { - NOR = { - is_adult = no - has_trait = incapable - } - trigger_if = { - limit = { scope:actor = { has_variable = pam_schism_stance } } - custom_tooltip = { - text = pam_sway_schism_stance_already_aligned_tt - NOT = { var:pam_schism_stance ?= scope:actor.var:pam_schism_stance } - } - } - } - } - - on_accept = { - scope:actor = { - send_interface_toast = { - type = event_toast_effect_good - title = pam_sway_schism_stance_interaction_toast - left_icon = scope:actor - right_icon = scope:recipient - scope:recipient = { - if = { - limit = { scope:actor.var:pam_schism_stance ?= flag:mainline } - custom_tooltip = pam_sway_schism_stance_mainline_tt - } - else_if = { - limit = { scope:actor.var:pam_schism_stance ?= flag:competitor } - custom_tooltip = pam_sway_schism_stance_competitor_tt - } - else = { - custom_tooltip = pam_sway_schism_stance_no_schism_tt - } - set_variable = { - name = pam_schism_stance - value = scope:actor.var:pam_schism_stance - } - add_opinion = { - target = scope:actor - modifier = pious_opinion - opinion = 10 - } - } - } - } - } - - on_decline = { - scope:actor = { - send_interface_toast = { - type = event_toast_effect_bad - title = pam_sway_schism_stance_interaction_decline_toast - right_icon = scope:recipient - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = annoyed_opinion - opinion = -10 - } - } - } - } - } - - ai_accept = { - base = -10 - opinion_modifier = { - who = scope:recipient - opinion_target = scope:actor - multiplier = 1.0 - desc = AI_OPINION_REASON - } - modifier = { # Proposed stance favors the recipient's own rite - add = 50 - desc = pam_sway_schism_stance_aligned_reason - OR = { - AND = { - scope:actor.var:pam_schism_stance ?= flag:mainline - scope:recipient.rite = faith:christian_faith.main_rite - } - AND = { - scope:actor.var:pam_schism_stance ?= flag:competitor - NOT = { scope:recipient.rite = faith:christian_faith.main_rite } - } - } - } - modifier = { # Proposed stance turns the recipient against their own rite - add = -50 - desc = pam_sway_schism_stance_opposed_reason - OR = { - AND = { - scope:actor.var:pam_schism_stance ?= flag:mainline - NOT = { scope:recipient.rite = faith:christian_faith.main_rite } - } - AND = { - scope:actor.var:pam_schism_stance ?= flag:competitor - scope:recipient.rite = faith:christian_faith.main_rite - } - } - } - modifier = { # Heads of Faith or Rite are much harder to sway - add = -50 - desc = pam_sway_schism_stance_religious_head_reason - scope:recipient = { - OR = { - religious_head_or_challenger ?= this - rite.head_of_rite ?= this - } - } - } - modifier = { # Recipient's personal tenets belong to the rite the actor's stance champions - add = 20 - desc = pam_sway_schism_stance_tenet_aligned_reason - OR = { - AND = { - scope:actor = { pam_schism_stance_supports_rite_trigger = { RITE = byzantine_rite OTHER_RITE = roman_rite } } - scope:recipient = { pam_has_personal_tenet_of_rite_trigger = { RITE = byzantine_rite } } - } - AND = { - scope:actor = { pam_schism_stance_supports_rite_trigger = { RITE = roman_rite OTHER_RITE = byzantine_rite } } - scope:recipient = { pam_has_personal_tenet_of_rite_trigger = { RITE = roman_rite } } - } - } - } - modifier = { # Recipient's personal tenets belong to a rite the actor's stance does not champion - add = -20 - desc = pam_sway_schism_stance_tenet_opposed_reason - OR = { - AND = { - scope:actor = { NOT = { pam_schism_stance_supports_rite_trigger = { RITE = byzantine_rite OTHER_RITE = roman_rite } } } - scope:recipient = { pam_has_personal_tenet_of_rite_trigger = { RITE = byzantine_rite } } - } - AND = { - scope:actor = { NOT = { pam_schism_stance_supports_rite_trigger = { RITE = roman_rite OTHER_RITE = byzantine_rite } } } - scope:recipient = { pam_has_personal_tenet_of_rite_trigger = { RITE = roman_rite } } - } - } - } - modifier = { # Zealous recipients stand firm once they have a stance - add = -20 - desc = pam_sway_schism_stance_zealous_reason - scope:recipient = { - has_trait = zealous - has_variable = pam_schism_stance - } - } - modifier = { # Cynical recipients treat doctrine as politics - add = 10 - desc = pam_sway_schism_stance_cynical_reason - scope:recipient = { has_trait = cynical } - } - } - - ai_targets = { - ai_recipients = vassals - ai_recipients = peer_vassals - ai_recipients = liege - ai_recipients = neighboring_rulers - ai_recipients = family - } - - ai_target_quick_trigger = { - adult = yes - } - - ai_frequency = 12 - - ai_will_do = { - base = 25 - modifier = { - add = 50 - scope:actor = { has_trait = zealous } - } - modifier = { - add = -25 - scope:actor = { has_trait = cynical } - } - modifier = { # Keep allies onside - add = 20 - scope:actor = { is_allied_to = scope:recipient } - } - modifier = { # Prefer higher tiers - add = scope:recipient.highest_held_title_tier - } - } + # The historical Great Schism system and unified faith are disabled. + is_shown = { always = no } } # Appoint Cardinal Interaction @@ -5055,7 +4826,7 @@ appoint_cardinal_interaction = { modifier = { add = 150 desc = pam_the_christian_church_desire_more_cardinals_desc - scope:puppet_or_actor.religion = religion:christianity_religion + scope:puppet_or_actor = { is_christian_trigger = yes } situation:the_christian_church ?= { has_situation_top_phase_parameter = the_christian_church_desire_more_cardinals } @@ -5692,7 +5463,7 @@ destroy_cardinalate_interaction = { # Catalysts if = { limit = { - scope:puppet_or_actor.religion = religion:christianity_religion + scope:puppet_or_actor = { is_christian_trigger = yes } situation:the_christian_church ?= { situation_top_has_catalyst = catalyst_the_christian_church_stripped_cardinalate } } situation:the_christian_church = { trigger_situation_catalyst = catalyst_the_christian_church_stripped_cardinalate } @@ -12962,7 +12733,7 @@ ecclesiastic_incite_holy_war_attacker_interaction = { government_has_flag = government_is_ecclesiastical this = faith.religious_head } - religion ?= religion:christianity_religion + is_christian_trigger = yes piety_level >= 3 piety >= 750 is_at_war = no @@ -18677,7 +18448,7 @@ pam_ai_evangelize_personal_tenet_interaction = { } modifier = { # More likely to happen during Instability add = 15 - scope:actor.religion = religion:christianity_religion + scope:actor = { is_christian_trigger = yes } situation:the_christian_church ?= { has_situation_top_phase_parameter = the_christian_church_easier_sway_to_rite } @@ -20527,7 +20298,7 @@ pam_reaffirm_doctrine_interaction = { } modifier = { # More likely to happen during Instability add = 15 - scope:actor.religion = religion:christianity_religion + scope:actor = { is_christian_trigger = yes } situation:the_christian_church ?= { has_situation_top_phase_parameter = the_christian_church_easier_sway_to_rite } @@ -21841,7 +21612,7 @@ request_enforce_succession_interaction = { is_shown = { scope:puppet_or_actor ?= { - religion ?= religion:christianity_religion + is_christian_trigger = yes any_claim = { } # You have a claim to force succession for NOT = { government_has_flag = government_is_theocracy @@ -23088,7 +22859,7 @@ request_white_peace_interaction = { is_shown = { scope:puppet_or_actor ?= { - religion ?= religion:christianity_religion + is_christian_trigger = yes pam_clergy_interactions_faith_trigger = yes is_ruler = yes NOR = { @@ -23650,7 +23421,7 @@ request_victory_interaction = { is_shown = { scope:puppet_or_actor ?= { - religion ?= religion:christianity_religion + is_christian_trigger = yes NOT = { government_has_flag = government_is_theocracy } @@ -29845,10 +29616,7 @@ seek_communion_interaction = { is_shown = { scope:actor != scope:recipient scope:recipient = { - OR = { - faith = faith:catholic - faith = faith:christian_faith - } + faith = faith:roman_catholic_faith any_held_title = { is_head_of_faith = yes } } } diff --git a/common/on_action/game_start.txt b/common/on_action/game_start.txt index b88101384..5609aa87a 100644 --- a/common/on_action/game_start.txt +++ b/common/on_action/game_start.txt @@ -2733,6 +2733,8 @@ on_game_start = { set_subject_contract_modification_blocked = no } } + # Seed historical holy sites during world initialization, before character selection. + initialize_starting_holy_relics_effect = yes } } @@ -16899,7 +16901,7 @@ on_game_start_after_lobby = { events = { # game_rule.1011 #Hungarian Migration management. - historical_artifacts.0050 + historical_artifacts.0050 # Starting Holy Site Relics (retry empty sites) historical_artifacts.0023 # Historical Artifacts Generator coronation_events.0302 # ACH crown giveaway diff --git a/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt b/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt index da6eafee2..fe04c5a05 100644 --- a/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt +++ b/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt @@ -6681,7 +6681,7 @@ create_artifact_pedestal_reliquary_christian_effect = { add_scaled_artifact_modifier_grandeur_small_effect = yes set_variable = { name = relic_religion - value = religion:christianity_religion + value = scope:owner.religion } } } @@ -6952,7 +6952,7 @@ create_artifact_sculpture_religious_effect = { scope:owner = { random_list = { # To have different statue names 1 = { - trigger = { religion != religion:christianity_religion } + trigger = { NOT = { is_christian_trigger = yes } } create_artifact = { name = artifact_sculpture_religious_highgod_name description = artifact_sculpture_religious_highgod_description @@ -6967,7 +6967,7 @@ create_artifact_sculpture_religious_effect = { } } 1 = { - trigger = { religion = religion:christianity_religion } + trigger = { is_christian_trigger = yes } create_artifact = { name = artifact_sculpture_religious_mary_name description = artifact_sculpture_religious_mary_description diff --git a/common/scripted_effects/02_starting_holy_site_relics_effects.txt b/common/scripted_effects/02_starting_holy_site_relics_effects.txt index 2c46584a2..9f4d9969e 100644 --- a/common/scripted_effects/02_starting_holy_site_relics_effects.txt +++ b/common/scripted_effects/02_starting_holy_site_relics_effects.txt @@ -1,6 +1,6 @@ # Starting Holy Site Relics # # -# Helpers used by historical_artifacts.0050 to seed enshrined relics at +# Helpers used by the shared post-lobby startup to seed enshrined relics at # holy sites. The event runs two passes: # Pass 1: for every faith, at each of its eminent/regular holy sites, if the # county controller shares that faith, create one relic. @@ -20,6 +20,105 @@ # Dispatchers route on (relic_site, relic_faith.religion) to either a # curated named-relic block or a per-religion generic block. +# Called from on_game_start and historical_artifacts.0050 after the lobby. +# Do not mark initialization complete globally: only actual occupied holy sites +# count as seeded, so the second pass can retry sites that were not yet ready. +initialize_starting_holy_relics_effect = { + debug_log = "Starting holy site relic initialization" + # Controlled eminent sites have priority over regular sites shared with other faiths. + every_religion_global = { + every_faith = { + save_scope_as = relic_faith + every_eminent_holy_site = { + limit = { holy_site_has_artifact = no } + save_scope_as = relic_site + holy_site_county ?= { + if = { + limit = { exists = holder holder.faith = scope:relic_faith } + holder = { + save_scope_as = relic_owner + create_starting_holy_relic_eminent_effect = yes + if = { + limit = { scope:relic_site = { holy_site_has_artifact = no } } + create_starting_generic_misc_relic_effect = { RARITY = famed } + } + } + } + } + } + } + } + every_religion_global = { + every_faith = { + save_scope_as = relic_faith + every_holy_site = { + limit = { holy_site_has_artifact = no } + save_scope_as = relic_site + holy_site_county ?= { + if = { + limit = { exists = holder holder.faith = scope:relic_faith } + holder = { + save_scope_as = relic_owner + # Do not downgrade an eminent site if its first attempt failed. + if = { + limit = { scope:relic_faith = { any_eminent_holy_site = { this = scope:relic_site } } } + create_starting_holy_relic_eminent_effect = yes + } + else = { create_starting_holy_relic_regular_effect = yes } + if = { + limit = { scope:relic_site = { holy_site_has_artifact = no } } + create_starting_generic_misc_relic_effect = { RARITY = common } + } + } + } + } + } + } + } + # Preserve the vanilla tolerated-diaspora rule at empty eminent holy sites. + every_religion_global = { + every_faith = { + limit = { num_county_followers >= 3 } + save_scope_as = relic_faith + every_eminent_holy_site = { + limit = { holy_site_has_artifact = no } + save_scope_as = relic_site + holy_site_county ?= { + if = { + limit = { + exists = holder + holder.faith = { + faith_hostility_level = { target = scope:relic_faith value <= faith_astray_level } + } + } + clear_saved_scope = relic_owner + ordered_ruler = { + faith_filter = scope:relic_faith + order_by = highest_held_title_tier + max = 1 + save_scope_as = relic_owner + create_starting_holy_relic_eminent_effect = yes + } + if = { + limit = { NOT = { exists = scope:relic_owner } } + holder = { save_scope_as = relic_owner } + } + if = { + limit = { scope:relic_site = { holy_site_has_artifact = no } } + scope:relic_owner ?= { create_starting_generic_misc_relic_effect = { RARITY = famed } } + } + } + } + } + } + } + clear_saved_scope = relic_faith + clear_saved_scope = relic_site + clear_saved_scope = relic_owner + clear_saved_scope = newly_created_artifact + debug_log = "Finished starting holy site relic initialization" +} + ########################### # Eminent-site dispatcher # ########################### @@ -29,7 +128,7 @@ create_starting_holy_relic_eminent_effect = { if = { limit = { OR = { - scope:relic_faith.religion = religion:christianity_religion + scope:relic_faith.religion = religion:catholic_religion scope:relic_faith.religion = religion:protestant_religion scope:relic_faith.religion = religion:eastern_orthodox_religion @@ -42,7 +141,7 @@ create_starting_holy_relic_eminent_effect = { else_if = { limit = { OR = { - scope:relic_faith.religion = religion:christianity_religion + scope:relic_faith.religion = religion:catholic_religion scope:relic_faith.religion = religion:protestant_religion scope:relic_faith.religion = religion:eastern_orthodox_religion @@ -55,20 +154,7 @@ create_starting_holy_relic_eminent_effect = { else_if = { limit = { OR = { - scope:relic_faith.religion = religion:christianity_religion - scope:relic_faith.religion = religion:catholic_religion - scope:relic_faith.religion = religion:protestant_religion - scope:relic_faith.religion = religion:eastern_orthodox_religion - scope:relic_faith.religion = religion:oriental_orthodox_religion - } - scope:relic_site = holy_site:jerusalem - } - create_starting_relic_jerusalem_christian_effect = yes - } - else_if = { - limit = { - OR = { - scope:relic_faith.religion = religion:christianity_religion + scope:relic_faith.religion = religion:catholic_religion scope:relic_faith.religion = religion:protestant_religion scope:relic_faith.religion = religion:eastern_orthodox_religion @@ -80,207 +166,21 @@ create_starting_holy_relic_eminent_effect = { } else_if = { limit = { - OR = { - scope:relic_faith.religion = religion:christianity_religion - scope:relic_faith.religion = religion:catholic_religion - scope:relic_faith.religion = religion:protestant_religion - scope:relic_faith.religion = religion:eastern_orthodox_religion - scope:relic_faith.religion = religion:oriental_orthodox_religion - } - scope:relic_site = holy_site:alexandria - } - create_starting_relic_alexandria_christian_effect = yes - } - else_if = { - limit = { - OR = { - scope:relic_faith.religion = religion:christianity_religion - scope:relic_faith.religion = religion:catholic_religion - scope:relic_faith.religion = religion:protestant_religion - scope:relic_faith.religion = religion:eastern_orthodox_religion - scope:relic_faith.religion = religion:oriental_orthodox_religion - } - scope:relic_site = holy_site:antioch - } - create_starting_relic_antioch_christian_effect = yes - } - else_if = { - limit = { - OR = { - scope:relic_faith.religion = religion:christianity_religion - scope:relic_faith.religion = religion:catholic_religion - scope:relic_faith.religion = religion:protestant_religion - scope:relic_faith.religion = religion:eastern_orthodox_religion - scope:relic_faith.religion = religion:oriental_orthodox_religion - } - scope:relic_site = holy_site:kerala - } - create_starting_relic_kerala_christian_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:islam_religion - scope:relic_site = holy_site:mecca - } - create_starting_relic_mecca_islamic_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:islam_religion - scope:relic_site = holy_site:medina - } - create_starting_relic_medina_islamic_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:islam_religion - scope:relic_site = holy_site:jerusalem - } - create_starting_relic_jerusalem_islamic_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:islam_religion - scope:relic_site = holy_site:nadjaf - } - create_starting_relic_nadjaf_islamic_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:judaism_religion - scope:relic_site = holy_site:jerusalem - } - create_starting_relic_jerusalem_jewish_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:judaism_religion - scope:relic_site = holy_site:sinai - } - create_starting_relic_sinai_jewish_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:buddhism_religion - scope:relic_site = holy_site:bodh_gaya - } - create_starting_relic_bodh_gaya_buddhist_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:buddhism_religion - scope:relic_site = holy_site:lhasa - } - create_starting_relic_lhasa_buddhist_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:buddhism_religion - scope:relic_site = holy_site:atamasthana - } - create_starting_relic_atamasthana_buddhist_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:hinduism_religion - scope:relic_site = holy_site:varanasi - } - create_starting_relic_varanasi_hindu_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:hinduism_religion - scope:relic_site = holy_site:mathura - } - create_starting_relic_mathura_hindu_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:hinduism_religion - scope:relic_site = holy_site:ayodhya - } - create_starting_relic_ayodhya_hindu_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:jainism_religion - scope:relic_site = holy_site:palitana - } - create_starting_relic_palitana_jain_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:jainism_religion - scope:relic_site = holy_site:shikharj - } - create_starting_relic_shikharj_jain_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:zoroastrianism_religion - scope:relic_site = holy_site:adur_farnbag - } - create_starting_relic_yazd_zoroastrian_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:germanic_religion + scope:relic_faith.religion = religion:folk_germanic_religion scope:relic_site = holy_site:uppsala } create_starting_relic_uppsala_norse_effect = yes } else_if = { limit = { - scope:relic_faith.religion = religion:slavic_religion + scope:relic_faith.religion = religion:folk_slavic_religion scope:relic_site = holy_site:kiev } create_starting_relic_kiev_slavic_effect = yes } else_if = { limit = { - scope:relic_faith.religion = religion:tengrism_religion - scope:relic_site = holy_site:kara_khorum - } - create_starting_relic_karakhorum_tengri_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:shintoism_religion - scope:relic_site = holy_site:ise_jingu - } - create_starting_relic_ise_shinto_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:confucianism_religion - scope:relic_site = holy_site:qufu - } - create_starting_relic_qufu_confucian_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:hellenism_religion - scope:relic_site = holy_site:athens - } - create_starting_relic_athens_hellenic_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:akom_religion - scope:relic_site = holy_site:ife - } - create_starting_relic_ife_akom_effect = yes - } - else_if = { - limit = { - scope:relic_faith.religion = religion:west_african_orisha_religion - scope:relic_site = holy_site:ife - } - create_starting_relic_ife_orisha_effect = yes - } - else_if = { - limit = { - current_date >= 2555.1.1 + game_start_date >= 2555.1.1 scope:relic_faith.religion = religion:eastern_orthodox_religion scope:relic_site = holy_site:iasi } @@ -289,7 +189,7 @@ create_starting_holy_relic_eminent_effect = { } else_if = { limit = { - current_date >= 2555.1.1 + game_start_date >= 2555.1.1 scope:relic_faith.religion = religion:eastern_orthodox_religion scope:relic_site = holy_site:kiev } @@ -297,7 +197,7 @@ create_starting_holy_relic_eminent_effect = { } else_if = { limit = { - current_date >= 2555.1.1 + game_start_date >= 2555.1.1 scope:relic_faith.religion = religion:eastern_orthodox_religion scope:relic_site = holy_site:athos } @@ -320,7 +220,7 @@ create_starting_holy_relic_regular_effect = { if = { limit = { OR = { - scope:relic_faith.religion = religion:christianity_religion + scope:relic_faith.religion = religion:catholic_religion scope:relic_faith.religion = religion:protestant_religion scope:relic_faith.religion = religion:eastern_orthodox_religion @@ -331,23 +231,9 @@ create_starting_holy_relic_regular_effect = { create_starting_relic_kent_christian_effect = yes } else_if = { - # Antioch took Aksum's eminent slot on Miaphysitism limit = { OR = { - scope:relic_faith.religion = religion:christianity_religion - scope:relic_faith.religion = religion:catholic_religion - scope:relic_faith.religion = religion:protestant_religion - scope:relic_faith.religion = religion:eastern_orthodox_religion - scope:relic_faith.religion = religion:oriental_orthodox_religion - } - scope:relic_site = holy_site:aksum - } - create_starting_relic_aksum_christian_effect = yes - } - else_if = { - limit = { - OR = { - scope:relic_faith.religion = religion:christianity_religion + scope:relic_faith.religion = religion:catholic_religion scope:relic_faith.religion = religion:protestant_religion scope:relic_faith.religion = religion:eastern_orthodox_religion @@ -359,14 +245,7 @@ create_starting_holy_relic_regular_effect = { } else_if = { limit = { - scope:relic_faith.religion = religion:islam_religion - scope:relic_site = holy_site:baghdad - } - create_starting_relic_baghdad_islamic_effect = yes - } - else_if = { - limit = { - current_date >= 2555.1.1 + game_start_date >= 2555.1.1 scope:relic_faith.religion = religion:eastern_orthodox_religion scope:relic_site = holy_site:kiev } @@ -374,7 +253,7 @@ create_starting_holy_relic_regular_effect = { } else_if = { limit = { - current_date >= 2555.1.1 + game_start_date >= 2555.1.1 scope:relic_faith.religion = religion:eastern_orthodox_religion scope:relic_site = holy_site:tbilisi } @@ -391,14 +270,17 @@ create_starting_holy_relic_regular_effect = { ############################## create_starting_relic_rome_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_peter_bones_name description = artifact_relic_peter_bones_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -410,12 +292,14 @@ create_starting_relic_rome_christian_effect = { set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_paul_bones_name description = artifact_relic_paul_bones_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -427,15 +311,18 @@ create_starting_relic_rome_christian_effect = { } create_starting_relic_constantinople_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner # The Mandylion already exists as the Image of Edessa name = artifact_relic_crown_of_thorns_name description = artifact_relic_crown_of_thorns_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -444,17 +331,19 @@ create_starting_relic_constantinople_christian_effect = { } } # Sets christian_crown so historical_artifacts.0023 will not pick another Crown of Thorns - scope:newly_created_artifact = { set_variable = christian_crown } + scope:newly_created_artifact ?= { set_variable = christian_crown } finalize_starting_unique_relic_effect = yes set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_baptist_arm_name description = artifact_relic_baptist_arm_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -466,9 +355,12 @@ create_starting_relic_constantinople_christian_effect = { } create_starting_relic_jerusalem_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_true_cross_name description = artifact_relic_true_cross_desc type = pedestal @@ -485,14 +377,17 @@ create_starting_relic_jerusalem_christian_effect = { } create_starting_relic_santiago_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_bones_of_james_name description = artifact_relic_bones_of_james_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -504,14 +399,17 @@ create_starting_relic_santiago_christian_effect = { } create_starting_relic_alexandria_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_mark_name description = artifact_relic_mark_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -523,6 +421,7 @@ create_starting_relic_alexandria_christian_effect = { } create_starting_relic_antioch_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { # The Holy Lance of Antioch was discovered during the First @@ -531,12 +430,14 @@ create_starting_relic_antioch_christian_effect = { # martyr, d. ~110 AD). if = { limit = { current_date >= 1098.6.14 } + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_lance_antioch_name description = artifact_relic_lance_antioch_desc type = pedestal template = christian_artifact_template - visuals = pedestal_longinus + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -545,12 +446,14 @@ create_starting_relic_antioch_christian_effect = { } } else = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_ignatius_name description = artifact_relic_ignatius_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -563,14 +466,17 @@ create_starting_relic_antioch_christian_effect = { } create_starting_relic_aksum_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_tabot_name description = artifact_relic_tabot_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -582,12 +488,14 @@ create_starting_relic_aksum_christian_effect = { set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_nine_saints_name description = artifact_relic_nine_saints_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -599,14 +507,17 @@ create_starting_relic_aksum_christian_effect = { } create_starting_relic_kerala_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_thomas_name description = artifact_relic_thomas_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -618,18 +529,21 @@ create_starting_relic_kerala_christian_effect = { } create_starting_relic_kent_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_masterwork = yes scope:relic_owner = { # Becket's shrine dominates Canterbury after his martyrdom in 1170; # before that, the founding-archbishop's pallium is the relic. if = { limit = { current_date >= 1170.12.29 } + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_becket_name description = artifact_relic_becket_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -638,12 +552,14 @@ create_starting_relic_kent_christian_effect = { } } else = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_augustine_pallium_name description = artifact_relic_augustine_pallium_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -656,17 +572,20 @@ create_starting_relic_kent_christian_effect = { } create_starting_relic_cologne_christian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_masterwork = yes scope:relic_owner = { # We use the Magi bones from Barbarossa's translation if = { limit = { current_date >= 1164.7.23 } + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_three_magi_name description = artifact_relic_three_magi_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -675,12 +594,14 @@ create_starting_relic_cologne_christian_effect = { } } else = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_ursula_name description = artifact_relic_ursula_desc type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -697,14 +618,17 @@ create_starting_relic_cologne_christian_effect = { ############################ create_starting_relic_mecca_islamic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_black_stone_name description = artifact_relic_black_stone_desc type = pedestal template = islam_artifact_template - visuals = pedestal_islamic_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -716,9 +640,12 @@ create_starting_relic_mecca_islamic_effect = { } create_starting_relic_medina_islamic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner # sword_court renders a region sword instead of a generic reliquary box name = artifact_relic_dhulfiqar_name description = artifact_relic_dhulfiqar_desc @@ -736,12 +663,14 @@ create_starting_relic_medina_islamic_effect = { set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_prophet_sandals_name description = artifact_relic_prophet_sandals_desc type = pedestal template = islam_artifact_template - visuals = pedestal_islamic_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -753,14 +682,17 @@ create_starting_relic_medina_islamic_effect = { } create_starting_relic_jerusalem_islamic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_buraq_footprint_name description = artifact_relic_buraq_footprint_desc type = pedestal template = islam_artifact_template - visuals = pedestal_islamic_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -772,9 +704,12 @@ create_starting_relic_jerusalem_islamic_effect = { } create_starting_relic_nadjaf_islamic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner # sword_court renders a region-appropriate sword asset. name = artifact_relic_sword_of_ali_name description = artifact_relic_sword_of_ali_desc @@ -792,15 +727,18 @@ create_starting_relic_nadjaf_islamic_effect = { } create_starting_relic_baghdad_islamic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_masterwork = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner # The Mantle of the Prophet already exists name = artifact_relic_abu_hanifa_turban_name description = artifact_relic_abu_hanifa_turban_desc type = pedestal template = islam_artifact_template - visuals = pedestal_islamic_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -816,9 +754,12 @@ create_starting_relic_baghdad_islamic_effect = { ############################ create_starting_relic_jerusalem_jewish_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_western_wall_name description = artifact_relic_western_wall_desc type = pedestal @@ -835,9 +776,12 @@ create_starting_relic_jerusalem_jewish_effect = { } create_starting_relic_sinai_jewish_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_tablets_name description = artifact_relic_tablets_desc type = pedestal @@ -858,14 +802,17 @@ create_starting_relic_sinai_jewish_effect = { ############################## create_starting_relic_bodh_gaya_buddhist_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_bodhi_leaf_name description = artifact_relic_bodhi_leaf_desc type = pedestal template = buddhism_artifact_template - visuals = pedestal_buddhism_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -877,12 +824,14 @@ create_starting_relic_bodh_gaya_buddhist_effect = { set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_vajrasana_name description = artifact_relic_vajrasana_desc type = pedestal template = buddhism_artifact_template - visuals = pedestal_buddhism_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -894,14 +843,17 @@ create_starting_relic_bodh_gaya_buddhist_effect = { } create_starting_relic_sarnath_buddhist_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_dhamek_name description = artifact_relic_dhamek_desc type = pedestal template = buddhism_artifact_template - visuals = pedestal_buddhism_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -913,14 +865,17 @@ create_starting_relic_sarnath_buddhist_effect = { } create_starting_relic_lhasa_buddhist_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_jowo_name description = artifact_relic_jowo_desc type = pedestal template = buddhism_artifact_template - visuals = pedestal_buddhism_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -932,14 +887,17 @@ create_starting_relic_lhasa_buddhist_effect = { } create_starting_relic_atamasthana_buddhist_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_sacred_tooth_name description = artifact_relic_sacred_tooth_desc type = pedestal template = buddhism_artifact_template - visuals = buddha_tooth + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -955,14 +913,17 @@ create_starting_relic_atamasthana_buddhist_effect = { ############################## create_starting_relic_varanasi_hindu_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_lingam_name description = artifact_relic_lingam_desc type = pedestal template = branch_hinduism_template - visuals = pedestal_branch_relic_hinduism + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -974,7 +935,9 @@ create_starting_relic_varanasi_hindu_effect = { set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner # spear_court uses the indian_unit spear so it looks like a trident, not a reliquary name = artifact_relic_trishul_name description = artifact_relic_trishul_desc @@ -992,14 +955,17 @@ create_starting_relic_varanasi_hindu_effect = { } create_starting_relic_mathura_hindu_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_krishna_stone_name description = artifact_relic_krishna_stone_desc type = pedestal template = branch_hinduism_template - visuals = pedestal_branch_relic_hinduism + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1011,14 +977,17 @@ create_starting_relic_mathura_hindu_effect = { } create_starting_relic_ayodhya_hindu_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_rama_footprint_name description = artifact_relic_rama_footprint_desc type = pedestal template = branch_hinduism_template - visuals = pedestal_branch_relic_hinduism + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1034,9 +1003,12 @@ create_starting_relic_ayodhya_hindu_effect = { ############################## create_starting_relic_palitana_jain_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_palitana_tirtha_name description = artifact_relic_palitana_tirtha_desc type = pedestal @@ -1049,16 +1021,19 @@ create_starting_relic_palitana_jain_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:jainism_religion } } finalize_starting_unique_relic_effect = yes } create_starting_relic_shikharj_jain_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_parshvanatha_paduka_name description = artifact_relic_parshvanatha_paduka_desc type = pedestal @@ -1071,14 +1046,16 @@ create_starting_relic_shikharj_jain_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:jainism_religion } } finalize_starting_unique_relic_effect = yes set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_shikharji_nishidhi_name description = artifact_relic_shikharji_nishidhi_desc type = pedestal @@ -1091,21 +1068,24 @@ create_starting_relic_shikharj_jain_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:jainism_religion } } finalize_starting_unique_relic_effect = yes } create_starting_relic_yazd_zoroastrian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_atash_bahram_name description = artifact_relic_atash_bahram_desc type = pedestal template = branch_zoroastr_template - visuals = pedestal_branch_relic_zoroastr + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1117,14 +1097,17 @@ create_starting_relic_yazd_zoroastrian_effect = { } create_starting_relic_uppsala_norse_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_yggdrasil_branch_name description = artifact_relic_yggdrasil_branch_desc type = pedestal template = branch_germanic_template - visuals = pedestal_branch_relic_germanic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1136,14 +1119,17 @@ create_starting_relic_uppsala_norse_effect = { } create_starting_relic_kiev_slavic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_perun_idol_name description = artifact_relic_perun_idol_desc type = pedestal template = branch_slavic_template - visuals = pedestal_branch_relic_slavic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1155,9 +1141,12 @@ create_starting_relic_kiev_slavic_effect = { } create_starting_relic_karakhorum_tengri_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner # wall_big with a banner visual shows as a hanging banner instead of a reliquary box name = artifact_relic_suldetug_name description = artifact_relic_suldetug_desc @@ -1171,16 +1160,19 @@ create_starting_relic_karakhorum_tengri_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:tengrism_religion } } finalize_starting_unique_relic_effect = yes } create_starting_relic_ise_shinto_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_yata_kagami_name description = artifact_relic_yata_kagami_desc type = pedestal @@ -1193,14 +1185,16 @@ create_starting_relic_ise_shinto_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:shintoism_religion } } finalize_starting_unique_relic_effect = yes set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_shin_no_mihashira_name description = artifact_relic_shin_no_mihashira_desc type = pedestal @@ -1213,16 +1207,19 @@ create_starting_relic_ise_shinto_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:shintoism_religion } } finalize_starting_unique_relic_effect = yes } create_starting_relic_qufu_confucian_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_kong_tomb_name description = artifact_relic_kong_tomb_desc type = pedestal @@ -1235,14 +1232,16 @@ create_starting_relic_qufu_confucian_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:confucianism_religion } } finalize_starting_unique_relic_effect = yes set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner # A book type with a book visual shows as a Chinese scroll through chinese_building name = artifact_relic_analects_name description = artifact_relic_analects_desc @@ -1256,38 +1255,19 @@ create_starting_relic_qufu_confucian_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:confucianism_religion } } finalize_starting_unique_relic_effect = yes } -create_starting_relic_athens_hellenic_effect = { - set_artifact_rarity_illustrious = yes - scope:relic_owner = { - create_artifact = { - name = artifact_relic_athena_promachos_name - description = artifact_relic_athena_promachos_desc - type = pedestal - template = branch_general_template - visuals = reliquary - wealth = scope:wealth - quality = scope:quality - history = { type = created_before_history } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - scope:newly_created_artifact = { - set_variable = { name = relic_religion value = religion:hellenism_religion } - } - finalize_starting_unique_relic_effect = yes -} - create_starting_relic_ife_akom_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner # spear_court renders a region-appropriate haft (African asset # for the ife region) — matches an obelisk/staff better than # the reliquary box the branch_relic visual would render. @@ -1303,16 +1283,19 @@ create_starting_relic_ife_akom_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:akom_religion } } finalize_starting_unique_relic_effect = yes } create_starting_relic_ife_orisha_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_relic_oshe_shango_name description = artifact_relic_oshe_shango_desc type = pedestal @@ -1325,7 +1308,7 @@ create_starting_relic_ife_orisha_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = religion:west_african_orisha_religion } } finalize_starting_unique_relic_effect = yes @@ -1339,20 +1322,13 @@ create_starting_relic_ife_orisha_effect = { create_starting_generic_relic_effect = { if = { limit = { - OR = { OR = { - scope:relic_faith.religion = religion:christianity_religion scope:relic_faith.religion = religion:catholic_religion scope:relic_faith.religion = religion:protestant_religion scope:relic_faith.religion = religion:eastern_orthodox_religion scope:relic_faith.religion = religion:oriental_orthodox_religion } - scope:relic_faith.religion = religion:catholic_religion - scope:relic_faith.religion = religion:protestant_religion - scope:relic_faith.religion = religion:eastern_orthodox_religion - scope:relic_faith.religion = religion:oriental_orthodox_religion } - } create_starting_generic_christian_relic_effect = { RARITY = $RARITY$ } } else_if = { @@ -1372,11 +1348,11 @@ create_starting_generic_relic_effect = { create_starting_generic_zoroastr_relic_effect = { RARITY = $RARITY$ } } else_if = { - limit = { scope:relic_faith.religion = religion:germanic_religion } + limit = { scope:relic_faith.religion = religion:folk_germanic_religion } create_starting_generic_germanic_relic_effect = { RARITY = $RARITY$ } } else_if = { - limit = { scope:relic_faith.religion = religion:slavic_religion } + limit = { scope:relic_faith.religion = religion:folk_slavic_religion } create_starting_generic_slavic_relic_effect = { RARITY = $RARITY$ } } else_if = { @@ -1392,6 +1368,7 @@ create_starting_generic_relic_effect = { # Random ChristianRelicName flag so loc varies instead of one static relic name create_starting_generic_christian_relic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_$RARITY$ = yes random_list = { 10 = { save_scope_value_as = { name = christian_relic_name value = flag:nail } } @@ -1404,12 +1381,14 @@ create_starting_generic_christian_relic_effect = { 10 = { save_scope_value_as = { name = christian_relic_name value = flag:cross } } } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_pedestal_reliquary_christian_name description = artifact_pedestal_reliquary_christian_description type = pedestal template = christian_artifact_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1421,6 +1400,7 @@ create_starting_generic_christian_relic_effect = { } create_starting_generic_islamic_relic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_$RARITY$ = yes random_list = { 10 = { save_scope_value_as = { name = islam_relic_name value = flag:hair } } @@ -1432,12 +1412,14 @@ create_starting_generic_islamic_relic_effect = { 10 = { save_scope_value_as = { name = islam_relic_name value = flag:banner } } } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_pedestal_reliquary_islam_name description = artifact_pedestal_reliquary_islam_description type = pedestal template = islam_artifact_template - visuals = pedestal_islamic_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1449,6 +1431,7 @@ create_starting_generic_islamic_relic_effect = { } create_starting_generic_buddhist_relic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_$RARITY$ = yes random_list = { 10 = { save_scope_value_as = { name = buddhism_relic_name value = flag:tooth } } @@ -1460,12 +1443,14 @@ create_starting_generic_buddhist_relic_effect = { 10 = { save_scope_value_as = { name = buddhism_relic_name value = flag:sarira } } } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_pedestal_reliquary_buddhism_name description = artifact_pedestal_reliquary_buddhism_description type = pedestal template = buddhism_artifact_template - visuals = pedestal_buddhism_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1478,15 +1463,18 @@ create_starting_generic_buddhist_relic_effect = { # Each helper sets branch_name, and the BranchTree custom loc turns it into a sacred tree create_starting_generic_hindu_relic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_$RARITY$ = yes save_scope_value_as = { name = branch_name value = flag:kalpavriksha } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_pedestal_branch_name description = artifact_pedestal_branch_description type = pedestal template = branch_hinduism_template - visuals = pedestal_branch_relic_hinduism + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1498,18 +1486,21 @@ create_starting_generic_hindu_relic_effect = { } create_starting_generic_zoroastr_relic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_$RARITY$ = yes random_list = { 50 = { save_scope_value_as = { name = branch_name value = flag:haoma } } 50 = { save_scope_value_as = { name = branch_name value = flag:cypress } } } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_pedestal_branch_name description = artifact_pedestal_branch_description type = pedestal template = branch_zoroastr_template - visuals = pedestal_branch_relic_zoroastr + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1521,18 +1512,21 @@ create_starting_generic_zoroastr_relic_effect = { } create_starting_generic_germanic_relic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_$RARITY$ = yes random_list = { 50 = { save_scope_value_as = { name = branch_name value = flag:thor } } 50 = { save_scope_value_as = { name = branch_name value = flag:uppsala } } } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_pedestal_branch_name description = artifact_pedestal_branch_description type = pedestal template = branch_germanic_template - visuals = pedestal_branch_relic_germanic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1544,15 +1538,18 @@ create_starting_generic_germanic_relic_effect = { } create_starting_generic_slavic_relic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_$RARITY$ = yes save_scope_value_as = { name = branch_name value = flag:alatyr } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_pedestal_branch_name description = artifact_pedestal_branch_description type = pedestal template = branch_slavic_template - visuals = pedestal_branch_relic_slavic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1564,15 +1561,18 @@ create_starting_generic_slavic_relic_effect = { } create_starting_generic_west_african_relic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_$RARITY$ = yes save_scope_value_as = { name = branch_name value = flag:somb } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_pedestal_branch_name description = artifact_pedestal_branch_description type = pedestal template = branch_boog_template - visuals = pedestal_branch_relic_boog + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history } @@ -1584,6 +1584,7 @@ create_starting_generic_west_african_relic_effect = { } create_starting_generic_misc_relic_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_$RARITY$ = yes random_list = { 25 = { @@ -1595,7 +1596,9 @@ create_starting_generic_misc_relic_effect = { add = -25 } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_misc_relic_idol_name description = artifact_misc_relic_idol_desc type = pedestal @@ -1611,7 +1614,9 @@ create_starting_generic_misc_relic_effect = { } 25 = { scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_misc_relic_stele_name description = artifact_misc_relic_stele_desc type = pedestal @@ -1634,7 +1639,9 @@ create_starting_generic_misc_relic_effect = { add = -25 } scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_misc_relic_mask_name description = artifact_misc_relic_mask_desc type = pedestal @@ -1650,7 +1657,9 @@ create_starting_generic_misc_relic_effect = { } 25 = { scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = artifact_misc_relic_banner_name description = artifact_misc_relic_banner_desc type = pedestal @@ -1665,7 +1674,7 @@ create_starting_generic_misc_relic_effect = { } } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = relic_religion value = scope:relic_faith.religion } } finalize_starting_relic_effect = yes @@ -1673,7 +1682,7 @@ create_starting_generic_misc_relic_effect = { finalize_starting_unique_relic_effect = { - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = { name = historical_unique_artifact value = yes } } finalize_starting_relic_effect = yes @@ -1683,19 +1692,23 @@ finalize_starting_unique_relic_effect = { finalize_starting_relic_effect = { # A holy site only has the three holy_relic_* slots, and a relic past that would sit unenshrined and assert on equip if = { - limit = { scope:relic_site = { holy_site_artifact_count >= 3 } } - destroy_artifact = scope:newly_created_artifact + limit = { + exists = scope:newly_created_artifact + scope:relic_site = { holy_site_artifact_count >= 3 } + } + scope:relic_owner = { destroy_artifact = scope:newly_created_artifact } } - else = { - # The six named Orthodox relics have fixed bonuses assigned at creation. + else_if = { + limit = { exists = scope:newly_created_artifact } + # The named Orthodox relics have fixed bonuses assigned at creation. # All other relics retain the existing rarity-scaled effects. if = { limit = { - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { NOT = { has_variable = neow_fixed_orthodox_relic_modifiers } } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { scope:relic_owner = { save_scope_as = owner } # Required for scaled artifact effects add_scaled_artifact_modifier_piety_effect = yes add_scaled_artifact_modifier_grandeur_small_effect = yes @@ -1715,7 +1728,7 @@ finalize_starting_relic_effect = { } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { # Enshrine without history (setting owner & equipping = enshrining), skipping 'can_enshrine_artifact' rules) set_holy_site_owner = { target = scope:relic_site @@ -1723,13 +1736,25 @@ finalize_starting_relic_effect = { } equip_artifact_to_owner = yes } + if = { + limit = { scope:relic_site = { holy_site_has_artifact = no } } + debug_log = "Starting holy relic was created but site is still empty" + debug_log_scopes = yes + } + } + else = { + debug_log = "Starting holy relic creation returned no artifact" + debug_log_scopes = yes } } neow_create_orthodox_relic_iasi_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = neow_orthodox_relic_iasi_name description = neow_orthodox_relic_iasi_desc type = book @@ -1743,7 +1768,7 @@ neow_create_orthodox_relic_iasi_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = neow_orthodox_relic_iasi set_variable = { name = neow_fixed_orthodox_relic_modifiers value = yes } } @@ -1751,9 +1776,12 @@ neow_create_orthodox_relic_iasi_effect = { } neow_create_orthodox_relic_kiev_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = neow_orthodox_relic_kiev_name description = neow_orthodox_relic_kiev_desc type = book @@ -1767,7 +1795,7 @@ neow_create_orthodox_relic_kiev_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = neow_orthodox_relic_kiev set_variable = { name = neow_fixed_orthodox_relic_modifiers value = yes } } @@ -1775,14 +1803,17 @@ neow_create_orthodox_relic_kiev_effect = { } neow_create_orthodox_relic_athos_cross_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = neow_orthodox_relic_athos_cross_name description = neow_orthodox_relic_athos_cross_desc type = pedestal template = neow_orthodox_holy_relic_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history date = 1000.1.1 } @@ -1791,7 +1822,7 @@ neow_create_orthodox_relic_athos_cross_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = neow_orthodox_relic_athos_cross set_variable = { name = neow_fixed_orthodox_relic_modifiers value = yes } } @@ -1799,14 +1830,17 @@ neow_create_orthodox_relic_athos_cross_effect = { } neow_create_orthodox_relic_athos_magdalene_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = neow_orthodox_relic_athos_magdalene_name description = neow_orthodox_relic_athos_magdalene_desc type = pedestal template = neow_orthodox_holy_relic_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history date = 1400.1.1 } @@ -1815,7 +1849,7 @@ neow_create_orthodox_relic_athos_magdalene_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = neow_orthodox_relic_athos_magdalene set_variable = { name = neow_fixed_orthodox_relic_modifiers value = yes } } @@ -1823,14 +1857,17 @@ neow_create_orthodox_relic_athos_magdalene_effect = { } neow_create_orthodox_relic_athos_girdle_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = neow_orthodox_relic_athos_girdle_name description = neow_orthodox_relic_athos_girdle_desc type = pedestal template = neow_orthodox_holy_relic_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history date = 1000.1.1 } @@ -1839,7 +1876,7 @@ neow_create_orthodox_relic_athos_girdle_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = neow_orthodox_relic_athos_girdle set_variable = { name = neow_fixed_orthodox_relic_modifiers value = yes } } @@ -1847,14 +1884,17 @@ neow_create_orthodox_relic_athos_girdle_effect = { } neow_create_orthodox_relic_tbilisi_effect = { + clear_saved_scope = newly_created_artifact set_artifact_rarity_illustrious = yes scope:relic_owner = { + clear_saved_scope = newly_created_artifact create_artifact = { + creator = scope:relic_owner name = neow_orthodox_relic_tbilisi_name description = neow_orthodox_relic_tbilisi_desc type = pedestal template = neow_orthodox_holy_relic_template - visuals = pedestal_christian_relic + visuals = reliquary wealth = scope:wealth quality = scope:quality history = { type = created_before_history date = 350.1.1 } @@ -1863,7 +1903,7 @@ neow_create_orthodox_relic_tbilisi_effect = { save_scope_as = newly_created_artifact } } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = neow_orthodox_relic_tbilisi set_variable = { name = neow_fixed_orthodox_relic_modifiers value = yes } } @@ -1874,40 +1914,55 @@ neow_create_orthodox_relic_tbilisi_effect = { # Stolen York monument; the native effect supplies the original Constantine model and icon. # All bonuses are fixed, like the other named Orthodox relics. neow_create_orthodox_relic_iasi_constantine_effect = { - if = { - limit = { has_ep3_dlc_trigger = yes } - scope:relic_owner = { - create_artifact_statue_constantine_effect = { OWNER = this } - } - scope:newly_created_artifact = { - set_artifact_name = neow_orthodox_relic_iasi_constantine_name - set_artifact_description = neow_orthodox_relic_iasi_constantine_desc - remove_artifact_modifier = statue_constantine_modifier - add_artifact_modifier = neow_orthodox_relic_iasi_constantine_modifier + clear_saved_scope = newly_created_artifact + set_artifact_rarity_famed = yes + scope:relic_owner = { + create_artifact = { + creator = scope:relic_owner + name = neow_orthodox_relic_iasi_constantine_name + description = neow_orthodox_relic_iasi_constantine_desc + type = sculpture + template = neow_orthodox_holy_relic_template + visuals = statue_constantine + wealth = scope:wealth + quality = scope:quality + history = { type = created_before_history date = 1998.1.1 } + modifier = neow_orthodox_relic_iasi_constantine_modifier + decaying = no + save_scope_as = newly_created_artifact } } - else = { - # The statue's standard base-game visual is available without Roads to Power. - set_artifact_rarity_famed = yes - scope:relic_owner = { - create_artifact = { - name = neow_orthodox_relic_iasi_constantine_name - description = neow_orthodox_relic_iasi_constantine_desc - type = sculpture - template = neow_orthodox_holy_relic_template - visuals = statue - wealth = scope:wealth - quality = scope:quality - history = { type = created_before_history date = 1998.1.1 } - modifier = neow_orthodox_relic_iasi_constantine_modifier - decaying = no - save_scope_as = newly_created_artifact - } - } - } - scope:newly_created_artifact = { + scope:newly_created_artifact ?= { set_variable = neow_orthodox_relic_iasi_constantine set_variable = { name = neow_fixed_orthodox_relic_modifiers value = yes } } finalize_starting_unique_relic_effect = yes } + +# Court relics are not assigned to a holy site. This is the current equivalent +# of the retired historical branch artifact helpers. +create_starting_court_branch_relic_effect = { + clear_saved_scope = newly_created_artifact + save_scope_as = owner + set_artifact_rarity_masterwork = yes + save_scope_value_as = { name = branch_name value = flag:$BRANCH$ } + clear_saved_scope = newly_created_artifact + create_artifact = { + name = artifact_pedestal_branch_name + description = artifact_pedestal_branch_description + creator = scope:owner + type = pedestal + template = $TEMPLATE$ + visuals = reliquary + wealth = scope:wealth + quality = scope:quality + history = { type = created_before_history } + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + scope:newly_created_artifact ?= { + add_scaled_artifact_modifier_piety_effect = yes + add_scaled_artifact_modifier_devotion_effect = yes + add_scaled_artifact_modifier_grandeur_small_effect = yes + } +} diff --git a/common/scripted_triggers/pam_scripted_triggers.txt b/common/scripted_triggers/pam_scripted_triggers.txt index b10538574..cf2906e2f 100644 --- a/common/scripted_triggers/pam_scripted_triggers.txt +++ b/common/scripted_triggers/pam_scripted_triggers.txt @@ -214,7 +214,7 @@ pam_mass_rite_conversion_requirements_trigger = { #} pam_is_ecumenical_patriarch_trigger = { - faith = faith:orthodox_faith + faith = faith:orthodox exists = faith.religious_head this = faith.religious_head OR = { @@ -1902,6 +1902,7 @@ pam_ai_deposable_cleric_trigger = { # We set this just under the default heresy threshold so rites convert before heresy fires # Phase first: outside Reform the global lookup ends this before the per-see checks +pam_ai_reform_rite_replacement_trigger = { always = no } #pam_ai_reform_rite_replacement_trigger = { # situation:the_christian_church ?= { situation_current_phase = reform_phase } # scope:actor.faith = { fervor < 50 } @@ -4892,6 +4893,26 @@ pam_peace_of_god_coreligionist_aggressor_trigger = { } } +# Shared eligibility for lifting excommunication, including ransom options. +can_lift_excommunication_interaction_trigger = { + $EXCOMMUNICATED$ = { + has_trait = excommunicated + this != $LIFTER$ + faith = $LIFTER$.faith + pam_valid_excommunication_target_trigger = { EXCOMMUNICATOR = $LIFTER$ } + } + $LIFTER$ = { + is_ruler = yes + highest_held_title_tier >= tier_duchy + pam_is_investiture_clergy_trigger = yes + NOT = { has_trait = excommunicated } + faith = { + faith_has_sacraments_central_trigger = yes + NOT = { has_doctrine_parameter = unreformed } + } + } +} + pam_valid_excommunication_target_trigger = { age >= 12 save_temporary_scope_as = target_char diff --git a/events/artifacts/historical_artifacts_events.txt b/events/artifacts/historical_artifacts_events.txt index 38e9fbb56..54644d1d1 100644 --- a/events/artifacts/historical_artifacts_events.txt +++ b/events/artifacts/historical_artifacts_events.txt @@ -59,7 +59,7 @@ historical_artifacts.0023 = { } NOT = { has_character_flag = seeded_relic } } - create_artifact_pedestal_christian_relic_effect_hist = { OWNER = this } + create_artifact_pedestal_reliquary_christian_effect = { OWNER = this } add_character_flag = { flag = seeded_relic days = 1 @@ -74,7 +74,7 @@ historical_artifacts.0023 = { faith.religion = religion:islam_religion NOT = { has_character_flag = seeded_relic } } - create_artifact_pedestal_islamic_relic_effect_hist = { OWNER = this } + create_artifact_pedestal_reliquary_islam_effect = { OWNER = this } add_character_flag = { flag = seeded_relic days = 1 @@ -89,7 +89,7 @@ historical_artifacts.0023 = { faith.religion = religion:buddhism_religion NOT = { has_character_flag = seeded_relic } } - create_artifact_pedestal_buddhism_relic_effect_hist = { OWNER = this } + create_artifact_pedestal_reliquary_buddhism_effect = { OWNER = this } add_character_flag = { flag = seeded_relic days = 1 @@ -104,7 +104,7 @@ historical_artifacts.0023 = { faith.religion = religion:hinduism_religion NOT = { has_character_flag = seeded_relic } } - create_artifact_pedestal_branch_relic_hinduism_effect = { OWNER = this } + create_starting_court_branch_relic_effect = { BRANCH = kalpavriksha TEMPLATE = branch_hinduism_template } add_character_flag = { flag = seeded_relic days = 1 @@ -120,7 +120,7 @@ historical_artifacts.0023 = { highest_held_title_tier >= tier_county NOT = { has_character_flag = seeded_relic } } - create_artifact_pedestal_branch_relic_germanic_effect = { OWNER = this } + create_starting_court_branch_relic_effect = { BRANCH = uppsala TEMPLATE = branch_germanic_template } add_character_flag = { flag = seeded_relic days = 1 @@ -139,7 +139,7 @@ historical_artifacts.0023 = { faith:chernobozhye = { random_faith_ruler = { limit = { highest_held_title_tier >= tier_county } - create_artifact_pedestal_branch_relic_slavic_effect = { OWNER = this } + create_starting_court_branch_relic_effect = { BRANCH = alatyr TEMPLATE = branch_slavic_template } } } } @@ -1411,80 +1411,5 @@ historical_artifacts.0100 = { historical_artifacts.0050 = { scope = none hidden = yes - - immediate = { - every_religion_global = { - every_faith = { - save_scope_as = relic_faith - # Eminent holy sites get the higher-rarity dispatcher. - every_eminent_holy_site = { - save_scope_as = relic_site - holy_site_county = { - if = { - limit = { - exists = holder - holder.faith = scope:relic_faith - } - holder = { save_scope_as = relic_owner } - create_starting_holy_relic_eminent_effect = yes - } - } - } - # Regular holy sites get the lower-rarity dispatcher. - every_holy_site = { - is_eminent = no - save_scope_as = relic_site - holy_site_county = { - if = { - limit = { - exists = holder - holder.faith = scope:relic_faith - } - holder = { save_scope_as = relic_owner } - create_starting_holy_relic_regular_effect = yes - } - } - } - } - } - # Pass 2: Tolerated eminent-site relics. - every_religion_global = { - every_faith = { - save_scope_as = relic_faith - if = { - limit = { - num_county_followers >= 3 # only check for faiths that are somewhat alive - } - every_eminent_holy_site = { - limit = { - holy_site_has_artifact = no - } - save_scope_as = relic_site - - holy_site_county = { - if = { - limit = { - exists = holder - holder.faith = { - faith_hostility_level = { - target = scope:relic_faith - value <= faith_astray_level - } - } - } - # A temporary creator lets the relic inherit their faith - ordered_ruler = { - faith_filter = scope:relic_faith - order_by = highest_held_title_tier - max = 1 - save_scope_as = relic_owner - create_starting_holy_relic_eminent_effect = yes - } - } - } - } - } - } - } - } + immediate = { initialize_starting_holy_relics_effect = yes } }