fixes big evebts abd on actions plus mroe

This commit is contained in:
Greekman 2026-11-21 19:27:08 +00:00
parent c9d520e5a1
commit bce2aa31a1
207 changed files with 100377 additions and 9296 deletions

View file

@ -606,6 +606,25 @@ pam_permit_tenet_bull_decision = {
save_scope_as = selected_item
}
}
else_if = { # A tenet intrinsic to the faith is restored before anything else is sanctioned
limit = {
any_character_tenet = {
knowledge_filter = known
pam_tenet_can_be_permitted_trigger = yes
pam_tenet_ai_should_permit_intrinsic_trigger = { CHARACTER = scope:actor }
}
}
ordered_character_tenet = {
knowledge_filter = known
limit = {
pam_tenet_can_be_permitted_trigger = yes
pam_tenet_ai_should_permit_intrinsic_trigger = { CHARACTER = scope:actor }
}
order_by = pam_raw_tenet_popularity_value
position = 0
save_scope_as = selected_item
}
}
else_if = { # A tenet the faith adores gets sanctioned whether or not the Pope cares for it
limit = {
any_character_tenet = {
@ -649,6 +668,10 @@ pam_permit_tenet_bull_decision = {
this = tenet:tenet_love_under_will
}
}
modifier = {
factor = anathema_to_faith_ai_weight_factor
tenet_is_anathema_to_faith_trigger = { FAITH = scope:actor.faith }
}
}
save_scope_as = selected_item
}
@ -674,6 +697,10 @@ pam_permit_tenet_bull_decision = {
this = tenet:tenet_love_under_will
}
}
modifier = {
factor = anathema_to_faith_ai_weight_factor
tenet_is_anathema_to_faith_trigger = { FAITH = scope:actor.faith }
}
}
save_scope_as = selected_item
}
@ -710,6 +737,10 @@ pam_permit_tenet_bull_decision = {
pam_tenet_can_be_permitted_no_actor_trigger = yes
pam_tenet_is_overwhelmingly_popular_trigger = { CHARACTER = root }
}
any_character_tenet = {
knowledge_filter = known
pam_tenet_ai_should_permit_intrinsic_trigger = { CHARACTER = root }
}
}
}
@ -876,6 +907,31 @@ pam_prohibit_tenet_bull_decision = {
save_scope_as = selected_item
}
}
else_if = { # An anathema the faith permits is struck down next
limit = {
any_character_tenet = {
knowledge_filter = known
pam_tenet_can_be_prohibited_trigger = yes
scope:actor = {
NOT = { has_personal_tenet = scope:pam_tenet_candidate }
}
pam_tenet_ai_should_prohibit_anathema_trigger = { CHARACTER = scope:actor }
}
}
ordered_character_tenet = {
knowledge_filter = known
limit = {
pam_tenet_can_be_prohibited_trigger = yes
scope:actor = {
NOT = { has_personal_tenet = scope:pam_tenet_candidate }
}
pam_tenet_ai_should_prohibit_anathema_trigger = { CHARACTER = scope:actor }
}
order_by = pam_raw_tenet_popularity_value
position = 0
save_scope_as = selected_item
}
}
else = {
random_undesired_tenet = {
limit = {
@ -916,6 +972,14 @@ pam_prohibit_tenet_bull_decision = {
}
pam_tenet_ai_should_purge_trigger = { CHARACTER = root }
}
any_character_tenet = {
knowledge_filter = known
pam_tenet_can_be_prohibited_no_actor_trigger = yes
root = {
NOT = { has_personal_tenet = scope:pam_tenet_candidate }
}
pam_tenet_ai_should_prohibit_anathema_trigger = { CHARACTER = root }
}
any_undesired_tenet = {
known_tenets = yes
only_negative = yes

View file

@ -102,6 +102,10 @@ declare_antipope_decision = {
limit = { pam_antipope_declaration_discounted_trigger = yes }
multiply = 0.67
}
if = {
limit = { gg_excommunicated_ghibelline_leader_in_dictatus_papae_trigger = yes }
multiply = 0.5
}
}
}
treasury = {
@ -119,6 +123,10 @@ declare_antipope_decision = {
limit = { pam_antipope_declaration_discounted_trigger = yes }
multiply = 0.67
}
if = {
limit = { gg_excommunicated_ghibelline_leader_in_dictatus_papae_trigger = yes }
multiply = 0.5
}
}
}
piety = {
@ -131,6 +139,10 @@ declare_antipope_decision = {
limit = { pam_antipope_declaration_discounted_trigger = yes }
multiply = 0.67
}
if = {
limit = { gg_excommunicated_ghibelline_leader_in_dictatus_papae_trigger = yes }
multiply = 0
}
if = {
limit = {
has_variable = antipope_squabble_unlock
@ -226,7 +238,10 @@ declare_antipope_decision = {
ai_potential = {
is_adult = yes
ai_zeal >= 0
OR = {
ai_zeal >= 0
gg_excommunicated_ghibelline_leader_in_dictatus_papae_trigger = yes
}
any_vassal_or_below = {
pam_valid_antipope_clergy_vassal_trigger = { LIEGE = root }
}
@ -260,23 +275,22 @@ declare_antipope_decision = {
step = 5
max = 25
}
modifier = {
add = 25
gg_excommunicated_ghibelline_leader_in_dictatus_papae_trigger = yes
}
modifier = {
factor = 2
OR = {
has_relation_rival = faith.religious_head
has_relation_nemesis = faith.religious_head
}
has_relation_rival = faith.religious_head
}
modifier = { # AI shouldn't usually do this if they're main rite
factor = 0.15
rite = faith.main_rite
gg_excommunicated_ghibelline_leader_in_dictatus_papae_trigger = no
}
modifier = {
factor = 0
OR = {
has_relation_friend = faith.religious_head
has_relation_best_friend = faith.religious_head
}
has_relation_friend = faith.religious_head
}
}
}
@ -558,17 +572,11 @@ declare_yourself_antipope_decision = {
}
modifier = {
factor = 2
OR = {
has_relation_rival = faith.religious_head
has_relation_nemesis = faith.religious_head
}
has_relation_rival = faith.religious_head
}
modifier = {
factor = 0
OR = {
has_relation_friend = faith.religious_head
has_relation_best_friend = faith.religious_head
}
has_relation_friend = faith.religious_head
}
}
}

View file

@ -55,6 +55,8 @@ pam_decision_confession = {
sort_order = 110
is_shown = {
is_landless_adventurer = no
is_landless_merchant = no
has_spiritual_fulfillment_type = christian_fulfillment
root.rite ?= {
has_at_least_tenet_status = {
@ -135,17 +137,18 @@ pam_decision_act_of_devotion = {
ai_check_interval_by_tier = {
barony = 0
county = 60
duchy = 60
kingdom = 48
county = 120
duchy = 120
kingdom = 60
empire = 48
hegemony = 24
hegemony = 12
}
sort_order = 80
is_shown = {
has_spiritual_fulfillment_type = christian_fulfillment
has_fulfillment_parameter = sp_act_of_devotion_decision
has_pam_dlc_trigger = yes
is_landless_adventurer = no
}
@ -228,10 +231,10 @@ pam_mentor_sp_decision = {
ai_check_interval_by_tier = {
barony = 0
county = 24
duchy = 24
kingdom = 12
empire = 12
county = 120
duchy = 120
kingdom = 60
empire = 24
hegemony = 12
}
@ -239,6 +242,7 @@ pam_mentor_sp_decision = {
is_shown = {
has_spiritual_fulfillment_type = christian_fulfillment
has_fulfillment_parameter = sp_mentor_in_sp
has_pam_dlc_trigger = yes
}
@ -362,8 +366,8 @@ pam_establish_theocratic_dynasty_decision = {
ai_check_interval_by_tier = {
barony = 0
county = 0
duchy = 48
kingdom = 24
duchy = 120
kingdom = 60
empire = 12
hegemony = 12
}
@ -429,6 +433,7 @@ pam_convert_to_theocracy_decision = {
reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
}
decision_group_type = realm
sort_order = 40
desc = pam_convert_to_theocracy_decision_desc
selection_tooltip = pam_convert_to_theocracy_decision_tooltip
@ -635,6 +640,7 @@ pam_convert_theocracy_to_feudal_decision = {
reference = "gfx/interface/illustrations/decisions/decision_realm.dds"
}
decision_group_type = realm
sort_order = 40
desc = pam_convert_theocracy_to_feudal_decision_desc
selection_tooltip = pam_convert_theocracy_to_feudal_decision_tooltip
@ -683,7 +689,7 @@ pam_convert_theocracy_to_feudal_decision = {
culture = { has_cultural_pillar = ethos_stoic }
culture = { has_cultural_tradition = tradition_legalistic }
has_realm_law = church_authority_3
capital_county = { development_level > medium_development_level }
capital_county = { prosperity_level > medium_prosperity_level }
dynasty ?= { has_dynasty_perk = law_legacy_5 }
dynasty ?= { has_dynasty_perk = erudition_legacy_5 }
NOT = { has_trait = zealous }
@ -792,9 +798,7 @@ pam_kowtow_to_pope_decision = {
is_shown = {
exists = top_participant_group:the_christian_church
situation:the_christian_church ?= {
situation_current_phase = investiture_crisis
}
situation:the_christian_church ?= { situation_current_phase = investiture_crisis }
government_is_religious_trigger = no
is_christian_trigger = yes
has_pam_dlc_trigger = yes
@ -836,6 +840,20 @@ pam_kowtow_to_pope_decision = {
modifier = grateful_opinion
opinion = 20
}
if = {
limit = {
is_ghibelline_leader_trigger = yes
faith = { religious_head_title ?= title:k_papal_state }
NOT = { has_trait = excommunicated }
pam_is_antipope_sponsor_trigger = no
}
gg_reconciliation_catalyst_effect = {
ACTOR = root
RECIPIENT = faith.religious_head
CATALYST = catalyst_gg_submission_to_pope
ONCE_A_YEAR = no
}
}
}
send_interface_toast = {
type = event_toast_effect_good
@ -848,6 +866,8 @@ pam_kowtow_to_pope_decision = {
}
ai_potential = {
situation:the_christian_church ?= { situation_current_phase = investiture_crisis }
religion ?= religion:christianity_religion
has_pam_dlc_trigger = yes
government_is_religious_trigger = no
}
@ -883,6 +903,7 @@ pam_determine_patron_saint_decision = {
# Christian specific
is_christian_trigger = yes
NOT = { has_variable = pam_chose_patron_saint_var }
has_personal_tenet_flag = tenet_dulia_can_select_patron_saint
has_pam_dlc_trigger = yes
}
@ -998,8 +1019,8 @@ pam_determine_patron_saint_decision = {
ai_check_interval_by_tier = {
barony = 0
county = 96
duchy = 96
county = 120
duchy = 120
kingdom = 96
empire = 96
hegemony = 96
@ -1216,15 +1237,15 @@ create_hof_decision = {
}
ai_potential = {
faith ?= {
NOT = { exists = religious_head }
OR = { has_doctrine_parameter = spiritual_head_of_faith has_doctrine_parameter = temporal_head_of_faith }
}
is_adult = yes
# Defer to a same-faith liege; they should be the one establishing the HoF
OR = {
top_liege = this
NOT = {
any_liege_or_above = {
faith = root.faith
}
}
NOT = { any_liege_or_above = { faith = root.faith } }
}
}
@ -1233,6 +1254,337 @@ create_hof_decision = {
}
}
#TODO_PAM: Test debug decision, remove if no longer needed as demo
start_test_select_rite = {
picture = {
reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
}
decision_group_type = debug
ai_check_interval_by_tier = {
barony = 0
county = 0
duchy = 0
kingdom = 0
empire = 0
hegemony = 0
}
sort_order = 110
is_shown = {
always = no # Disabled from GDP onwards
}
is_valid = {
scope:selected_item ?= { exists = this }
}
is_valid_showing_failures_only = {
always = yes
}
cooldown = { years = 0 }
effect = {
scope:actor = {
set_character_rite = scope:selected_item
}
}
ai_potential = {
always = yes
}
ai_will_do = {
base = 1000
}
widget = {
gui = "decision_view_widget_select_rite"
controller = select_scope_object
show_from_start = no
setup_items = {
scope:actor = {
every_available_rite = {
limit = {
scope:actor.rite != this
}
add_to_list = item_list
}
}
}
default_item = {
scope:actor = {
rite = {
save_scope_as = selected_item
}
}
}
ai_item_will_do = {
value = 100
if = {
limit = {
"divergence(faith.main_rite)" >= minor_rite_divergence_value
}
add = 50
}
}
}
}
#TODO_PAM: Test debug decision, remove if no longer needed as demo
start_test_select_tenet = {
picture = {
reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
}
decision_group_type = debug
ai_check_interval_by_tier = {
barony = 0
county = 0
duchy = 0
kingdom = 0
empire = 0
hegemony = 0
}
sort_order = 110
is_shown = {
always = no # Disabled from GDP onwards
}
is_valid = {
always = yes
}
is_valid_showing_failures_only = {
exists = scope:selected_item
}
cooldown = { years = 0 }
effect = {
scope:actor = {
every_personal_tenet = {
scope:actor = {
remove_personal_tenet = prev
}
}
set_personal_tenet = scope:selected_item
pam_remove_forbidden_personal_tenet_secret_if_invalid_effect = yes
}
}
ai_potential = {
always = yes
}
ai_will_do = {
base = 1000
}
widget = {
gui = "decision_view_widget_select_tenet"
controller = select_scope_object
show_from_start = yes
decision_to_second_step_button = "SELECT"
setup_items = {
scope:actor = {
every_character_tenet = {
knowledge_filter = known
add_to_list = item_list
}
}
}
default_item = {
scope:actor = {
random_personal_tenet = {
save_scope_as = selected_item
}
}
}
is_item_valid = {
this != tenet:tenet_confession
}
ai_select_item = {
scope:actor = {
random_personal_tenet = {
save_scope_as = selected_item
}
}
}
}
}
#TODO_PAM: Test debug decision, remove if no longer needed as demo
start_test_select_character = {
picture = {
reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
}
decision_group_type = debug
is_shown = {
debug_only = yes
}
ai_check_interval_by_tier = {
barony = 0
county = 0
duchy = 0
kingdom = 0
empire = 0
hegemony = 0
}
sort_order = 110
is_valid = {
always = yes
}
is_valid_showing_failures_only = {
exists = scope:selected_item
}
cooldown = { years = 0 }
effect = {
scope:selected_item = {
add_trait = saint
}
}
ai_potential = {
always = yes
}
ai_will_do = {
base = 1000
}
widget = {
gui = "decision_view_widget_select_character"
controller = select_scope_object
show_from_start = yes
decision_to_second_step_button = "SELECT"
setup_items = {
scope:actor = {
every_ancestor = {
even_if_dead = yes
limit = {
is_alive = no
NOT = { has_trait = saint }
}
add_to_list = item_list
}
}
}
default_item = {
scope:actor = {
random_ancestor = {
even_if_dead = yes
limit = {
is_alive = no
NOT = { has_trait = saint }
}
save_scope_as = selected_item
}
}
}
is_item_valid = {
is_alive = no
}
ai_select_item = {
scope:actor = {
random_ancestor = {
even_if_dead = yes
limit = {
is_alive = no
NOT = { has_trait = saint }
}
save_scope_as = selected_item
}
}
}
}
}
#TODO_PAM: Test debug decision, remove if no longer needed as demo
start_test_select_kingdom = {
picture = {
reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
}
decision_group_type = debug
ai_check_interval_by_tier = {
barony = 0
county = 0
duchy = 0
kingdom = 0
empire = 0
hegemony = 0
}
sort_order = 110
is_shown = {
always = no # Disabled from GDP onwards
}
is_valid = {
always = yes
}
is_valid_showing_failures_only = {
always = yes
}
cooldown = { years = 0 }
effect = {}
ai_potential = {
always = yes
}
ai_will_do = {
base = 1000
}
widget = {
controller = select_kingdom_title
title_valid = {
# Title must have real land under it
exists = capital_vassal.capital_vassal
# At least 5 de-jure counties must be hostile to our faith
any_in_de_jure_hierarchy = {
continue = { tier > tier_county }
tier = tier_county
count >= 5
scope:ruler.faith.main_rite = {
is_hostile_enough_for_holy_war_trigger = { RITE = prev.holder.top_liege.rite }
}
}
}
}
}
# Levy the Tithes
pam_levy_the_tithes_decision = {
picture = {
@ -1260,9 +1612,14 @@ pam_levy_the_tithes_decision = {
}
is_shown = {
is_landless_adventurer = no
is_landless_merchant = no
any_character_situation = { # You are part of the Christian Situation
situation_type = the_christian_church
}
top_participant_group:the_christian_church ?= {
has_participant_group_parameter = the_christian_church_levy_the_tithes_decision
}
has_pam_dlc_trigger = yes
is_clergy = no
is_ruler = yes
@ -1339,15 +1696,16 @@ pam_send_legatine_mission_decision = {
barony = 0
county = 0
duchy = 0
kingdom = 24
empire = 12
kingdom = 60
empire = 24
hegemony = 12
}
is_shown = {
is_clergy = yes
any_sub_realm_county = {
always = yes
is_landed = yes
top_participant_group:the_christian_church ?= {
has_participant_group_parameter = the_christian_church_legatine_mission
}
has_pam_dlc_trigger = yes
is_ruler = yes
@ -1420,13 +1778,13 @@ pam_send_legatine_mission_decision = {
}
if = {
limit = {
development_level <= bad_development_level
prosperity_level <= bad_prosperity_level
}
add = 10
}
if = {
limit = {
county_control <= 50
county_control < county_control_baseline
}
add = 50
}
@ -3109,9 +3467,9 @@ pam_promulgate_word_of_pious_deeds_decision = {
ai_check_interval_by_tier = {
barony = 0
county = 24
duchy = 24
kingdom = 12
county = 120
duchy = 120
kingdom = 24
empire = 12
hegemony = 12
}
@ -3119,6 +3477,7 @@ pam_promulgate_word_of_pious_deeds_decision = {
sort_order = 110
is_shown = {
domicile ?= { has_domicile_parameter = unlocks_pam_propagate_word_of_my_piety_decision }
pam_can_hold_cardinalate_trigger = yes
is_clergy = yes
has_spiritual_fulfillment_type = christian_fulfillment
@ -3425,7 +3784,7 @@ pam_declare_rite_heresy_decision = {
selection_tooltip = pam_declare_rite_heresy_decision_tooltip
confirm_text = pam_declare_rite_heresy_decision_confirm
sort_order = 108
sort_order = 50
ai_check_interval_by_tier = {
barony = 0
@ -3640,7 +3999,7 @@ pam_permit_tenet_decision = {
selection_tooltip = pam_permit_tenet_decision_tooltip
confirm_text = pam_permit_tenet_decision_confirm
sort_order = 110
sort_order = 50
ai_check_interval_by_tier = {
barony = 0
@ -3743,7 +4102,26 @@ pam_permit_tenet_decision = {
ai_select_item = {
scope:actor = {
if = { # A tenet the faith adores gets sanctioned whether or not the Head of Faith cares for it
if = { # A tenet intrinsic to the faith is restored before anything else is sanctioned
limit = {
any_character_tenet = {
knowledge_filter = known
pam_tenet_can_be_permitted_trigger = yes
pam_tenet_ai_should_permit_intrinsic_trigger = { CHARACTER = scope:actor }
}
}
ordered_character_tenet = {
knowledge_filter = known
limit = {
pam_tenet_can_be_permitted_trigger = yes
pam_tenet_ai_should_permit_intrinsic_trigger = { CHARACTER = scope:actor }
}
order_by = pam_raw_tenet_popularity_value
position = 0
save_scope_as = selected_item
}
}
else_if = { # A tenet the faith adores gets sanctioned whether or not the Head of Faith cares for it
limit = {
any_character_tenet = {
knowledge_filter = known
@ -3776,6 +4154,10 @@ pam_permit_tenet_decision = {
modifier = {
add = pam_tenet_popularity_impact_value
}
modifier = {
factor = anathema_to_faith_ai_weight_factor
tenet_is_anathema_to_faith_trigger = { FAITH = scope:actor.faith }
}
}
save_scope_as = selected_item
}
@ -3791,6 +4173,10 @@ pam_permit_tenet_decision = {
religion = religion:eastern_orthodox_religion
}
OR = {
any_character_tenet = {
knowledge_filter = known
pam_tenet_ai_should_permit_intrinsic_trigger = { CHARACTER = root }
}
any_desired_tenet = {
only_positive = yes
threshold = 1
@ -3971,6 +4357,25 @@ pam_prohibit_tenet_decision = {
save_scope_as = selected_item
}
}
else_if = { # An anathema the faith permits is struck down next
limit = {
any_character_tenet = {
knowledge_filter = known
pam_tenet_can_be_prohibited_trigger = yes
pam_tenet_ai_should_prohibit_anathema_trigger = { CHARACTER = scope:actor }
}
}
ordered_character_tenet = {
knowledge_filter = known
limit = {
pam_tenet_can_be_prohibited_trigger = yes
pam_tenet_ai_should_prohibit_anathema_trigger = { CHARACTER = scope:actor }
}
order_by = pam_raw_tenet_popularity_value
position = 0
save_scope_as = selected_item
}
}
else = {
random_undesired_tenet = {
limit = {
@ -4006,6 +4411,11 @@ pam_prohibit_tenet_decision = {
pam_tenet_can_be_prohibited_no_actor_trigger = yes
pam_tenet_ai_should_purge_trigger = { CHARACTER = root }
}
any_character_tenet = {
knowledge_filter = known
pam_tenet_can_be_prohibited_no_actor_trigger = yes
pam_tenet_ai_should_prohibit_anathema_trigger = { CHARACTER = root }
}
any_undesired_tenet = {
known_tenets = yes
only_negative = yes
@ -4827,6 +5237,8 @@ pam_persecute_tenet_decision = {
}
is_shown = {
is_landless_adventurer = no
is_landless_merchant = no
has_tenet_popularity_trigger = yes
is_playable_character = yes
has_pam_dlc_trigger = yes
@ -5079,6 +5491,7 @@ consecrate_kingdom_decision = {
}
is_landed_or_landless_administrative = yes
is_confederation_member = no
NOT = { government_has_flag = government_is_republic }
OR = {
exists = rite.head_of_rite
exists = faith.religious_head
@ -6072,7 +6485,7 @@ pam_invite_syncretic_exiles_decision = {
limit = {
pam_personal_syncretism_exile_rite_trigger = yes
}
order_by = var:converted_development
order_by = var:converted_prosperity
save_scope_as = target_rite
}
}
@ -6306,7 +6719,7 @@ pam_personal_sacrifice_of_wealth_decision = {
ai_item_will_do = {
value = 10
if = {
limit = { development_level <= bad_development_level }
limit = { prosperity_level <= bad_prosperity_level }
add = 50
}
if = {
@ -6350,7 +6763,7 @@ pam_personal_sacrifice_of_wealth_decision = {
}
modifier = {
factor = 0
NOT = { any_sub_realm_county = { development_level <= bad_development_level } }
NOT = { any_sub_realm_county = { prosperity_level <= bad_prosperity_level } }
}
}
}
@ -6420,8 +6833,10 @@ pam_develop_clerical_court_decision = {
}
ai_potential = {
is_available_adult = yes
is_at_war = no
pam_government_is_religious_playable_trigger = yes
short_term_treasury_or_gold >= minor_treasury_or_gold_value
OR = {
any_courtier = { pam_clerical_court_ordain_candidate_trigger = yes }
any_courtier = { pam_clerical_court_pupil_trigger = yes }

View file

@ -635,7 +635,8 @@ pam_extract_relic_decision = {
}
ai_potential = {
always = yes
# Must stay at or below the lowest possible pam_extract_relic_piety_cost, or the AI cannot afford the decision
piety >= 1250
}
ai_will_do = {