More rel bugs

This commit is contained in:
Heidesommer 2026-05-23 20:45:31 -04:00
parent 16e7f0de2a
commit c6d5c01c61
125 changed files with 337211 additions and 3069 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,329 @@
namespace = ep3_laamp_flavor_oltner
scripted_trigger suitable_pool_marriage_trigger = {
save_temporary_scope_as = pool_marriage_target
is_physically_able_adult = yes
allowed_to_marry_character_gender_trigger = { CHARACTER = $FOLLOWER_TARGET$ }
$FOLLOWER_TARGET$ ?= { allowed_to_marry_character_gender_trigger = { CHARACTER = prev } }
are_characters_sensible_lovers_trigger = { INSTIGATING_LOVER = $FOLLOWER_TARGET$ TARGET_OF_LOVE = scope:pool_marriage_target }
is_married = no
can_marry_trigger = yes
is_concubine = no
NOT = {
exists = betrothed
}
has_no_particular_noble_roots_trigger = yes
}
scripted_trigger suitable_follower_marriage_character_trigger = {
is_physically_able_adult = yes
this != root
is_married = no
can_marry_trigger = yes
is_concubine = no
age <= 50
health >= fine_health
is_faith_dominant_gender = no
NOR = {
house = root.house
is_close_family_of = root
exists = betrothed
has_relation_rival = root
}
save_temporary_scope_as = entourage_member
any_pool_character = {
province = root.location
age <= 40
health >= fine_health
suitable_pool_marriage_trigger = { FOLLOWER_TARGET = scope:entourage_member }
}
}
# A Follower's Heart
ep3_laamp_flavor_oltner.0001 = {
type = character_event
title = ep3_laamp_flavor_oltner.3001.t
desc = ep3_laamp_flavor_oltner.3001.desc
theme = marriage
override_background = { reference = market_scope }
left_portrait = {
character = scope:entourage_to_marry_2
animation = beg
camera = camera_event_very_left
}
right_portrait = {
character = scope:marriage_material
animation = dismissal
camera = camera_event_right_pointing_left
}
cooldown = { years = 10 }
trigger = {
has_government = landless_adventurer_government
location = {
has_holding = yes
}
any_courtier = {
suitable_follower_marriage_character_trigger = yes
}
}
immediate = {
save_scope_as = root_char
random_courtier = {
limit = {
suitable_follower_marriage_character_trigger = yes
}
save_scope_as = entourage_to_marry_2
}
random_pool_character = {
province = root.location
limit = {
suitable_pool_marriage_trigger = { FOLLOWER_TARGET = scope:entourage_to_marry_2 }
}
save_scope_as = marriage_material
}
location.county.title_province = { save_scope_as = background_market_scope }
}
option = { # Tell them to pay it themselves
name = ep3_laamp_flavor_oltner.0001.a
trigger = {
scope:entourage_to_marry_2.gold >= {
add = scope:marriage_material.sum_of_all_skills_and_prowess_value
}
}
scope:entourage_to_marry_2 = {
remove_short_term_gold = {
add = scope:marriage_material.sum_of_all_skills_value
add = scope:marriage_material.prowess
}
}
add_courtier = scope:marriage_material
scope:entourage_to_marry_2 = {
if = {
limit = {
is_female = yes
is_lowborn = no
scope:marriage_material = {
is_lowborn = yes
}
}
marry_matrilineal = scope:marriage_material
}
else_if = {
limit = {
is_male = yes
is_lowborn = yes
scope:marriage_material = {
is_lowborn = no
}
}
marry_matrilineal = scope:marriage_material
}
else = {
marry = scope:marriage_material
}
}
ai_chance = {
base = 100
}
}
option = { # Pay the dowry
name = ep3_laamp_flavor_oltner.0001.b
stress_impact = {
generous = massive_stress_impact_loss
greedy = medium_stress_impact_gain
}
remove_short_term_gold = {
add = scope:marriage_material.sum_of_all_skills_and_prowess_value
}
add_courtier = scope:marriage_material
scope:entourage_to_marry_2 = {
if = {
limit = {
is_female = yes
is_lowborn = no
scope:marriage_material = {
is_lowborn = yes
}
}
marry_matrilineal = scope:marriage_material
}
else_if = {
limit = {
is_male = yes
is_lowborn = yes
scope:marriage_material = {
is_lowborn = no
}
}
marry_matrilineal = scope:marriage_material
}
else = {
marry = scope:marriage_material
}
progress_towards_friend_effect = {
CHARACTER = root
OPINION = 0
REASON = friend_helped_me_marry
}
add_opinion = {
target = root
modifier = grateful_opinion
opinion = 50
}
}
scope:marriage_material = { save_scope_as = relationship_reason_involved_character }
clear_saved_scope = relationship_reason_involved_character
ai_chance = {
base = 10
modifier = {
factor = 0
OR = {
has_trait = greedy
gold <= {
add = scope:marriage_material.sum_of_all_skills_and_prowess_value
multiply = 2
}
}
}
}
}
option = { # Convince them to run away with you
name = ep3_laamp_flavor_oltner.0001.c
skill = intrigue
stress_impact = {
generous = medium_stress_impact_gain
}
duel = {
skill = intrigue
value = high_skill_rating
50 = {
compare_modifier = {
value = scope:duel_value
multiplier = 3.5
min = -49
}
desc = ep3_laamp_flavor_oltner.0001.c.success
send_interface_toast = {
title = ep3_laamp_flavor_oltner.0001.c.success
left_icon = scope:entourage_to_marry_2
right_icon = scope:marriage_material
add_courtier = scope:marriage_material
scope:entourage_to_marry_2 = {
if = {
limit = {
is_female = yes
is_lowborn = no
scope:marriage_material = {
is_lowborn = yes
}
}
marry_matrilineal = scope:marriage_material
}
else_if = {
limit = {
is_male = yes
is_lowborn = yes
scope:marriage_material = {
is_lowborn = no
}
}
marry_matrilineal = scope:marriage_material
}
else = {
marry = scope:marriage_material
}
progress_towards_friend_effect = {
CHARACTER = root
OPINION = 0
REASON = friend_helped_me_marry
}
add_opinion = {
target = root
modifier = grateful_opinion
opinion = 50
}
}
scope:marriage_material = { save_scope_as = relationship_reason_involved_character }
clear_saved_scope = relationship_reason_involved_character
}
}
50 = {
compare_modifier = {
value = scope:duel_value
multiplier = -3.5
min = -49
}
desc = ep3_laamp_flavor_oltner.0001.c.failure
send_interface_toast = {
title = ep3_laamp_flavor_oltner.0001.c.failure
left_icon = scope:entourage_to_marry_2
right_icon = scope:marriage_material
scope:entourage_to_marry_2 = {
add_stress = medium_stress_gain
add_opinion = {
target = root
modifier = disappointed_opinion
opinion = -30
}
}
}
}
}
ai_chance = {
base = 10
modifier = {
factor = 0
has_trait = generous
}
}
}
option = { # Ignore your follower
name = ep3_laamp_flavor_oltner.0001.d
stress_impact = {
compassionate = medium_stress_impact_gain
generous = medium_stress_impact_gain
callous = minor_stress_impact_loss
sadistic = minor_stress_impact_loss
chaste = minor_stress_impact_loss
shy = minor_stress_impact_loss
}
scope:entourage_to_marry_2 = {
add_opinion = {
target = root
modifier = heartbroken_opinion
opinion = -30
}
}
ai_chance = {
base = 10
modifier = {
factor = 0
OR = {
has_trait = compassionate
has_trait = generous
}
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,533 @@
namespace = ep3_roman_restoration
#######################################
###
### EP3 RESTORE ROME STORY CYCLE EVENTS
### by Chad Uhl
###
### 0100 Justinian's Dream
### 0101-0109 Rome Reformed Notifications
### 0300-0590 Post-Restoration Difficulties
###
#######################################
# Justinian's Dream
# Event fired on story cycle setup informing the player that they can form the roman empire
ep3_roman_restoration.0001 = {
type = character_event
title = ep3_roman_restoration.0001.t
desc = ep3_roman_restoration.0001.desc
theme = emperor
override_background = {
trigger = { capital_county = title:c_byzantion }
reference = ep3_constantinople
}
left_portrait = {
character = root
animation = emotion_thinking_scepter
}
trigger = {
NOT = { has_global_variable = flag_restored_roman_empire }
}
option = {
name = ep3_roman_restoration.0001.a
custom_tooltip = ep3_roman_restoration.0001.a.tt
decision:restore_roman_empire_decision = {
open_view_data = {
view = decision_detail
player = root
}
}
}
}
# Should I LARP or nah?
ep3_roman_restoration.0100 = {
type = character_event
window = fullscreen_event
title = ep3_roman_restoration.0100.t
desc = ep3_roman_restoration.0100.desc
theme = emperor
override_background = { reference = ep3_fullscreen_restore_rome }
immediate = {
save_scope_as = scoped_emperor
}
option = { # LARP (Hard Mode)
name = ep3_roman_restoration.0100.a
custom_tooltip = ep3_roman_restoration.hard_mode
custom_tooltip = ep3_roman_restoration.end_hard_mode
custom_tooltip = ep3_roman_restoration.invasion_cb
every_held_title = {
limit = {
is_head_of_faith = yes
}
root = {
destroy_title = prev
}
}
set_character_faith = faith:hellenic_pagan
if = {
limit = {
faith:hellenic_pagan = { has_doctrine = doctrine_monotheist }
}
custom_description_no_bullet = { text = mandala_monotheist_warning_tt }
}
primary_title = { set_state_faith = faith:hellenic_pagan }
every_held_title = {
custom = custom.every_held_county
title_tier = county
set_county_faith = faith:hellenic_pagan
}
every_vassal = {
custom = custom.every_vassal
limit = {
NOT = {
any_held_title = {
is_head_of_faith = yes # you cannot convert the Ecumenical Patriarch, sorry
}
}
}
custom_tooltip = {
text = may_choose_to_convert_hellenic_desc
run_interaction = { # We use the same interaction as when creating a new faith to keep a consistent behaviour, since that is essentially what you're doing here
interaction = ask_for_conversion_interaction
actor = root
recipient = this
execute_threshold = accept
}
}
}
custom_tooltip = {
text = ep3_roman_restoration.household_gods_tenet
set_global_variable = household_gods_tenet_unlocked
}
custom_tooltip = {
text = uses_custom_caesar_flavourization_tt
set_variable = uses_custom_caesar_flavourization
}
if = {
limit = {
any_owned_story = { type = ep3_story_cycle_restoring_rome }
}
random_owned_story = {
type = ep3_story_cycle_restoring_rome
set_variable = roman_empire_hard_mode
}
}
}
option = { # Roleplay option (become Hellenic without Hard Mode)
name = ep3_roman_restoration.0100.c
custom_tooltip = ep3_roman_restoration.easy_mode
every_held_title = {
limit = {
is_head_of_faith = yes
}
root = {
destroy_title = prev
}
}
set_character_faith = faith:hellenic_pagan
if = {
limit = {
faith:hellenic_pagan = { has_doctrine = doctrine_monotheist }
}
custom_description_no_bullet = { text = mandala_monotheist_warning_tt }
}
primary_title = { set_state_faith = faith:hellenic_pagan }
every_held_title = {
custom = custom.every_held_county
title_tier = county
set_county_faith = faith:hellenic_pagan
}
every_vassal = {
custom = custom.every_vassal
limit = {
NOT = {
any_held_title = {
is_head_of_faith = yes # you cannot convert the Ecumenical Patriarch, sorry
}
}
}
custom_tooltip = {
text = may_choose_to_convert_hellenic_desc
run_interaction = { # We use the same interaction as when creating a new faith to keep a consistent behaviour, since that is essentially what you're doing here
interaction = ask_for_conversion_interaction
actor = root
recipient = this
execute_threshold = accept
}
}
}
custom_tooltip = {
text = ep3_roman_restoration.household_gods_tenet
set_global_variable = household_gods_tenet_unlocked
}
custom_tooltip = {
text = uses_custom_caesar_flavourization_tt
set_variable = uses_custom_caesar_flavourization
}
}
option = { # Easy Mode
name = ep3_roman_restoration.0100.b
custom_tooltip = ep3_roman_restoration.easy_mode
}
after = {
create_roman_empire_scripted_effect = yes
set_nickname_effect = { NICKNAME = nick_the_glorious }
# Send narrative fluff to other players (if any).
every_player = {
limit = { this != root }
trigger_event = ep3_roman_restoration.0101
}
}
}
# Some chucklefuck restored Rome
ep3_roman_restoration.0101 = {
type = character_event
window = fullscreen_event
title = roman_restoration.0002.t
desc = {
desc = ep3_roman_restoration.0101.intro
first_valid = {
triggered_desc = {
trigger = { scope:scoped_emperor.primary_title.state_faith ?= faith:hellenic_pagan }
desc = ep3_roman_restoration.0101.hellenic
}
triggered_desc = {
trigger = { scope:scoped_emperor.primary_title.state_faith ?= faith:orthodox }
desc = ep3_roman_restoration.0101.orthodox
}
desc = ep3_roman_restoration.0101.fallback
}
desc = ep3_roman_restoration.0101.outro
}
theme = emperor
override_background = { reference = ep3_fullscreen_restore_rome }
immediate = {
#Same-faith non-empire tier rulers are over-awed.
if = {
limit = { faith = scope:scoped_emperor.primary_title.state_faith }
play_music_cue = "mx_cue_epic_sacral_moment"
}
#Otherwise, this is a tacit statement of imperial threat.
else = { play_music_cue = "mx_cue_combat_2" }
}
option = {
name = ep3_roman_restoration.0101.a
}
}
#######################################
### POST-ROME DIFFICULTIES
# Your inefficient governor messed up, causing mass loss in popular opinion. Can you fix it?
ep3_roman_restoration.0300 = {
type = character_event
title = ep3_roman_restoration.0300.t
desc = ep3_roman_restoration.0300.desc
theme = emperor
left_portrait = {
character = root
animation = anger
}
right_portrait = {
character = scope:inefficient_governor
animation = shock
}
cooldown = { years = 20 }
immediate = {
ordered_vassal = {
limit = {
is_governor = yes
is_ai = yes
}
order_by = { # Mostly sort by governor efficiency
value = governor_efficiency
multiply = -10
# Prefer governors with a larger realm size for more difficulty
add = sub_realm_size
}
save_scope_as = inefficient_governor
}
custom_tooltip = ep3_roman_restoration.0300.efficiency
}
option = { # Stewardship Challenge
name = ep3_roman_restoration.0300.a
duel = {
skill = stewardship
value = excellent_skill_level
50 = {
compare_modifier = {
value = scope:duel_value
multiplier = 3.5
min = -49
}
send_interface_toast = {
type = event_toast_effect_good
title = ep3_roman_restoration.0300.a.success
left_icon = scope:inefficient_governor
right_icon = scope:inefficient_governor.primary_title
scope:inefficient_governor = {
every_sub_realm_county = {
custom = ep3_roman_restoration.0300.every_sub_realm_county
add_county_modifier = {
modifier = restore_rome_recuperated_county_opinion_modifier
years = 10
}
}
}
}
}
50 = {
compare_modifier = {
value = scope:duel_value
multiplier = -3.5
min = -49
}
send_interface_toast = {
type = event_toast_effect_bad
title = ep3_roman_restoration.0300.a.failure
left_icon = scope:inefficient_governor
right_icon = scope:inefficient_governor.primary_title
scope:inefficient_governor = {
every_sub_realm_county = {
custom = ep3_roman_restoration.0300.every_sub_realm_county
add_county_modifier = {
modifier = restore_rome_devastated_county_opinion_modifier
years = 10
}
}
}
}
}
}
}
option = { # Fire the Governor
name = ep3_roman_restoration.0300.b
change_influence = massive_influence_loss
save_scope_as = actor
scope:inefficient_governor = {
save_scope_as = recipient
primary_title = { save_scope_as = landed_title }
}
save_scope_value_as = {
name = hook
value = no
}
scope:inefficient_governor = {
every_sub_realm_county = {
custom = ep3_roman_restoration.0300.every_sub_realm_county
add_county_modifier = {
modifier = restore_rome_recuperated_county_opinion_modifier
years = 10
}
}
force_step_down_landed_titles = yes
}
}
option = { # Opt-Out
name = ep3_roman_restoration.0300.c
scope:inefficient_governor = {
every_sub_realm_county = {
custom = ep3_roman_restoration.0300.every_sub_realm_county
add_county_modifier = {
modifier = restore_rome_lowered_county_opinion_modifier
years = 10
}
}
}
stress_impact = {
base = medium_stress_impact_loss
lazy = minor_stress_impact_loss
diligent = medium_stress_impact_gain
ambitious = minor_stress_impact_gain
}
}
}
# Every 10-30 years, a random kingdom will raid you
ep3_roman_restoration.0500 = {
type = character_event
title = ep3_roman_restoration.0500.t
desc = ep3_roman_restoration.0500.desc
theme = emperor
left_portrait = {
character = root
animation = emotion_thinking_scepter
}
right_portrait = {
character = scope:marshal
animation = inspect_weapon
}
lower_center_portrait = scope:target_kingdom
cooldown = { years = { 10 30 } }
trigger = {
exists = cp:councillor_marshal
any_neighboring_top_liege_realm_owner = {
is_ai = yes
is_at_war = no
primary_title = { tier >= tier_kingdom }
NOR = {
is_allied_to = root
any_truce_target = { this = root }
has_relation_friend = root
has_relation_lover = root
}
any_top_realm_border_county = {
any_neighboring_county = {
holder.top_liege = root
NOT = {
title_province = { has_province_modifier = recently_looted_modifier }
}
}
}
}
}
immediate = {
cp:councillor_marshal = { save_scope_as = marshal }
ordered_neighboring_top_liege_realm_owner = {
limit = {
is_ai = yes
is_at_war = no
primary_title = { tier >= tier_kingdom }
any_top_realm_border_county = {
any_neighboring_county = {
holder.top_liege = root
NOT = {
title_province = { has_province_modifier = recently_looted_modifier }
}
}
}
}
order_by = {
value = 1
add = { # inverted opinion since we're looking for ppl who hate you
value = "opinion(root)"
multiply = -1
}
if = {
limit = { can_raid_trigger = yes }
add = 50
}
}
save_scope_as = target_kingdom
}
scope:target_kingdom = {
random_top_realm_border_county = {
limit = {
any_neighboring_county = {
holder.top_liege = root
NOT = {
title_province = { has_province_modifier = recently_looted_modifier }
}
}
}
random_neighboring_county = {
limit = {
holder.top_liege = root
NOT = {
title_province = { has_province_modifier = recently_looted_modifier }
}
}
save_scope_as = target_county
}
}
}
}
option = {
name = ep3_roman_restoration.0500.a
}
after = {
scope:target_kingdom = {
start_war = {
cb = ep3_roman_empire_border_war
target = root
target_title = scope:target_county
}
}
}
}
# Special Bubonic Plague Spawns - Commented out and disabled because this is not very fun
#ep3_roman_restoration.0510 = {
# hidden = yes
#
# immediate = {
# random_realm_county = {
# limit = { exists = holder }
# holder = { save_scope_as = target_holder }
# save_scope_as = infected_county
# title_province = {
# save_scope_as = target_province
# create_epidemic_outbreak = {
# type = bubonic_plague
# intensity = major
# save_scope_as = epidemic
# }
# }
# }
# trigger_event = epidemic_events.1100
# }
#}
# Mongol Invasion Spawns
ep3_roman_restoration.0520 = {
scope = none
hidden = yes
trigger = {
NOR = {
has_global_variable = mongols_have_appeared
any_player = {
THIS = culture:mongol.culture_head
realm_size >= 100
}
}
}
immediate = {
set_global_variable = {
name = mongols_have_appeared
value = yes
}
debug_log = "Mongols appeared!"
debug_log_date = yes
spawn_temujin_character_effect = yes
scope:temujin = {
save_scope_as = story_owner
create_story = story_mongol_invasion
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff