so much event updating

This commit is contained in:
trashmasteruni 2026-04-25 13:36:44 +02:00
parent c4b6d9bdeb
commit 811167944e
135 changed files with 4885 additions and 297691 deletions

View file

@ -4128,10 +4128,8 @@ scripted_trigger ach_coronation_0016_eligible_artifact = {
NOR = {
artifact_slot_type = helmet
artifact_slot_type = regalia
has_variable = banner_house
has_variable = banner_dynasty
has_variable = 1025_treasure_map
}
artifact_can_be_gift_to_trigger = { RECIPIENT = scope:host }
artifact_durability > 10
}
@ -4342,6 +4340,7 @@ ach_coronation.0016 = {
}
}
ordered_character_artifact = { # Try and give away the worst one first
limit = { artifact_can_be_gift_to_trigger = { RECIPIENT = scope:host } }
order_by = {
value = 1
if = {
@ -5371,6 +5370,7 @@ scripted_trigger ach_coronation_0018_eligible_family_member_trigger = {
scripted_trigger ach_coronation_0018_grantable_title_trigger = {
tier = tier_county
this != scope:host.capital_county
is_landless_type_title = no
}
scripted_effect ach_coronation_0018_choose_title_effect = {
@ -6356,6 +6356,13 @@ ach_coronation.0020 = {
trigger = {
involved_activity = {
activity_host = {
any_held_title = {
tier = tier_county
this != prev.capital_county
is_landless_type_title = no
}
}
any_attending_character = {
ach_coronation_0018_eligible_family_member_trigger = yes
}
@ -6708,11 +6715,9 @@ ach_coronation.0022 = {
# Ongoing plague
any_sub_realm_county = {
count >= 3
any_county_province = {
any_province_epidemic = {
count >= 1
outbreak_intensity > minor
}
any_county_province_epidemic = {
count >= 1
outbreak_intensity > minor
}
}
}
@ -6738,11 +6743,9 @@ ach_coronation.0022 = {
# Ongoing plague
any_sub_realm_county = {
count >= 10
any_county_province = {
any_province_epidemic = {
count >= 1
outbreak_intensity > minor
}
any_county_province_epidemic = {
count >= 1
outbreak_intensity > minor
}
}
}
@ -6755,11 +6758,9 @@ ach_coronation.0022 = {
# Ongoing plague
any_sub_realm_county = {
count >= 3
any_county_province = {
any_province_epidemic = {
count >= 1
outbreak_intensity > major
}
any_county_province_epidemic = {
count >= 1
outbreak_intensity > major
}
}
}
@ -6788,11 +6789,9 @@ ach_coronation.0022 = {
limit = {
any_sub_realm_county = {
count >= 4
any_county_province = {
any_province_epidemic = {
count >= 1
outbreak_intensity = apocalyptic
}
any_county_province_epidemic = {
count >= 1
outbreak_intensity = apocalyptic
}
}
}
@ -6913,7 +6912,6 @@ ach_coronation.0022 = {
}
}
}
custom_tooltip = available_because_intent_tt
flavor = ach_coronation.0022.a.coronation_disrupt_loyalists.flavor
reason = activity_intent
skill = diplomacy
@ -7022,7 +7020,7 @@ ach_coronation.0022 = {
option = { # It's not our goodly Host's fault!
name = ach_coronation.0022.a.offer_support
trigger = { has_activity_intent = coronation_offer_support }
custom_tooltip = available_because_intent_tt
reason = activity_intent
flavor = ach_coronation.0022.a.offer_support.flavor
add_piety = medium_piety_loss

View file

@ -1,720 +0,0 @@
namespace = ach_maintenance_events
ach_maintenance_events.0001 = { # Clean up of Coronation realm law, will happen 1 tick after you gain the title (due to on_actions)
type = character_event
hidden = yes
trigger = {
coronation_trigger = yes
}
immediate = {
if = {
limit = {
NOT = {
has_game_rule = coronation_laws_off
}
}
if = {
limit = {
has_variable = crowned_king_var
NOT = { has_realm_law = crowned_king }
}
add_realm_law_skip_effects = crowned_king
}
else_if = {
limit = {
has_variable = crowned_emperor_var
NOT = { has_realm_law = crowned_emperor }
}
add_realm_law_skip_effects = crowned_emperor
}
else_if = {
limit = {
NOR = {
has_variable = crowned_king_var
has_variable = crowned_emperor_var
}
NOT = { has_realm_law = uncrowned }
}
add_realm_law_skip_effects = uncrowned
}
}
}
}
ach_maintenance_events.0002 = { # ACH Oath synergy culture rewards
type = character_event
hidden = yes
trigger = {
has_variable = mend_the_fracture_oath_target_culture
culture ?= {
has_cultural_tradition = oath_mend_the_fracture_tradition
}
top_liege = root
var:mend_the_fracture_oath_target_culture = {
has_cultural_tradition = oath_mend_the_fracture_tradition
NOT = { this = root.culture }
any_culture_county = {
count >= 3
top_liege = root.top_liege
}
}
}
immediate = {
# calculate the chances of a positive thing happening
set_variable = {
name = synergy_cultures_chance
value = 0.1
}
set_variable = {
name = synergy_cultures_amount
value = 0
}
var:mend_the_fracture_oath_target_culture = {
if = {
limit = {
cultural_acceptance = {
target = root.culture
value >= 99
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.4
}
}
}
else_if = {
limit = {
cultural_acceptance = {
target = root.culture
value >= 80
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.3
}
}
}
else_if = {
limit = {
cultural_acceptance = {
target = root.culture
value >= 60
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.2
}
}
}
else_if = {
limit = {
cultural_acceptance = {
target = root.culture
value >= 40
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.1
}
}
}
if = {
limit = {
culture_head ?= {
opinion = {
target = root
value >= 80
}
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.3
}
}
}
else_if = {
limit = {
culture_head ?= {
opinion = {
target = root
value >= 40
}
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.2
}
}
}
else_if = {
limit = {
culture_head ?= {
opinion = {
target = root
value >= 20
}
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.1
}
}
}
}
if = {
limit = {
exists = var:mend_the_fracture_oath_target_culture.culture_head
}
if = {
limit = {
opinion = {
target = var:mend_the_fracture_oath_target_culture.culture_head
value >= 80
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.3
}
}
}
else_if = {
limit = {
opinion = {
target = var:mend_the_fracture_oath_target_culture.culture_head
value >= 40
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.2
}
}
}
else_if = {
limit = {
opinion = {
target = var:mend_the_fracture_oath_target_culture.culture_head
value >= 20
}
}
root = {
change_variable = {
name = synergy_cultures_chance
add = 0.1
}
}
}
}
if = {
limit = {
prestige_level = 5
}
change_variable = {
name = synergy_cultures_chance
add = 0.2
}
}
else_if = {
limit = {
prestige_level = 4
}
change_variable = {
name = synergy_cultures_chance
add = 0.15
}
}
else_if = {
limit = {
prestige_level = 3
}
change_variable = {
name = synergy_cultures_chance
add = 0.1
}
}
else_if = {
limit = {
prestige_level = 2
}
change_variable = {
name = synergy_cultures_chance
add = 0.05
}
}
else_if = {
limit = {
prestige_level = 1
}
change_variable = {
name = synergy_cultures_chance
add = 0.02
}
}
if = {
limit = {
var:synergy_cultures_chance >= 1
}
change_variable = {
name = synergy_cultures_amount
add = var:synergy_cultures_chance
multiply = 2
}
set_variable = {
name = synergy_cultures_chance
value = 1
}
}
# calculate the amount of a positive things happening
var:mend_the_fracture_oath_target_culture = {
every_culture_county = {
limit = {
top_liege = root.top_liege
}
change_variable = {
name = synergy_cultures_amount
add = 1
}
}
}
change_variable = {
name = synergy_cultures_amount
multiply = 0.2
multiply = var:synergy_cultures_chance
min = 1
}
while = {
limit = {
var:synergy_cultures_amount > 0
}
random_list = {
1 = {
culture ?= {
random_culture_county = {
limit = {
NOT = {
has_county_modifier = oath_mend_the_fracture_county
}
holder = root
}
alternative_limit = {
NOT = {
has_county_modifier = oath_mend_the_fracture_county
}
top_liege = root.top_liege
}
alternative_limit = {
NOT = {
has_county_modifier = oath_mend_the_fracture_county
}
}
add_county_modifier = {
modifier = oath_mend_the_fracture_county
years = 2
}
add_to_list = synergy_culture_counties
}
}
var:mend_the_fracture_oath_target_culture = {
random_culture_county = {
limit = {
NOT = {
has_county_modifier = oath_mend_the_fracture_county
}
holder = root
}
alternative_limit = {
NOT = {
has_county_modifier = oath_mend_the_fracture_county
}
top_liege = root.top_liege
}
alternative_limit = {
NOT = {
has_county_modifier = oath_mend_the_fracture_county
}
}
add_county_modifier = {
modifier = oath_mend_the_fracture_county
years = 3
}
add_to_list = synergy_culture_counties
}
}
save_scope_as = county_reward
}
1 = {
modifier = {
NOT = {
root.culture.culture_head ?= root
}
factor = 0
}
spawn_army = {
name = ach_culture_synergy_troops
men_at_arms = {
type = accolade_maa_archers
stacks = 1
}
men_at_arms = {
type = accolade_maa_skirmishers
stacks = 1
}
location = root.capital_province
uses_supply = no
inheritable = yes
}
var:mend_the_fracture_oath_target_culture = {
if = {
limit = {
NOT = {
culture_head ?= root
}
}
}
culture_head ?= {
spawn_army = {
name = ach_culture_synergy_troops
men_at_arms = {
type = accolade_maa_skirmishers
stacks = 1
}
location = root.capital_province
uses_supply = no
inheritable = yes
}
}
}
save_scope_as = army_reward
}
1 = {
modifier = {
NOT = {
root.culture.culture_head ?= root
var:mend_the_fracture_oath_target_culture.culture_head != root
}
factor = 0
}
modifier = {
opinion = {
target = var:mend_the_fracture_oath_target_culture.culture_head
value = 100
}
factor = 0
}
add_opinion = {
target = var:mend_the_fracture_oath_target_culture.culture_head
opinion = 20
modifier = ach_synergy_culture_opinion
}
save_scope_as = opinion_reward
}
}
change_variable = {
name = synergy_cultures_amount
subtract = 1
}
}
# inform the player about what happened
send_interface_message = {
title = ach_maintenance_events.0002.title
if = {
limit = {
exists = scope:army_reward
}
custom_tooltip = ach_maintenance_events.0002.army_reward
}
if = {
limit = {
exists = scope:opinion_reward
}
custom_tooltip = ach_maintenance_events.0002.opinion_reward
}
if = {
limit = {
exists = scope:county_reward
}
every_in_list = {
list = synergy_culture_counties
show_as_tooltip = {
add_county_modifier = {
modifier = oath_mend_the_fracture_county
years = 2
}
}
}
}
}
if = {
limit = {
var:mend_the_fracture_oath_target_culture = {
any_culture_county = {
holder = {
culture = var:mend_the_fracture_oath_target_culture
is_ai = no
}
}
}
}
send_interface_message = {
title = ach_maintenance_events.0002.title
if = {
limit = {
exists = scope:army_reward
}
custom_tooltip = ach_maintenance_events.0002.army_reward
}
if = {
limit = {
exists = scope:opinion_reward
}
custom_tooltip = ach_maintenance_events.0002.opinion_reward
}
if = {
limit = {
exists = scope:county_reward
}
every_in_list = {
list = synergy_culture_counties
show_as_tooltip = {
add_county_modifier = {
modifier = oath_mend_the_fracture_county
years = 2
}
}
}
}
}
}
remove_variable = synergy_cultures_chance
remove_variable = synergy_cultures_amount
}
}
ach_maintenance_events.0100 = { #Coronation host is ded, notify guests
type = character_event
title = ach_maintenance_events.0100.t
desc = ach_maintenance_events.0100.desc
theme = realm
left_portrait = {
character = root
animation = shock
}
right_portrait = {
character = scope:host
animation = dead
}
immediate = {
}
option = {
name = ach_maintenance_events.0100.a
}
}
ach_maintenance_events.0101 = { #Coronation host has been imprisoned, notify guests
type = character_event
title = ach_maintenance_events.0101.t
desc = ach_maintenance_events.0101.desc
theme = realm
left_portrait = {
character = root
animation = shock
}
right_portrait = {
character = scope:host
animation = prisonhouse
}
lower_left_portrait = {
character = scope:gaoler
}
immediate = {
scope:host.imprisoner = {
save_scope_as = gaoler
}
}
trigger = {
NOT = { #you know what you did
this = scope:host.imprisoner
}
}
option = {
name = ach_maintenance_events.0101.a
}
}
ach_maintenance_events.0102 = { #Coronation host has been imprisoned, notify host and cancellation
type = character_event
title = ach_maintenance_events.0102.t
desc = ach_maintenance_events.0102.desc
theme = realm
left_portrait = {
character = root
animation = prisonhouse
}
right_portrait = {
character = scope:gaoler
animation = manic
}
immediate = {
scope:host.imprisoner = {
save_scope_as = gaoler
}
}
option = {
name = ach_maintenance_events.0102.a
}
}
ach_maintenance_events.0103 = { #No one shows up, notify host
type = character_event
title = ach_maintenance_events.0103.t
desc = ach_maintenance_events.0103.desc
theme = realm
left_portrait = {
character = root
animation = worry
}
immediate = {
}
option = {
name = ach_maintenance_events.0103.a
}
}
ach_maintenance_events.0104 = { #Officiator ded, host cancelled the coronation, notify guests
type = character_event
title = ach_maintenance_events.0104.t
desc = ach_maintenance_events.0104.desc
theme = realm
left_portrait = {
character = root
animation = stunned
}
right_portrait = {
character = scope:host
animation = wailing
}
lower_right_portrait = {
character = scope:dead_officiator
}
immediate = {
scope:activity.var:officiator ?= { save_scope_as = dead_officiator }
}
option = {
name = ach_maintenance_events.0104.a
}
}
ach_maintenance_events.0105 = { #Host excommunicated, notify guests
type = character_event
title = ach_maintenance_events.0105.t
desc = ach_maintenance_events.0105.desc
theme = realm
left_portrait = {
character = root
animation = worry
}
center_portrait = {
character = scope:host
animation = shame
}
right_portrait = {
character = scope:hof
animation = go_to_your_room
}
immediate = {
faith.religious_head = { save_scope_as = hof }
}
option = {
name = ach_maintenance_events.0105.a
}
}
ach_maintenance_events.0106 = { #Host excommunicated, notify host
type = character_event
title = ach_maintenance_events.0106.t
desc = ach_maintenance_events.0106.desc
theme = realm
left_portrait = {
character = root
animation = shame
}
right_portrait = {
character = scope:hof
animation = go_to_your_room
}
immediate = {
faith.religious_head = { save_scope_as = hof }
}
option = {
name = ach_maintenance_events.0106.a
}
}