#####################################
# All We Are Not #
# by Jason Cantalini #
# 6040 #
#####################################
scripted_trigger bp2_yearly_6040_higher_cultural_era_trigger = {
OR = {
AND = {
NOT = {
root.culture = { has_cultural_era_or_later = culture_era_early_medieval }
}
has_cultural_era_or_later = culture_era_early_medieval
}
AND = {
NOT = {
root.culture = { has_cultural_era_or_later = culture_era_high_medieval }
}
has_cultural_era_or_later = culture_era_high_medieval
}
AND = {
NOT = {
root.culture = { has_cultural_era_or_later = culture_era_late_medieval }
}
has_cultural_era_or_later = culture_era_late_medieval
}
}
}
scripted_trigger bp2_yearly_6040_equal_or_higher_cultural_era_trigger = {
OR = {
AND = {
root.culture = { has_cultural_era_or_later = culture_era_tribal }
has_cultural_era_or_later = culture_era_tribal
}
AND = {
root.culture = { has_cultural_era_or_later = culture_era_early_medieval }
has_cultural_era_or_later = culture_era_early_medieval
}
AND = {
root.culture = { has_cultural_era_or_later = culture_era_high_medieval }
has_cultural_era_or_later = culture_era_high_medieval
}
AND = {
root.culture = { has_cultural_era_or_later = culture_era_late_medieval }
has_cultural_era_or_later = culture_era_late_medieval
}
}
}
scripted_trigger bp2_yearly_6040_better_capital_trigger = {
#the culture head of the other culture is more magnificent than root's culture head
OR = {
AND = {
culture_head = {
has_royal_court = yes
}
root.culture.culture_head ?= {
has_royal_court = no
}
}
AND = {
root.culture.culture_head ?= {
has_royal_court = yes
}
culture_head = {
has_royal_court = yes
court_grandeur_current > root.court_grandeur_current
}
}
AND = {
culture_head.capital_province.county = {
county.development_level >= root.capital_province.county.development_level
}
culture_head.capital_province.county = {
county.development_level >= root.culture.culture_head.capital_province.county.development_level
}
}
}
}
# You consider integrating the ways and advancements of the culture that raised you into your realm
bp2_yearly.6040 = {
type = character_event
content_source = dlc_009
title = bp2_yearly.6040.t
desc = {
desc = bp2_yearly.6040.desc
first_valid = {
triggered_desc = {
trigger = {
has_character_flag = hostage_childhood
}
desc = bp2_yearly.6040.hostage
}
desc = bp2_yearly.6040.education
}
desc = bp2_yearly.6040.outro
}
theme = culture_change
override_background = bp2_nursery
left_portrait = {
character = root
animation = chancellor
}
trigger = {
NOT = { is_landless_adventurer = yes }
has_bp2_dlc_trigger = yes
is_valid_for_narrow_yearly_events_adult = yes
#you need to be in a position where you can reform your culture and realm at once
culture = capital_province.culture
highest_held_title_tier >= tier_duchy
is_landed = yes
#Learned enough to get the idea
learning >= low_skill_rating
#Didn't say no to this event before
NOT = { has_character_flag = had_event_bp2_yearly_6040 }
#you were raised in a foreign court, as a hostage or ward
OR = {
any_memory = {
OR = {
has_memory_type = childhood_education_guardian
has_memory_type = childhood_education_no_guardian
}
has_variable = education_location
has_variable = education_location_culture
has_variable = education_host_culture
save_temporary_scope_as = ward_memory_temp
#Check you were educated in a foreign place by foreigners
scope:ward_memory_temp.var:education_location_culture = {
save_temporary_scope_as = education_location_culture
}
scope:ward_memory_temp.var:education_host_culture = {
has_same_culture_heritage = scope:education_location_culture
}
scope:education_location_culture = {
save_temporary_scope_as = foreign_culture
NOT = {
this = root.culture
}
#culture has a ruler
exists = culture_head
#figure out if they're more advanced
OR = {
bp2_yearly_6040_higher_cultural_era_trigger = yes
AND = {
root = {
government_has_flag = government_is_tribal
}
culture_head = {
NOT = {
government_has_flag = government_is_tribal
}
}
}
bp2_yearly_6040_better_capital_trigger = yes
}
NOT = {
culture_head = {
government_has_flag = government_is_tribal
}
}
bp2_yearly_6040_equal_or_higher_cultural_era_trigger = yes
root.culture = {
can_get_innovation_from = scope:foreign_culture
}
}
scope:ward_memory_temp.var:education_location = {
county.development_level >= root.capital_province.county.development_level
}
}
any_memory = {
has_memory_type = hostage_returned_hostage
has_variable = hostage_location
has_variable = hostage_location_culture
has_variable = hostage_warden_culture
save_temporary_scope_as = hostage_memory_temp
#Check you were educated in a foreign place by foreigners
scope:hostage_memory_temp.var:hostage_warden_culture = {
has_same_culture_heritage = scope:hostage_memory_temp.var:hostage_location_culture
}
scope:hostage_memory_temp.var:hostage_location_culture = {
save_temporary_scope_as = foreign_culture
NOT = {
this = root.culture
}
#culture has a ruler
exists = culture_head
#figure out if they're more advanced
OR = {
bp2_yearly_6040_higher_cultural_era_trigger = yes
AND = {
root = {
government_has_flag = government_is_tribal
}
culture_head = {
NOT = {
government_has_flag = government_is_tribal
}
}
}
bp2_yearly_6040_better_capital_trigger = yes
}
NOT = {
culture_head = {
government_has_flag = government_is_tribal
}
}
bp2_yearly_6040_equal_or_higher_cultural_era_trigger = yes
root.culture = {
can_get_innovation_from = scope:foreign_culture
}
}
scope:hostage_memory_temp.var:hostage_location = {
county.development_level >= root.capital_province.county.development_level
}
}
}
}
weight_multiplier = {
base = 1
#If you got this event before and chose to delay it for later, this should pretty much ensure you will get the event again
modifier = {
factor = 5
has_character_flag = delayed_event_bp2_yearly_6040
}
modifier = {
factor = 2
culture = {
has_cultural_pillar = ethos_egalitarian
}
}
modifier = {
factor = 0.5
culture = {
has_cultural_parameter = ai_doesnt_marry_outside_culture
}
}
modifier = {
factor = 0.5
culture = {
has_cultural_parameter = harder_to_hybridize
}
}
modifier = {
factor = 0.5
learning < medium_skill_rating
}
modifier = {
factor = 2
learning > very_high_skill_rating
}
}
immediate = {
#Either triggered from hostage memory type or ward one; need to save their variables as scopes
if = {
limit = {
any_memory = {
has_memory_type = hostage_returned_hostage
has_variable = hostage_location
has_variable = hostage_location_culture
}
}
random_memory = {
limit = {
has_memory_type = hostage_returned_hostage
has_variable = hostage_location
has_variable = hostage_location_culture
}
save_scope_as = foreign_court_memory
var:hostage_location = {
save_scope_as = childhood_location
}
var:hostage_location_culture = {
save_scope_as = advanced_culture
}
var:hostage_realm ?= {
save_scope_as = advanced_realm
}
var:hostage_warden_faith ?= {
save_scope_as = advanced_culture_faith
}
memory_participant:warden ?= {
save_scope_as = foreign_warden
}
}
}
else = {
random_memory = {
limit = {
OR = {
has_memory_type = childhood_education_guardian
has_memory_type = childhood_education_no_guardian
}
has_variable = education_location
has_variable = education_location_culture
}
save_scope_as = foreign_court_memory
var:education_location = {
save_scope_as = childhood_location
}
var:education_location_culture = {
save_scope_as = advanced_culture
}
var:education_realm ?= {
save_scope_as = advanced_realm
}
var:education_host_faith ?= {
save_scope_as = advanced_culture_faith
}
memory_participant:guardian ?= {
save_scope_as = foreign_educator
}
}
}
if = {
limit = {
scope:foreign_court_memory = {
has_memory_type = hostage_returned_hostage
has_variable = hostage_location
has_variable = hostage_location_culture
}
}
add_character_flag = hostage_childhood
}
else = {
add_character_flag = education_childhood
}
}
#There is much we could learn from them
option = {
name = bp2_yearly.6040.a
flavor = bp2_yearly.6040.a.tt
custom_tooltip = bp2_yearly.6040.a.reforms
if = {
limit = {
root = root.culture.culture_head
}
culture = {
change_cultural_acceptance = {
target = scope:advanced_culture
value = miniscule_positive_culture_acceptance
desc = cultural_acceptance_gain_beginning_reforms
}
}
}
custom_tooltip = bp2_yearly.6040.a.warning
add_prestige = major_prestige_loss
create_story = story_foreign_raised_reformer
#So there isn't a second reform in one lifetime
add_character_flag = had_event_bp2_yearly_6040
#save variables for the story
set_variable = {
name = childhood_location
value = scope:childhood_location
}
set_variable = {
name = advanced_culture
value = scope:advanced_culture
}
if = {
limit = {
exists = scope:advanced_realm
}
set_variable = {
name = advanced_realm
value = scope:advanced_realm
}
}
if = {
limit = {
exists = scope:foreign_educator
}
set_variable = {
name = foreign_educator
value = scope:foreign_educator
}
}
if = {
limit = {
exists = scope:advanced_culture_faith
}
set_variable = {
name = advanced_culture_faith
value = scope:advanced_culture_faith
}
}
stress_impact = {
profligate = minor_stress_impact_loss
scholar = miniscule_stress_impact_loss
content = medium_stress_impact_gain
lazy = medium_stress_impact_gain
humble = minor_stress_impact_gain
paranoid = minor_stress_impact_gain
}
ai_chance = {
base = 20
ai_value_modifier = {
ai_energy = 1
ai_boldness = 1
}
modifier = {
factor = 0
OR = {
has_trait = content
has_trait = lazy
has_trait = humble
has_trait = paranoid
}
}
}
}
#NEVER! My people are proud and unique
option = {
name = bp2_yearly.6040.b
flavor = bp2_yearly.6040.b.tt
add_character_flag = had_event_bp2_yearly_6040
add_character_modifier = {
modifier = devoted_to_tradition_modifier
years = 25
}
custom_tooltip = bp2_yearly.6040.b.promote_culture
custom_tooltip = bp2_yearly.6040.b.no_reforms
if = {
limit = {
has_character_flag = hostage_childhood
}
remove_character_flag = hostage_childhood
}
if = {
limit = {
has_character_flag = education_childhood
}
remove_character_flag = education_childhood
}
stress_impact = {
arrogant = miniscule_stress_impact_loss
zealous = miniscule_stress_impact_loss
eccentric = major_stress_impact_gain
diligent = minor_stress_impact_gain
cynical = minor_stress_impact_gain
}
ai_chance = {
base = 10
ai_value_modifier = {
ai_zeal = 1
ai_sociability = -1
}
modifier = {
factor = 0
OR = {
has_trait = eccentric
has_trait = diligent
has_trait = cynical
}
}
}
}
#Perhaps... but now is not the right time
option = {
name = bp2_yearly.6040.c
custom_tooltip = bp2_yearly.6040.c.recurring
add_character_flag = delayed_event_bp2_yearly_6040
if = {
limit = {
has_character_flag = hostage_childhood
}
remove_character_flag = hostage_childhood
}
if = {
limit = {
has_character_flag = education_childhood
}
remove_character_flag = education_childhood
}
stress_impact = {
impatient = medium_stress_impact_gain
ambitious = medium_stress_impact_gain
}
ai_chance = {
base = 10
ai_value_modifier = {
ai_energy = -1
ai_zeal = -1
}
modifier = {
factor = 0
OR = {
has_trait = impatient
has_trait = ambitious
has_trait = fickle
}
}
}
}
}