Professional Documents
Culture Documents
Childhood Education Events
Childhood Education Events
namespace = childhood_education
####################################################################
###################################################################
immediate = {
random_relation = {
type = ward
save_scope_as = ward
}
if = {
limit = {
OR = {
has_education_diplomacy_trigger = yes
has_focus_diplomacy = yes
diplomacy >= high_skill_rating
}
scope:ward = {
has_focus = education_diplomacy
}
}
add_character_flag = matching_education
}
else_if = {
limit = {
OR = {
has_education_martial_trigger = yes
has_focus_martial = yes
martial >= high_skill_rating
}
scope:ward = {
has_focus = education_martial
}
}
add_character_flag = matching_education
}
else_if = {
limit = {
OR = {
has_education_stewardship_trigger = yes
has_focus_stewardship = yes
stewardship >= high_skill_rating
}
scope:ward = {
has_focus = education_stewardship
}
}
add_character_flag = matching_education
}
else_if = {
limit = {
OR = {
has_education_intrigue_trigger = yes
has_focus_intrigue = yes
intrigue >= high_skill_rating
}
scope:ward = {
has_focus = education_intrigue
}
}
add_character_flag = matching_education
}
else_if = {
limit = {
OR = {
has_education_learning_trigger = yes
has_focus_learning = yes
learning >= high_skill_rating
}
scope:ward = {
has_focus = education_learning
}
}
add_character_flag = matching_education
}
if = {
limit = {
OR = {
has_education_diplomacy_trigger = yes
has_focus_diplomacy = yes
diplomacy >= high_skill_rating
}
scope:ward = {
has_character_flag = diplomacy_previous_education
}
}
add_character_flag = previously_matching_education
}
else_if = {
limit = {
OR = {
has_education_martial_trigger = yes
has_focus_martial = yes
martial >= high_skill_rating
}
scope:ward = {
has_character_flag = martial_previous_education
}
}
add_character_flag = previously_matching_education
}
else_if = {
limit = {
OR = {
has_education_stewardship_trigger = yes
has_focus_stewardship = yes
stewardship >= high_skill_rating
}
scope:ward = {
has_character_flag = stewardship_previous_education
}
}
add_character_flag = previously_matching_education
}
else_if = {
limit = {
OR = {
has_education_intrigue_trigger = yes
has_focus_intrigue = yes
intrigue >= high_skill_rating
}
scope:ward = {
has_character_flag = intrigue_previous_education
}
}
add_character_flag = previously_matching_education
}
else_if = {
limit = {
OR = {
has_education_learning_trigger = yes
has_focus_learning = yes
learning >= high_skill_rating
}
scope:ward = {
has_character_flag = learning_previous_education
}
}
add_character_flag = previously_matching_education
}
}
option = {
name = childhood_education.0004.a
}
after = {
remove_character_flag = previously_matching_education
remove_character_flag = matching_education
scope:ward = {
remove_character_flag = martial_previous_education
remove_character_flag = intrigue_previous_education
remove_character_flag = diplomacy_previous_education
remove_character_flag = learning_previous_education
remove_character_flag = stewardship_previous_education
}
}
}
childhood_education.0005 = {
hidden = yes
trigger = {
OR = {
has_focus = education_diplomacy
has_focus = education_martial
has_focus = education_stewardship
has_focus = education_learning
has_focus = education_intrigue
}
}
immediate = {
set_focus = no
}
}
########################
# Religious and Cultural Conversion
# 1000+
# System by Petter Vilberg
########################
childhood_education.1001 = {
hidden = yes
trigger = {
any_relation = {
type = guardian
OR = {
AND = {
has_relation_flag = {
target = root
relation = ward
flag = convert_faith
}
NOT = { faith = root.faith }
}
AND = {
has_relation_flag = {
target = root
relation = ward
flag = convert_culture
}
NOT = { culture = root.culture }
}
}
}
}
immediate = {
random_relation = {
type = guardian
save_scope_as = guardian
}
if = {
limit = {
scope:guardian = {
has_relation_flag = {
target = root
relation = ward
flag = convert_faith
}
}
NOT = { faith = scope:guardian.faith }
}
if = {
limit = {
has_variable = education_faith_conversion_chance
}
change_variable = {
name = education_faith_conversion_chance
add = 20
}
random = {
chance = var:education_faith_conversion_chance
save_temporary_scope_value_as = {
name = convert_faith
value = yes
}
}
}
else = {
set_variable = {
name = education_faith_conversion_chance
value = 0
}
}
}
if = {
limit = {
scope:guardian = {
has_relation_flag = {
target = root
relation = ward
flag = convert_culture
}
}
NOT = { culture = scope:guardian.culture }
}
if = {
limit = {
has_variable = education_culture_conversion_chance
}
change_variable = {
name = education_culture_conversion_chance
add = 10
}
random = {
chance = var:education_culture_conversion_chance
save_temporary_scope_value_as = {
name = convert_culture
value = yes
}
}
}
else = {
set_variable = {
name = education_culture_conversion_chance
value = 0
}
}
}
trigger = {
scope:guardian = {
is_alive = yes
}
has_relation_guardian = scope:guardian
}
immediate = {
play_music_cue = "mx_cue_faith_conversion"
save_scope_as = ward
}
option = {
name = childhood_education.1011.a
set_character_faith = scope:guardian.faith
set_culture = scope:guardian.culture
hidden_effect = {
scope:guardian = {
remove_relation_flag = {
target = root
relation = ward
flag = convert_culture
}
}
scope:guardian = {
trigger_event = childhood_education.1012
}
}
}
}
#Message to Guardian
childhood_education.1012 = {
type = character_event
title = childhood_education.1012.t
desc = childhood_education.1012.desc
theme = education
left_portrait = scope:ward
immediate = {
play_music_cue = "mx_cue_faith_conversion"
scope:ward = {
set_character_faith = scope:guardian.faith
set_culture = scope:guardian.culture
}
hidden_effect = {
if = {
limit = {
exists = scope:ward.father
scope:ward.father = {
is_alive = yes
NOT = { this = root }
}
}
scope:ward.father = {
save_scope_as = father
send_interface_message = {
type = send_interface_message_as_toast
title =
child_culture_and_faith_converted.parent.message
left_icon = scope:ward
right_icon = scope:educator
show_as_tooltip = {
scope:ward = {
set_character_faith =
scope:guardian.faith
set_culture =
scope:guardian.culture
}
}
}
}
}
if = {
limit = {
exists = scope:ward.mother
scope:ward.mother = {
is_alive = yes
NOT = { this = root }
}
}
scope:ward.mother = {
save_scope_as = mother
send_interface_message = {
type = send_interface_message_as_toast
title =
child_culture_and_faith_converted.parent.message
left_icon = scope:ward
right_icon = scope:educator
show_as_tooltip = {
scope:ward = {
set_character_faith =
scope:guardian.faith
set_culture =
scope:guardian.culture
}
}
}
}
}
}
}
option = {
name = childhood_education.1012.a
trigger = {
NOT = {
is_parent_of = scope:ward
}
}
}
option = {
name = childhood_education.1012.a
trigger = {
is_parent_of = scope:ward
}
}
}
#Convert Faith
childhood_education.1021 = {
type = character_event
title = childhood_education.1021.t
desc = childhood_education.1021.desc
theme = education
left_portrait = scope:guardian
trigger = {
scope:guardian = {
is_alive = yes
}
has_relation_guardian = scope:guardian
}
immediate = {
play_music_cue = "mx_cue_faith_conversion"
save_scope_as = ward
}
option = {
name = childhood_education.1021.a
set_character_faith = scope:guardian.faith
hidden_effect = {
scope:guardian = {
trigger_event = childhood_education.1022
}
}
}
}
#Message to Guardian
childhood_education.1022 = {
type = character_event
title = childhood_education.1022.t
desc = childhood_education.1022.desc
theme = education
left_portrait = scope:ward
immediate = {
play_music_cue = "mx_cue_faith_conversion"
show_as_tooltip = {
scope:ward = {
set_character_faith = scope:guardian.faith
}
}
hidden_effect = {
if = {
limit = {
exists = scope:ward.father
scope:ward.father = {
is_alive = yes
NOT = { this = root }
}
}
scope:ward.father = {
save_scope_as = father
send_interface_message = {
type = send_interface_message_as_toast
title = child_faith_converted.parent.message
left_icon = scope:ward
right_icon = scope:educator
show_as_tooltip = {
scope:ward = {
set_character_faith =
scope:guardian.faith
}
}
}
}
}
if = {
limit = {
exists = scope:ward.mother
scope:ward.mother = {
is_alive = yes
NOT = { this = root }
}
}
scope:ward.mother = {
save_scope_as = mother
send_interface_message = {
type = send_interface_message_as_toast
title = child_faith_converted.parent.message
left_icon = scope:ward
right_icon = scope:educator
show_as_tooltip = {
scope:ward = {
set_character_faith =
scope:guardian.faith
}
}
}
}
}
}
}
option = {
name = childhood_education.1022.a
}
}
#Convert Culture
childhood_education.1031 = {
type = character_event
title = childhood_education.1031.t
desc = childhood_education.1031.desc
theme = education
left_portrait = scope:guardian
trigger = {
scope:guardian = {
is_alive = yes
}
has_relation_guardian = scope:guardian
}
immediate = {
play_music_cue = "mx_cue_faith_conversion"
save_scope_as = ward
}
option = {
name = childhood_education.1031.a
set_culture = scope:guardian.culture
hidden_effect = {
scope:guardian = {
trigger_event = childhood_education.1032
}
}
}
}
#Message to Guardian
childhood_education.1032 = {
type = character_event
title = childhood_education.1032.t
desc = childhood_education.1032.desc
theme = education
left_portrait = scope:ward
immediate = {
play_music_cue = "mx_cue_faith_conversion"
show_as_tooltip = {
scope:ward = {
set_culture = scope:guardian.culture
}
}
hidden_effect = {
if = {
limit = {
exists = scope:ward.father
scope:ward.father = {
is_alive = yes
NOT = { this = root }
}
}
scope:ward.father = {
save_scope_as = father
send_interface_message = {
type = send_interface_message_as_toast
title = child_culture_converted.parent.message
left_icon = scope:ward
right_icon = scope:educator
show_as_tooltip = {
scope:ward = {
set_culture =
scope:guardian.culture
}
}
}
}
}
if = {
limit = {
exists = scope:ward.mother
scope:ward.mother = {
is_alive = yes
NOT = { this = root }
}
}
scope:ward.mother = {
save_scope_as = mother
send_interface_message = {
type = send_interface_message_as_toast
title = child_culture_converted.parent.message
left_icon = scope:ward
right_icon = scope:educator
show_as_tooltip = {
scope:ward = {
set_culture =
scope:guardian.culture
}
}
}
}
}
}
}
option = {
name = childhood_education.1032.a
}
}
#########################
##
## EDUCATION MAINTENANCE
##
#########################
immediate = {
education_point_acquisition_effect = yes
}
}
immediate = {
add_patronage_spouse_education_points_effect = yes
}
}
# Pedagogy effect
childhood_education.9004 = {
hidden = yes
trigger = {
age >= 8
any_relation = {
type = guardian
has_perk = pedagogy_perk
}
}
immediate = {
save_scope_as = child
random_relation = {
type = guardian
limit = {
has_perk = pedagogy_perk
}
save_scope_as = guardian
}
if = {
limit = {
age >= 10
NOR = {
has_relation_friend = scope:guardian
has_relation_best_friend = scope:guardian
has_relation_rival = scope:guardian
has_relation_nemesis = scope:guardian
}
}
random = {
chance = 20
compare_modifier = {
trigger = {
age >= 14
}
value = age
multiplier = 2
}
save_scope_value_as = {
name = set_friendship
value = yes
}
}
}
random_list = {
80 = { }
4 = { # Gain Diplomacy
send_interface_toast = {
title = childhood_education.9004.child_message
left_icon = scope:guardian
add_diplomacy_skill = 1
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:guardian
}
}
scope:guardian = {
send_interface_message = {
type = event_diplomacy_good
title =
childhood_education.9004.guardian_message
left_icon = scope:child
show_as_tooltip = {
scope:child = {
add_diplomacy_skill = 1
}
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:child
}
}
}
}
}
4 = { # Gain Martial
send_interface_toast = {
title = childhood_education.9004.child_message
left_icon = scope:guardian
add_martial_skill = 1
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:guardian
}
}
scope:guardian = {
send_interface_message = {
type = event_martial_good
title =
childhood_education.9004.guardian_message
left_icon = scope:child
show_as_tooltip = {
scope:child = {
add_martial_skill = 1
}
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:child
}
}
}
}
}
4 = { # Gain Learning
send_interface_toast = {
title = childhood_education.9004.child_message
left_icon = scope:guardian
add_learning_skill = 1
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:guardian
}
}
scope:guardian = {
send_interface_message = {
type = event_learning_good
title =
childhood_education.9004.guardian_message
left_icon = scope:child
show_as_tooltip = {
scope:child = {
add_learning_skill = 1
}
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:child
}
}
}
}
}
4 = { # Gain Intrigue
send_interface_toast = {
title = childhood_education.9004.child_message
left_icon = scope:guardian
add_intrigue_skill = 1
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:guardian
}
}
scope:guardian = {
send_interface_message = {
type = event_intrigue_good
title =
childhood_education.9004.guardian_message
left_icon = scope:child
show_as_tooltip = {
scope:child = {
add_intrigue_skill = 1
}
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:child
}
}
}
}
}
4 = { # Gain Stewardship
send_interface_toast = {
title = childhood_education.9004.child_message
left_icon = scope:guardian
add_stewardship_skill = 1
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:guardian
}
}
scope:guardian = {
send_interface_message = {
type = event_stewardship_good
title =
childhood_education.9004.guardian_message
left_icon = scope:child
show_as_tooltip = {
scope:child = {
add_stewardship_skill = 1
}
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:child
}
}
}
}
}
2 = { # Gain Prowess
send_interface_toast = {
title = childhood_education.9004.child_message
left_icon = scope:guardian
add_prowess_skill = 1
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:guardian
}
}
scope:guardian = {
send_interface_message = {
type = event_prowess_good
title =
childhood_education.9004.guardian_message
left_icon = scope:child
show_as_tooltip = {
scope:child = {
add_prowess_skill = 1
}
if = {
limit = {
exists = scope:set_friendship
}
set_relation_friend = scope:child
}
}
}
}
}
}
}
}
trigger = {
NOT = { has_character_flag = natural_education_progression }
}
immediate = {
set_variable = {
name = years_missing_from_education
value = root.age
}
while = {
limit = {
var:years_missing_from_education > 6
}
education_point_acquisition_effect = yes
change_variable = {
name = years_missing_from_education
add = -1
}
}
add_character_flag = natural_education_progression
remove_variable = years_missing_from_education
}
}