#############################################
#############################################
#                                         	#
# ZE Childhood Events					  	#
# ID ZE.12000-ZE.12999, ZE.2100-ZE.2199		#
#                                         	#
#############################################
#############################################

# Written by Tobias Bodlund, Markus Olsén and Joel Hansson

namespace = ZE

#############################################
#											#
# Main childhood trait event chains			#
# ZE.12000-ZE.12599							#
#											#
#############################################

# Bi-yearly childhood pulse - select which event chain to get, weighted by childhood focus
character_event = {
	id = ZE.12999

	hide_window = yes
	
	is_triggered_only = yes
	
	only_capable = yes
	min_age = 6
	max_age = 12
	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	immediate = {
		random_list = {
			10 = {				# Haughty
				modifier = {
					factor = 5
					has_focus = focus_ch_pride
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_haughty_events
						trait = haughty
					}
				}
				character_event = { id = ZE.12000 days = 10 random = 90 }
			}
			10 = {				# Affectionate
				modifier = {
					factor = 5
					has_focus = focus_ch_humility
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_affectionate_events
						trait = affectionate
					}
				}
				character_event = { id = ZE.12010 days = 10 random = 90 }
			}
			10 = {				# Timid
				modifier = {
					factor = 5
					has_focus = focus_ch_humility
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_timid_events
						trait = timid
						trait = rowdy # Mutually exclusive with Timid
					}
				}
				character_event = { id = ZE.12020 days = 10 random = 90 }
			}
			10 = {				# Rowdy
				modifier = {
					factor = 5
					has_focus = focus_ch_struggle
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_rowdy_events
						is_strong_trigger = yes
						is_weak_trigger = yes
						is_dumb_trigger = yes
						trait = rowdy
						trait = timid # Mutually exclusive with Rowdy
					}
				}
				character_event = { id = ZE.12030 days = 10 random = 90 }
			}
			10 = {				# Willful
				modifier = {
					factor = 5
					has_focus = focus_ch_struggle
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_willful_events
						trait = willful
					}
				}
				character_event = { id = ZE.12040 days = 10 random = 90 }
			}
			10 = {				# Brooding
				modifier = {
					factor = 5
					has_focus = focus_ch_pride
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_brooding_events
						trait = brooding
					}
				}
				character_event = { id = ZE.12050 days = 10 random = 90 }
			}
			10 = {				# Indolent
				modifier = {
					factor = 5
					has_focus = focus_ch_etiquette
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_indolent_events
						trait = indolent
					}
				}
				character_event = { id = ZE.12060 days = 10 random = 90 }
			}
			10 = {				# Playful
				modifier = {
					factor = 5
					has_focus = focus_ch_etiquette
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_playful_events
						trait = lunatic
						trait = playful
					}
				}
				character_event = { id = ZE.12070 days = 10 random = 90 }
			}
			10 = {				# Conscientious
				modifier = {
					factor = 5
					has_focus = focus_ch_duty
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_conscientious_events
						trait = conscientious
					}
				}
				character_event = { id = ZE.12080 days = 10 random = 90 }
			}
			10 = {				# Fussy
				modifier = {
					factor = 5
					has_focus = focus_ch_thrift
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_fussy_events
						trait = fussy
					}
				}
				character_event = { id = ZE.12090 days = 10 random = 90 }
			}
			10 = {				# Curious
				modifier = {
					factor = 5
					has_focus = focus_ch_thrift
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_curious_events
						trait = genius
						trait = curious
					}
				}
				character_event = { id = ZE.12100 days = 10 random = 90 }
			}
			10 = {				# Idolizer
				modifier = {
					factor = 5
					has_focus = focus_ch_faith
				}
				modifier = {
					factor = 0
					OR = {
						has_character_flag = ze_child_idolizer_events
						trait = genius
						trait = idolizer
					}
				}
				character_event = { id = ZE.12110 days = 10 random = 90 }
			}
		}
		# Culture / Religion swap from focus
		if = {
			limit = { 
				OR = {
					has_focus = focus_ch_heritage
					has_character_modifier = house_arrest
				}
				NOT = {
					educator = {
						religion = ROOT
						culture = ROOT
					}
				}
			}
			random_list = {
				30 = {
					random_list = {
						50 = {
							if = {
								limit = {
									NOT = { 
										educator = {
											religion = ROOT
										}
									}
								}
								educator = { character_event = { id = ZE.2113 days = 20 random = 200 } }
							}
							if = {
								limit = {
									NOR = {
										mother = { is_nomadic = yes }
										father = { is_nomadic = yes }
										any_sibling = { is_nomadic = yes }
										educator = {
											culture = ROOT
										}
									}
								}
								educator = { character_event = { id = ZE.2123 days = 300 random = 100 } }
							}
						}
						50 = {
							if = {
								limit = {
									NOR = {
										mother = { is_nomadic = yes }
										father = { is_nomadic = yes }
										any_sibling = { is_nomadic = yes }
										educator = {
											culture = ROOT
										}
									}
								}
								educator = { character_event = { id = ZE.2123 days = 20 random = 200 } }
							}
							if = {
								limit = {
									NOT = { 
										educator = {
											religion = ROOT
										}
									}
								}
								educator = { character_event = { id = ZE.2113 days = 300 random = 100 } }
							}
						}
					}
				}
				70 = {
					modifier = {
						factor = 0.5
						age = 8
						NOT = { has_character_modifier = house_arrest }
					}
					modifier = {
						factor = 0.25
						age = 10
						NOT = { has_character_modifier = house_arrest }
					}
				}
			}
		}
		if = {
			limit = {
				has_focus = focus_ch_faith
				NOT = {
					educator = {
						religion = ROOT
					}
				}
			}
			random_list = {
				30 = {
					educator = { character_event = { id = ZE.2103 days = 45 random = 400 } }
				}
				30 = {
					modifier = {
						age = 8
						factor = 0.5
					}
					modifier = {
						age = 10
						factor = 0
					}
				}
			}
		}
	}
}


#############################################
# Haughty									#
#############################################

# Start
character_event = {
	id = ZE.12000
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12000 # Finds x kissing servant in hallway
		trigger = {
			has_character_flag = child_haughty_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12000 # Comes upon adult beating dog
		trigger = {
			has_character_flag = child_haughty_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12000 # Peasant calls on my attention at roadside
		trigger = {
			has_character_flag = child_haughty_version_3
		}
	}
	
	is_triggered_only = yes
	
	only_capable = yes
	
	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_haughty_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}
	
	immediate = {  # Find courtier to use in events, set custom event target
		set_character_flag = ze_child_haughty_events
		random_list = { # Select event circumstances randomly but influenced by environment
			10 = {
				modifier = {
					factor = 0
					NOT = {
						educator = {
							any_courtier = {
								is_adult = yes
								NOT = { trait = incapable }
								NOT = { trait = chaste }
								NOT = { trait = celibate }
								NOT = { has_character_modifier = the_oubliette }
								NOT = { has_character_modifier = the_dungeon }
							}
						}					
					}
				}
				set_character_flag = child_haughty_version_1
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							NOT = { trait = incapable }
							NOT = { trait = chaste }
							NOT = { trait = celibate }
							NOT = { has_character_modifier = the_oubliette }
							NOT = { has_character_modifier = the_dungeon }
						}
						save_event_target_as = haughty_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_haughty_version_1
								add_trait = haughty
							}
						}
					}
				}
			}
			10 = {
				set_character_flag = child_haughty_version_2
				modifier = {
					factor = 0
					NOT = {
						educator = {
							any_courtier = {
								is_adult = yes
								NOT = { is_rival = ROOT }
								NOT = { trait = incapable }
								OR = {
									trait = cruel
									trait = impaler
								}
								NOT = {
									AND = {
										religion = jain
										trait = zealous
									}
								}
								NOT = { has_character_modifier = the_oubliette }
								NOT = { has_character_modifier = the_dungeon }
							}
						}
					}
				}
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							NOT = { is_rival = ROOT }
							NOT = { trait = incapable }
							OR = {
								trait = cruel
								trait = impaler
							}
							NOT = {
								AND = {
									religion = jain
									trait = zealous
								}
							}
							NOT = { has_character_modifier = the_oubliette }
							NOT = { has_character_modifier = the_dungeon }
						}
						save_event_target_as = haughty_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_haughty_version_2
								add_trait = haughty
							}
						}
					}
				}
			}
			10 = {
				set_character_flag = child_haughty_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_haughty_version_3
					add_trait = haughty
				}
			}
		}
	}
	
	# Version 1
	option = {
		name = EVTOPTA_ZE_12000	# Caught adults making out, exposes
		trigger = {
			has_character_flag = child_haughty_version_1
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_haughty_version_1_option_1
		event_target:haughty_events_char_1 = {
			character_event = { id = ZE.12002 }
		}
		custom_tooltip = {
			text = EVTOPTHAU
		}
	}
	option = {
		name = EVTOPTB_ZE_12000	# Caught adults making out, leaves alone
		trigger = {
			has_character_flag = child_haughty_version_1
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_haughty_version_1_option_2
		add_friend = event_target:haughty_events_char_1
		event_target:haughty_events_char_1 = {
			hidden_tooltip = { character_event = { id = ZE.12002 } }
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12000	# Caught adult beating dog, hits them
		trigger = {
			has_character_flag = child_haughty_version_2
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_haughty_version_2_option_1
		event_target:haughty_events_char_1 = {
			opinion = {
				who = ROOT
				years = 3
				modifier = opinion_angry
			}
		}
		event_target:haughty_events_char_1 = {
			character_event = { id = ZE.12002 }
		}
		custom_tooltip = {
			text = EVTOPTHAU
		}
	}
	option = {
		name = EVTOPTD_ZE_12000	# Caught adult beating dog, joins in
		trigger = {
			has_character_flag = child_haughty_version_2
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_haughty_version_2_option_2
		event_target:haughty_events_char_1 = {
			reverse_opinion = {
				who = ROOT
				years = 3
				modifier = opinion_complicity
			}
		}
		event_target:haughty_events_char_1 = {
			hidden_tooltip = { character_event = { id = ZE.12002 } }
		}
	}
	# Version 3
	option = {
		name = EVTOPTE_ZE_12000	# Peasants talk to you at roadside - give them hell
		trigger = {
			has_character_flag = child_haughty_version_3
		}
		ai_chance = {
			factor = 100
		}
		add_trait = haughty
		random_list = {
			10 = {
				custom_tooltip = { text = EVTOPTE_ZE_12000_TOOLTIP1 }
				set_character_flag = child_haughty_version_3_random_1
			}
			10 = {
				custom_tooltip = { text = EVTOPTE_ZE_12000_TOOLTIP2 }
				set_character_flag = child_haughty_version_3_random_2
			}
		}
		hidden_tooltip = { character_event = { id = ZE.12004 } }
	}
	option = {
		name = EVTOPTF_ZE_12000	# Peasants talk to you at roadside - answer courteously
		trigger = {
			has_character_flag = child_haughty_version_3
		}
		ai_chance = {
			factor = 0
		}
		add_character_modifier = {
			name = the_kind
			years = 3
		}
		clr_character_flag = child_haughty_version_3
	}

	option = {
		name = EVTOPTF_ZE_12000	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_haughty_version_1
				has_character_flag = child_haughty_version_2
				has_character_flag = child_haughty_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12002
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12002
		trigger = {
			FROM = { has_character_flag = child_haughty_version_1_option_1 }
		}
	}
	desc = {
		text = EVTDESCB_ZE_12002
		trigger = {
			FROM = { has_character_flag = child_haughty_version_1_option_2 }
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12002
		trigger = {
			FROM = { has_character_flag = child_haughty_version_2_option_1 }
		}
	}
	desc = {
		text = EVTDESCD_ZE_12002
		trigger = {
			FROM = { has_character_flag = child_haughty_version_2_option_2 }
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12002
		trigger = {
			FROM = {
				has_character_flag = child_haughty_version_1_option_1
			}
		}
		ai_chance = {
			factor = 100
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12004 } } }
		reverse_opinion = {
			who = FROM
			modifier = opinion_angry
			years = 3
		}
		random_list = {
			5 = {
				FROM = {
					tooltip = { add_trait = wounded }
					set_character_flag = child_haughty_wounded
				}
			}
			25 = {
				FROM = {
					tooltip = { add_trait = stressed }
					set_character_flag = child_haughty_stressed
				}
			}
			70 = {
			}
		}
		custom_tooltip = {
			text = EVTOPTHAU_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12002
		trigger = {
			FROM = {
				has_character_flag = child_haughty_version_1_option_1
			}
		}
		ai_chance = {
			factor = 0
		}
		prestige = -50
		FROM = {
			clr_character_flag = child_haughty_version_1_option_1
			clr_character_flag = child_haughty_version_1
		}
	}
	option = {
		name = EVTOPTC_ZE_12002
		trigger = {
			FROM = {
				has_character_flag = child_haughty_version_1_option_2
			}
		}
		add_friend = FROM
		FROM = {
			clr_character_flag = child_haughty_version_1_option_2
			clr_character_flag = child_haughty_version_1
		}
	}
	# Version 2
	option = {
		name = EVTOPTD_ZE_12002
		trigger = {
			FROM = {
				has_character_flag = child_haughty_version_2_option_1
			}
		}
		ai_chance = {
			factor = 100
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12004 } } }
		prestige = 30
		reverse_opinion = {
			who = FROM
			modifier = opinion_contempt
			years = 3
		}
		custom_tooltip = {
			text = EVTOPTHAU_FROM
		}
	}
	option = {
		name = EVTOPTE_ZE_12002
		trigger = {
			FROM = {
				has_character_flag = child_haughty_version_2_option_1
			}
		}
		ai_chance = {
			factor = 0
		}
		prestige = -20
		FROM = {
			clr_character_flag = child_haughty_version_2_option_1
			clr_character_flag = child_haughty_version_2
		}
	}
	option = {
		name = EVTOPTF_ZE_12002
		trigger = {
			FROM = {
				has_character_flag = child_haughty_version_2_option_2
			}
		}
		reverse_opinion = {
			who = FROM
			years = 3
			modifier = opinion_complicity
		}
		FROM = {
			clr_character_flag = child_haughty_version_2_option_2
			clr_character_flag = child_haughty_version_2
		}
	}
}

# Child choice
character_event = {
	id = ZE.12004
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12004
		trigger = {
			has_character_flag = child_haughty_version_1_option_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12004
		trigger = {
			has_character_flag = child_haughty_version_2_option_1
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12004
		trigger = {
			has_character_flag = child_haughty_version_3_random_1
		}
	}
	desc = {
		text = EVTDESCD_ZE_12004
		trigger = {
			has_character_flag = child_haughty_version_3_random_2
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12004
		trigger = {
			has_character_flag = child_haughty_version_1_option_1
		}
		ai_chance = {
			factor = 100
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12006 } } }
		add_trait = haughty
		reverse_opinion = {
			who = FROM
			modifier = opinion_hate
			years = 5
		}
		if = {
			limit = { has_character_flag = child_haughty_wounded }
			add_trait = wounded
			clr_character_flag = child_haughty_wounded
		}
		if = {
			limit = { has_character_flag = child_haughty_stressed }
			add_trait = stressed
			clr_character_flag = child_haughty_stressed
		}
	}
	option = {
		name = EVTOPTB_ZE_12004
		trigger = {
			has_character_flag = child_haughty_version_1_option_1
		}
		ai_chance = {
			factor = 0
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12006 } } }
		opinion = {
			who = FROM
			modifier = opinion_hate
			years = 5
		}
		if = {
			limit = { has_character_flag = child_haughty_wounded }
			add_trait = wounded
			clr_character_flag = child_haughty_wounded
		}
		if = {
			limit = { has_character_flag = child_haughty_stressed }
			add_trait = stressed
			clr_character_flag = child_haughty_stressed
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12004
		trigger = {
			has_character_flag = child_haughty_version_2_option_1
		}
		ai_chance = {
			factor = 100
		}
		prestige = 10
		add_rival = FROM
		add_trait = haughty
		FROM = { hidden_tooltip = { character_event = { id = ZE.12006 } } }
	}
	option = {
		name = EVTOPTD_ZE_12004
		trigger = {
			has_character_flag = child_haughty_version_2_option_1
		}
		ai_chance = {
			factor = 0
		}
		prestige = 10
		FROM = { hidden_tooltip = { character_event = { id = ZE.12006 } } }
	}
	# Version 3
	option = {
		name = EVTOPTE_ZE_12004	#
		trigger = {
			has_character_flag = child_haughty_version_3_random_1
		}
		location = {
			add_province_modifier = {
				name = peasants_upset
				years = 3
			}
		}
		clr_character_flag = child_haughty_version_3_random_1
		clr_character_flag = child_haughty_version_3
	}
	option = {
		name = EVTOPTF_ZE_12004	#
		trigger = {
			has_character_flag = child_haughty_version_3_random_2
		}
		location = {
			add_province_modifier = {
				name = peasants_upset
				years = 3
			}
		}
		clr_character_flag = child_haughty_version_3_random_2
		clr_character_flag = child_haughty_version_3
	}
}

# Courtier informed
character_event = {
	id = ZE.12006
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12006
		trigger = {
			FROM = { has_character_flag = child_haughty_version_1_option_1 }
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12006
		trigger = {
			FROM = { has_character_flag = child_haughty_version_2_option_1 }
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = CURSES
		trigger = {
			FROM = { has_character_flag = child_haughty_version_1_option_1 }
		}
		prestige = -30
		FROM = { clr_character_flag = child_haughty_version_1_option_1 }
		FROM = { clr_character_flag = child_haughty_version_1 }
	}
	# Version 2
	option = {
		name = CURSES
		trigger = {
			FROM = { has_character_flag = child_haughty_version_2_option_1 }
		}
		add_rival = FROM
		FROM = { clr_character_flag = child_haughty_version_2_option_1 }
		FROM = { clr_character_flag = child_haughty_version_2 }
	}
}



#############################################
# Affectionate								#
#############################################


# Start
character_event = {
	id = ZE.12010
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12010 # I have nice toys and other child likes them
		trigger = {
			has_character_flag = child_affectionate_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12010 # Parents are away - other adults around to befriend?
		trigger = {
			has_character_flag = child_affectionate_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12010 # Peasant child is hungry
		trigger = {
			has_character_flag = child_affectionate_version_3
		}
	}
	
	is_triggered_only = yes
	
	only_capable = yes
	
	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_affectionate_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}
	
	immediate = {  # Find courtier to use in events, set custom event target
		set_character_flag = ze_child_affectionate_events
		random_list = { # Select event circumstances randomly but influenced by environment
			10 = {
				modifier = {
					factor = 0
					NOT = {
						educator = {
							any_courtier = {
								NOT = { character = ROOT }
								NOT = { age = 12 }
								NOT = { trait = incapable }
								NOT = { has_character_modifier = the_oubliette }
								NOT = { has_character_modifier = the_dungeon }
							}
						}					
					}
				}
				set_character_flag = child_affectionate_version_1
				educator = {
					random_courtier = {
						limit = {
							NOT = { character = ROOT }
							NOT = { age = 12 }
							NOT = { trait = incapable }
							NOT = { has_character_modifier = the_oubliette }
							NOT = { has_character_modifier = the_dungeon }
						}
						save_event_target_as = affectionate_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_affectionate_version_1
								add_trait = affectionate
							}
						}
					}
				}
			}
			10 = {
				set_character_flag = child_affectionate_version_2
				modifier = {
					factor = 0
					NOT = {
						educator = {
							any_courtier = {
								is_adult = yes
								NOT = { is_rival = ROOT }
								NOT = { is_friend = ROOT }
								NOT = { trait = incapable }
								NOT = { has_character_modifier = the_oubliette }
								NOT = { has_character_modifier = the_dungeon }
							}
						}
					}
				}
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							NOT = { is_rival = ROOT }
							NOT = { is_friend = ROOT }
							NOT = { trait = incapable }
							NOT = { has_character_modifier = the_oubliette }
							NOT = { has_character_modifier = the_dungeon }
						}
						save_event_target_as = affectionate_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_affectionate_version_2
								add_trait = affectionate
							}
						}
					}
				}
			}
			10 = {
				set_character_flag = child_affectionate_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_affectionate_version_3
					add_trait = affectionate
				}
			}
		}
	}
	
	# Version 1
	option = {
		name = EVTOPTA_ZE_12010	# Shares toys with other child
		trigger = {
			has_character_flag = child_affectionate_version_1
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_affectionate_version_1_option_1
		event_target:affectionate_events_char_1 = {
			opinion = {
				who = ROOT
				modifier = opinion_happy
				years = 3
			}
		}
		event_target:affectionate_events_char_1 = {
			character_event = { id = ZE.12012 }
		}
		custom_tooltip = {
			text = EVTOPTAFF
		}
	}
	option = {
		name = EVTOPTB_ZE_12010	# Doesn't share toys with other child
		trigger = {
			has_character_flag = child_affectionate_version_1
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_affectionate_version_1_option_2
		event_target:affectionate_events_char_1 = {
			add_rival = ROOT
			hidden_tooltip = { character_event = { id = ZE.12012 } }
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12010	# Tries to befriend adult courtier
		trigger = {
			has_character_flag = child_affectionate_version_2
		}
		ai_chance = {
			factor = 100
		}
		event_target:affectionate_events_char_1 = {
			opinion = {
				modifier = opinion_happy
				who = ROOT
				years = 5
			}
		}
		set_character_flag = child_affectionate_version_2_option_1
		event_target:affectionate_events_char_1 = {
			character_event = { id = ZE.12012 }
		}
		custom_tooltip = {
			text = EVTOPTAFF
		}
	}
	option = {
		name = EVTOPTD_ZE_12010	# Ignores adult courtier
		trigger = {
			has_character_flag = child_affectionate_version_2
		}
		ai_chance = {
			factor = 0
		}
		event_target:affectionate_events_char_1 = {
			opinion = {
				modifier = opinion_annoyed
				who = ROOT
				years = 5
			}
		}
		set_character_flag = child_affectionate_version_2_option_2
		event_target:affectionate_events_char_1 = {
			hidden_tooltip = { character_event = { id = ZE.12012 } }
		}
	}
	# Version 3
	option = {
		name = EVTOPTE_ZE_12010	# Peasant child is hungry - give food
		trigger = {
			has_character_flag = child_affectionate_version_3
		}
		ai_chance = {
			factor = 100
		}
		add_trait = affectionate
		random_list = {
			10 = {
				custom_tooltip = { text = EVTOPTE_ZE_12010_TOOLTIP1 }
				set_character_flag = child_affectionate_version_3_random_1
			}
			10 = {
				custom_tooltip = { text = EVTOPTE_ZE_12010_TOOLTIP2 }
				set_character_flag = child_affectionate_version_3_random_2
			}
		}
		hidden_tooltip = { character_event = { id = ZE.12014 } }
	}
	option = {
		name = EVTOPTF_ZE_12010	# Peasant child is hungry - deny food haughtily
		trigger = {
			has_character_flag = child_affectionate_version_3
		}
		ai_chance = {
			factor = 0
		}
		prestige = 20
		piety = -5
		clr_character_flag = child_affectionate_version_3
	}

	option = {
		name = EVTOPTF_ZE_12010	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_affectionate_version_1
				has_character_flag = child_affectionate_version_2
				has_character_flag = child_affectionate_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12012
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12012
		trigger = {
			FROM = { has_character_flag = child_affectionate_version_1_option_1 }
		}
	}
	desc = {
		text = EVTDESCB_ZE_12012
		trigger = {
			FROM = { has_character_flag = child_affectionate_version_1_option_2 }
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12012
		trigger = {
			FROM = { has_character_flag = child_affectionate_version_2_option_1 }
		}
	}
	desc = {
		text = EVTDESCD_ZE_12012
		trigger = {
			FROM = { has_character_flag = child_affectionate_version_2_option_2 }
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no
	
	# Version 1
	option = {
		name = EVTOPTA_ZE_12012 # Let's play more
		trigger = {
			FROM = {
				has_character_flag = child_affectionate_version_1_option_1
			}
		}
		ai_chance = {
			factor = 100
		}
		reverse_opinion = {
			who = FROM
			modifier = opinion_happy
			years = 3
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12014 } } }
		custom_tooltip = {
			text = EVTOPTAFF_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12012 # No I don't want to
		trigger = {
			FROM = {
				has_character_flag = child_affectionate_version_1_option_1
			}
		}
		ai_chance = {
			factor = 0
		}
		reverse_opinion = {
			who = FROM
			modifier = opinion_sad
			years = 3
		}
		FROM = {
			clr_character_flag = child_affectionate_version_1_option_1
			clr_character_flag = child_affectionate_version_1
		}
	}
	option = {
		name = EVTOPTC_ZE_12012  # Didn't share toys - envy!
		trigger = {
			FROM = {
				has_character_flag = child_affectionate_version_1_option_2
			}
		}
		add_rival = FROM
		FROM = {
			clr_character_flag = child_affectionate_version_1_option_2
			clr_character_flag = child_affectionate_version_1
		}
	}
	# Version 2
	option = {
		name = EVTOPTD_ZE_12012 # Let's be friends
		trigger = {
			FROM = {
				has_character_flag = child_affectionate_version_2_option_1
			}
		}
		ai_chance = {
			factor = 100
		}
		reverse_opinion = {
			modifier = opinion_happy
			who = FROM
			years = 3
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12014 } } }
		custom_tooltip = {
			text = EVTOPTAFF_FROM
		}
	}
	option = {
		name = EVTOPTE_ZE_12012 # Begone you little urchin
		trigger = {
			FROM = {
				has_character_flag = child_affectionate_version_2_option_1
			}
		}
		ai_chance = {
			factor = 0
		}
		reverse_opinion = {
			modifier = opinion_bitter
			who = FROM
			years = 3
		}
		FROM = {
			clr_character_flag = child_affectionate_version_2_option_1
			clr_character_flag = child_affectionate_version_2
		}
	}
	option = {
		name = EVTOPTF_ZE_12012
		trigger = {
			FROM = {
				has_character_flag = child_affectionate_version_2_option_2
			}
		}
		tooltip = {
			opinion = {
				modifier = opinion_annoyed
				who = FROM
				years = 3
			}
		}
		FROM = {
			clr_character_flag = child_affectionate_version_2_option_2
			clr_character_flag = child_affectionate_version_2
		}
	}
}

# Child choice
character_event = {
	id = ZE.12014
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12014
		trigger = {
			has_character_flag = child_affectionate_version_1_option_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12014
		trigger = {
			has_character_flag = child_affectionate_version_2_option_1
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12014
		trigger = {
			has_character_flag = child_affectionate_version_3_random_1
		}
	}
	desc = {
		text = EVTDESCD_ZE_12014
		trigger = {
			has_character_flag = child_affectionate_version_3_random_2
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12014 # It's so nice to share with others
		trigger = {
			has_character_flag = child_affectionate_version_1_option_1
		}
		ai_chance = {
			factor = 100
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12016 } } }
		add_trait = affectionate
		add_friend = FROM
	}
	option = {
		name = EVTOPTB_ZE_12014 # It was fun to play
		trigger = {
			has_character_flag = child_affectionate_version_1_option_1
		}
		ai_chance = {
			factor = 0
		}
		add_friend = FROM
		FROM = { hidden_tooltip = { character_event = { id = ZE.12016 } } }
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12014 # I want more friends like this
		trigger = {
			has_character_flag = child_affectionate_version_2_option_1
		}
		ai_chance = {
			factor = 100
		}
		add_trait = affectionate
		add_friend = FROM
		FROM = { hidden_tooltip = { character_event = { id = ZE.12016 } } }
	}
	option = {
		name = EVTOPTD_ZE_12014 # It was fun
		trigger = {
			has_character_flag = child_affectionate_version_2_option_1
		}
		ai_chance = {
			factor = 0
		}
		add_friend = FROM
		add_character_modifier = {
			name = good_times
			years = 3
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12016 } } }
	}
	# Version 3
	option = {
		name = EVTOPTE_ZE_12014	#
		trigger = {
			has_character_flag = child_affectionate_version_3_random_1
		}
		piety = 30
		clr_character_flag = child_affectionate_version_3_random_1
		clr_character_flag = child_affectionate_version_3
	}
	option = {
		name = EVTOPTF_ZE_12014	#
		trigger = {
			has_character_flag = child_affectionate_version_3_random_2
		}
		piety = 30
		prestige = -30
		clr_character_flag = child_affectionate_version_3_random_2
		clr_character_flag = child_affectionate_version_3
	}
}

# Courtier informed
character_event = {
	id = ZE.12016
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12016
		trigger = {
			FROM = { has_character_flag = child_affectionate_version_1_option_1 }
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12016
		trigger = {
			FROM = { has_character_flag = child_affectionate_version_2_option_1 }
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12016
		trigger = {
			FROM = { has_character_flag = child_affectionate_version_1_option_1 }
		}
		add_friend = FROM
		FROM = { clr_character_flag = child_affectionate_version_1_option_1 }
		FROM = { clr_character_flag = child_affectionate_version_1 }
	}
	# Version 2
	option = {
		name = EVTOPTB_ZE_12016
		trigger = {
			FROM = { has_character_flag = child_affectionate_version_2_option_1 }
		}
		add_friend = FROM
		add_character_modifier = {
			name = good_times
			years = 3
		}
		FROM = { clr_character_flag = child_affectionate_version_2_option_1 }
		FROM = { clr_character_flag = child_affectionate_version_2 }
	}
}


#############################################
# Timid										#
#############################################


# Start
character_event = {
	id = ZE.12020
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12020 # Sees person being wronged
		trigger = {
			has_character_flag = child_timid_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12020 # See child at court that I like. Talk to them or shy away?
		trigger = {
			has_character_flag = child_timid_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12020 # I am being asked to sing at prestigious court dinner
		trigger = {
			has_character_flag = child_timid_version_3
		}
	}
	
	is_triggered_only = yes
	
	only_capable = yes
	
	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_timid_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}
	
	immediate = {  # Find courtier to use in events, set custom event target
		set_character_flag = ze_child_timid_events
		random_list = { # Select event circumstances randomly but influenced by environment
			10 = {
				modifier = {
					factor = 0
					NOT = {
						educator = {
							any_courtier = {
								is_ruler = no
								NOT = { character = ROOT }
								NOT = { any_child = { character = ROOT } }
								NOT = { trait = incapable }
								NOT = { has_character_modifier = the_oubliette }
								NOT = { has_character_modifier = the_dungeon }
							}
						}					
					}
				}
				set_character_flag = child_timid_version_1
				educator = {
					random_courtier = {
						limit = {
							is_ruler = no
							NOT = { character = ROOT }
							NOT = { any_child = { character = ROOT } }
							NOT = { trait = incapable }
							NOT = { has_character_modifier = the_oubliette }
							NOT = { has_character_modifier = the_dungeon }
						}
						save_event_target_as = timid_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_timid_version_1
								add_trait = timid
							}
						}
					}
				}
			}
			10 = {
				set_character_flag = child_timid_version_2
				modifier = {
					factor = 0
					NOT = {
						educator = {
							any_courtier = {
								NOT = { character = ROOT }
								NOT = { age = 12 }
								NOT = { is_rival = ROOT }
								NOT = { is_friend = ROOT }
								NOT = { trait = incapable }
								NOT = { has_character_modifier = the_oubliette }
								NOT = { has_character_modifier = the_dungeon }
							}
						}
					}
				}
				educator = {
					random_courtier = {
						limit = {
							NOT = { character = ROOT }
							NOT = { age = 12 }
							NOT = { is_rival = ROOT }
							NOT = { is_friend = ROOT }
							NOT = { trait = incapable }
							NOT = { has_character_modifier = the_oubliette }
							NOT = { has_character_modifier = the_dungeon }
						}
						save_event_target_as = timid_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_timid_version_2
								add_trait = timid
							}
						}
					}
				}
			}
			10 = {
				set_character_flag = child_timid_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_timid_version_3
					add_trait = timid
				}
			}
		}
	}
	
	# Version 1
	option = {
		name = EVTOPTA_ZE_12020	# Sees someone wronged - keeps quiet
		trigger = {
			has_character_flag = child_timid_version_1
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_timid_version_1_option_1
		event_target:timid_events_char_1 = {
			character_event = { id = ZE.12022 }
		}
		custom_tooltip = {
			text = EVTOPTTIM
		}
	}
	option = {
		name = EVTOPTB_ZE_12020	# Sees someone wronged - speaks up
		trigger = {
			has_character_flag = child_timid_version_1
		}
		ai_chance = {
			factor = 0
		}
		reverse_opinion = {
			modifier = opinion_grateful
			who = FROM
			years = 3
		}
		set_character_flag = child_timid_version_1_option_2
		event_target:timid_events_char_1 = {
			hidden_tooltip = { character_event = { id = ZE.12022 } }
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12020	# Sees child - wait a little...
		trigger = {
			has_character_flag = child_timid_version_2
		}
		ai_chance = {
			factor = 100
		}
		add_character_modifier = {
			name = mysterious_charm
			years = 4
		}
		set_character_flag = child_timid_version_2_option_1
		event_target:timid_events_char_1 = {
			character_event = { id = ZE.12022 }
		}
		custom_tooltip = {
			text = EVTOPTTIM
		}
	}
	option = {
		name = EVTOPTD_ZE_12020	# Sees child - talk to them
		trigger = {
			has_character_flag = child_timid_version_2
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_timid_version_2_option_2
		add_friend = event_target:timid_events_char_1
		event_target:timid_events_char_1 = {
			hidden_tooltip = { character_event = { id = ZE.12022 } }
		}
	}
	# Version 3
	option = {
		name = EVTOPTE_ZE_12020	#  I am being asked to sing at dinner - no way!
		trigger = {
			has_character_flag = child_timid_version_3
		}
		ai_chance = {
			factor = 100
		}
		piety = -30
		add_trait = timid
		random_list = {
			10 = {
				custom_tooltip = { text = EVTOPTE_ZE_12020_TOOLTIP1 }
				set_character_flag = child_timid_version_3_random_1 # Everybody laughs
			}
			10 = {
				custom_tooltip = { text = EVTOPTE_ZE_12020_TOOLTIP2 }
				set_character_flag = child_timid_version_3_random_2 # Everybody's offended
			}
		}
		hidden_tooltip = { character_event = { id = ZE.12024 } }
	}
	option = {
		name = EVTOPTF_ZE_12020	# I am being asked to sing at dinner - do it
		trigger = {
			has_character_flag = child_timid_version_3
		}
		ai_chance = {
			factor = 0
		}
		piety = 30
		clr_character_flag = child_timid_version_3
	}

	option = {
		name = EVTOPTF_ZE_12010	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_timid_version_1
				has_character_flag = child_timid_version_2
				has_character_flag = child_timid_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12022
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12022
		trigger = {
			FROM = { has_character_flag = child_timid_version_1_option_1 }
		}
	}
	desc = {
		text = EVTDESCB_ZE_12022
		trigger = {
			FROM = { has_character_flag = child_timid_version_1_option_2 }
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12022
		trigger = {
			FROM = { has_character_flag = child_timid_version_2_option_1 }
		}
	}
	desc = {
		text = EVTDESCD_ZE_12022
		trigger = {
			FROM = { has_character_flag = child_timid_version_2_option_2 }
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12022 # I saw you didn't help me and I'm angry
		trigger = {
			FROM = {
				has_character_flag = child_timid_version_1_option_1
			}
		}
		ai_chance = {
			factor = 100
		}
		opinion = {
			modifier = opinion_angry
			who = FROM
			years = 3
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12024 } } }
		custom_tooltip = {
			text = EVTOPTTIM_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12022 # It's ok
		trigger = {
			FROM = {
				has_character_flag = child_timid_version_1_option_1
			}
		}
		ai_chance = {
			factor = 0
		}
		opinion = {
			modifier = opinion_disappointed
			who = FROM
			years = 3
		}
		FROM = {
			clr_character_flag = child_timid_version_1_option_1
			clr_character_flag = child_timid_version_1
		}
	}
	option = {
		name = EVTOPTC_ZE_12022 # Thank you!
		trigger = {
			FROM = {
				has_character_flag = child_timid_version_1_option_2
			}
		}
		tooltip = {
			opinion = {
				modifier = opinion_grateful
				who = FROM
				years = 3
			}
		}
		FROM = {
			clr_character_flag = child_timid_version_1_option_2
			clr_character_flag = child_timid_version_1
		}
	}
	# Version 2
	option = {
		name = EVTOPTD_ZE_12022 # Other child (A) is checking me out, react positively
		trigger = {
			FROM = {
				has_character_flag = child_timid_version_2_option_1
			}
		}
		ai_chance = {
			factor = 100
		}
		opinion = {
			modifier = opinion_approves
			who = FROM
			years = 2
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12024 } } }
		custom_tooltip = {
			text = EVTOPTTIM_FROM
		}
	}
	option = {
		name = EVTOPTE_ZE_12022 # Other child (A) is checking me out, react negatively
		trigger = {
			FROM = {
				has_character_flag = child_timid_version_2_option_1
			}
		}
		ai_chance = {
			factor = 0
		}
		opinion = {
			modifier = opinion_disapprove
			who = FROM
			years = 2
		}
		FROM = {
			clr_character_flag = child_timid_version_2_option_1
			clr_character_flag = child_timid_version_2
		}
	}
	option = {
		name = EVTOPTF_ZE_12022 # Other child wants to play, let's be friends!
		trigger = {
			FROM = {
				has_character_flag = child_timid_version_2_option_2
			}
		}
		add_friend = FROM
		FROM = {
			clr_character_flag = child_timid_version_2_option_2
			clr_character_flag = child_timid_version_2
		}
	}
}

# Child choice
character_event = {
	id = ZE.12024
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12024
		trigger = {
			has_character_flag = child_timid_version_1_option_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12024
		trigger = {
			has_character_flag = child_timid_version_2_option_1
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12024
		trigger = {
			has_character_flag = child_timid_version_3_random_1
		}
	}
	desc = {
		text = EVTDESCD_ZE_12024
		trigger = {
			has_character_flag = child_timid_version_3_random_2
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12024  # I won't say anything
		trigger = {
			has_character_flag = child_timid_version_1_option_1
		}
		ai_chance = {
			factor = 100
		}
		add_trait = timid
		add_rival = FROM
		FROM = { hidden_tooltip = { character_event = { id = ZE.12026 } } }
	}
	option = {
		name = EVTOPTB_ZE_12024  # Step forward at the last minute
		trigger = {
			has_character_flag = child_timid_version_1_option_1
		}
		ai_chance = {
			factor = 0
		}
		reverse_opinion = {
			modifier = opinion_grateful
			who = FROM
			years = 3
		}
		hidden_tooltip = {
			clr_character_flag = child_timid_version_1_option_1
			clr_character_flag = child_timid_version_1
			set_character_flag = child_timid_version_2_option_1
			FROM = { character_event = { id = ZE.12026 } }
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12024
		trigger = {
			has_character_flag = child_timid_version_2_option_1
		}
		ai_chance = {
			factor = 100
		}
		add_trait = timid
		add_rival = FROM
		FROM = { hidden_tooltip = { character_event = { id = ZE.12026 } } }
	}
	option = {
		name = EVTOPTD_ZE_12024
		trigger = {
			has_character_flag = child_timid_version_2_option_1
		}
		ai_chance = {
			factor = 0
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12026 } } }
	}
	# Version 3
	option = {
		name = EVTOPTE_ZE_12024	#
		trigger = {
			has_character_flag = child_timid_version_3_random_1
		}
		prestige = 30
		clr_character_flag = child_timid_version_3_random_1
		clr_character_flag = child_timid_version_3
	}
	option = {
		name = EVTOPTF_ZE_12024	#
		trigger = {
			has_character_flag = child_timid_version_3_random_2
		}
		prestige = -30
		clr_character_flag = child_timid_version_3_random_2
		clr_character_flag = child_timid_version_3
	}
}

# Courtier informed
character_event = {
	id = ZE.12026
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12026
		trigger = {
			FROM = { has_character_flag = child_timid_version_1_option_1 }
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12026
		trigger = {
			FROM = { has_character_flag = child_timid_version_2_option_1 }
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12026
		trigger = {
			FROM = { has_character_flag = child_timid_version_1_option_1 }
		}
		prestige = -50
		add_rival = FROM
		FROM = { clr_character_flag = child_timid_version_1_option_1 }
		FROM = { clr_character_flag = child_timid_version_1 }
	}
	# Version 2
	option = {
		name = EVTOPTB_ZE_12026
		trigger = {
			FROM = { has_character_flag = child_timid_version_2_option_1 }
		}
		reverse_opinion = {
			modifier = opinion_happy
			who = FROM
			years = 3
		}
		FROM = { clr_character_flag = child_timid_version_2_option_1 }
		FROM = { clr_character_flag = child_timid_version_2 }
	}
}

#############################################
# Rowdy										#
#############################################

# Start
character_event = {
	id = ZE.12030
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12030 # Gets into rivalry and fight with other child
		trigger = {
			has_character_flag = child_rowdy_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12030 # Does pranks climbing around and breaking in, getting into trouble, with other child
		trigger = {
			has_character_flag = child_rowdy_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12030 # Goaded to climb tall tower...
		trigger = {
			has_character_flag = child_rowdy_version_3
		}
	}
	
	is_triggered_only = yes
	
	only_capable = yes
	
	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_rowdy_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}
	
	immediate = {  # Find courtier to use in events, set custom event target
		set_character_flag = ze_child_rowdy_events
		random_list = { # Select event circumstances randomly but influenced by environment
			10 = {
				modifier = {
					factor = 0
					NOT = {
						educator = {
							any_courtier = {
								NOT = { character = ROOT }
								NOT = { age = 12 }
								NOT = { is_rival = ROOT }
								NOT = { trait = incapable }
								NOT = { has_character_modifier = the_oubliette }
								NOT = { has_character_modifier = the_dungeon }
							}
						}					
					}
				}
				set_character_flag = child_rowdy_version_1
				educator = {
					random_courtier = {
						limit = {
							NOT = { character = ROOT }
							NOT = { age = 12 }
							NOT = { is_rival = ROOT }
							NOT = { trait = incapable }
							NOT = { has_character_modifier = the_oubliette }
							NOT = { has_character_modifier = the_dungeon }
						}
						save_event_target_as = rowdy_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_rowdy_version_1
								add_trait = rowdy
							}
						}
					}
				}
			}
			10 = {
				set_character_flag = child_rowdy_version_2
				modifier = {
					factor = 0
					NOT = {
						educator = {
							any_courtier = {
								NOT = { character = ROOT }
								NOT = { age = 12 }
								NOT = { is_rival = ROOT }
								NOT = { trait = incapable }
								NOT = { has_character_modifier = the_oubliette }
								NOT = { has_character_modifier = the_dungeon }
							}
						}
					}
				}
				educator = {
					random_courtier = {
						limit = {
							NOT = { character = ROOT }
							NOT = { age = 12 }
							NOT = { is_rival = ROOT }
							NOT = { trait = incapable }
							NOT = { has_character_modifier = the_oubliette }
							NOT = { has_character_modifier = the_dungeon }
						}
						save_event_target_as = rowdy_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_rowdy_version_2
								add_trait = rowdy
							}
						}
					}
				}
			}
			10 = {
				set_character_flag = child_rowdy_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_rowdy_version_3
					add_trait = rowdy
				}
			}
		}
	}
	
	# Version 1
	option = {
		name = EVTOPTA_ZE_12030	# Conflict with other child begins - provoke/stand ground
		trigger = {
			has_character_flag = child_rowdy_version_1
		}
		ai_chance = {
			factor = 100
		}
		custom_tooltip = { text = EVTOPTA_ZE_12030_TOOLTIP1 }
		prestige = 10
		set_character_flag = child_rowdy_version_1_option_1
		event_target:rowdy_events_char_1 = {
			character_event = { id = ZE.12032 }
		}
		custom_tooltip = {
			text = EVTOPTROW
		}
	}
	option = {
		name = EVTOPTB_ZE_12030	#  Conflict with other child begins - back down
		trigger = {
			has_character_flag = child_rowdy_version_1
		}
		ai_chance = {
			factor = 0
		}
		prestige = -10
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12030	# Incite other child to do pranks
		trigger = {
			has_character_flag = child_rowdy_version_2
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_rowdy_version_2_option_1
		event_target:rowdy_events_char_1 = {
			character_event = { id = ZE.12032 }
		}
		custom_tooltip = {
			text = EVTOPTROW
		}
	}
	option = {
		name = EVTOPTD_ZE_12030	# Don't, it's not fun anyway, play dice instead
		trigger = {
			has_character_flag = child_rowdy_version_2
		}
		ai_chance = {
			factor = 0
		}
		add_character_modifier = {
			name = playing_dice
			years = 3
		}
		set_character_flag = child_rowdy_version_2_option_2
		event_target:rowdy_events_char_1 = {
			hidden_tooltip = { character_event = { id = ZE.12032 } }
		}
	}
	# Version 3
	option = {
		name = EVTOPTE_ZE_12030	# Climb it!
		trigger = {
			has_character_flag = child_rowdy_version_3
		}
		ai_chance = {
			factor = 100
		}
		add_trait = rowdy
		random_list = {
			10 = {
				custom_tooltip = { text = EVTOPTE_ZE_12030_TOOLTIP1 }
				set_character_flag = child_rowdy_version_3_random_1
			}
			10 = {
				custom_tooltip = { text = EVTOPTE_ZE_12030_TOOLTIP2 }
				set_character_flag = child_rowdy_version_3_random_2
			}
		}
		hidden_tooltip = { character_event = { id = ZE.12034 } }
	}
	option = {
		name = EVTOPTF_ZE_12030	# Back down
		trigger = {
			has_character_flag = child_rowdy_version_3
		}
		ai_chance = {
			factor = 0
		}
		prestige = -30
		clr_character_flag = child_rowdy_version_3
	}

	option = {
		name = EVTOPTF_ZE_12010	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_rowdy_version_1
				has_character_flag = child_rowdy_version_2
				has_character_flag = child_rowdy_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12032
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12032  # Child is messing with me
		trigger = {
			FROM = { has_character_flag = child_rowdy_version_1_option_1 }
		}
	}
	desc = {
		text = EVTDESCB_ZE_12032  # Child is unhappy but wants to be friends
		trigger = {
			FROM = { has_character_flag = child_rowdy_version_1_option_2 }
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12032 # Incited to do pranks
		trigger = {
			FROM = { has_character_flag = child_rowdy_version_2_option_1 }
		}
	}
	desc = {
		text = EVTDESCD_ZE_12032 # Play cards
		trigger = {
			FROM = { has_character_flag = child_rowdy_version_2_option_2 }
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12032 # Conflict with other child - stand ground/escalate
		trigger = {
			FROM = {
				has_character_flag = child_rowdy_version_1_option_1
			}
		}
		ai_chance = {
			factor = 100
		}
		prestige = 20
		FROM = {
			opinion = {
				who = ROOT
				years = 3
				modifier = opinion_angry
			}
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12034 } } }
		custom_tooltip = {
			text = EVTOPTROW_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12032 # No conflict with other child
		trigger = {
			FROM = {
				has_character_flag = child_rowdy_version_1_option_1
			}
		}
		ai_chance = {
			factor = 0
		}
		prestige = -20
		FROM = {
			clr_character_flag = child_rowdy_version_1_option_1
			clr_character_flag = child_rowdy_version_1
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12034 } } }
	}
	option = {
		name = EVTOPTC_ZE_12032 # No conflict with other child
		trigger = {
			FROM = {
				has_character_flag = child_rowdy_version_1_option_1
			}
		}
		ai_chance = {
			factor = 0
		}
		prestige = 20
		FROM = {
			clr_character_flag = child_rowdy_version_1_option_1
			clr_character_flag = child_rowdy_version_1
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12034 } } }
	}
	# Version 2
	option = {
		name = EVTOPTD_ZE_12032  # Incited to do pranks - accept
		trigger = {
			FROM = {
				has_character_flag = child_rowdy_version_2_option_1
			}
		}
		ai_chance = {
			factor = 100
		}
		piety = -20
		add_character_modifier = {
			name = good_times
			years = 3
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12034 } } }
		custom_tooltip = {
			text = EVTOPTROW_FROM
		}
	}
	option = {
		name = EVTOPTE_ZE_12032 # Incited to do pranks - decline
		trigger = {
			FROM = {
				has_character_flag = child_rowdy_version_2_option_1
			}
		}
		ai_chance = {
			factor = 0
		}
		piety = 20
		set_character_flag = child_rowdy_version_2_option_1_2
		FROM = { hidden_tooltip = { character_event = { id = ZE.12034 } } }
	}
	option = {
		name = EVTOPTF_ZE_12032 # Playing dice calmly
		trigger = {
			FROM = {
				has_character_flag = child_rowdy_version_2_option_2
			}
		}
		add_character_modifier = {
			name = playing_dice
			years = 3
		}
		FROM = {
			clr_character_flag = child_rowdy_version_2_option_2
			clr_character_flag = child_rowdy_version_2
		}
	}
}

# Child choice
character_event = {
	id = ZE.12034
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12034 # Conflict escalated
		trigger = {
			has_character_flag = child_rowdy_version_1_option_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12034  # We do pranks!
		trigger = {
			has_character_flag = child_rowdy_version_2_option_1
			NOT = { has_character_flag = child_rowdy_version_2_option_1_2 }
		}
	}
	desc = {
		text = EVTDESCB2_ZE_12034  # What no pranks?
		trigger = {
			has_character_flag = child_rowdy_version_2_option_1_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12034 # Slipped in tower
		trigger = {
			has_character_flag = child_rowdy_version_3_random_1
		}
	}
	desc = {
		text = EVTDESCD_ZE_12034 # Climbed like a squirrel
		trigger = {
			has_character_flag = child_rowdy_version_3_random_2
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12034 # Conflict with other child - fight!
		trigger = {
			has_character_flag = child_rowdy_version_1_option_1
		}
		ai_chance = {
			factor = 100
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12036 } } }
		add_trait = rowdy
		add_rival = FROM
	}
	option = {
		name = EVTOPTB_ZE_12034 # Conflict with other child - walk away
		trigger = {
			has_character_flag = child_rowdy_version_1_option_1
		}
		ai_chance = {
			factor = 0
		}
		prestige = -20
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12034 # Do crazy pranks
		trigger = {
			has_character_flag = child_rowdy_version_2_option_1
		}
		ai_chance = {
			factor = 100
		}
		add_trait = rowdy
		add_friend = FROM
		add_character_modifier = {
			name = good_times
			years = 3
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12036 } } }
	}
	option = {
		name = EVTOPTD_ZE_12034 # Do normal pranks
		trigger = {
			has_character_flag = child_rowdy_version_2_option_1
			NOT = { has_character_flag = child_rowdy_version_2_option_1_2 }
		}
		ai_chance = {
			factor = 0
		}
		add_friend = FROM
		add_character_modifier = {
			name = good_times
			years = 3
		}
		FROM = { hidden_tooltip = { character_event = { id = ZE.12036 } } }
	}
	option = {
		name = EVTOPTE_ZE_12032 # Incited to do pranks - declined
		trigger = {
			has_character_flag = child_rowdy_version_2_option_1_2
		}
		prestige = -10
		clr_character_flag = child_rowdy_version_2_option_1
		clr_character_flag = child_rowdy_version_2_option_1_2
		clr_character_flag = child_rowdy_version_2
	}
	# Version 3
	option = {
		name = EVTOPTF_ZE_12034	#
		trigger = {
			has_character_flag = child_rowdy_version_3_random_1
		}
		prestige = -10
		random = {
			chance = 10
			add_trait = wounded
			hidden_tooltip = {
				character_event = {
					id = 38280 #Notify wounded
				}
			}
		}
		clr_character_flag = child_rowdy_version_3_random_1
		clr_character_flag = child_rowdy_version_3
	}
	option = {
		name = EVTOPTG_ZE_12034	#
		trigger = {
			has_character_flag = child_rowdy_version_3_random_2
		}
		prestige = 30
		clr_character_flag = child_rowdy_version_3_random_2
		clr_character_flag = child_rowdy_version_3
	}
}

# Courtier informed
character_event = {
	id = ZE.12036
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12036 # Fight happened!
		trigger = {
			FROM = { has_character_flag = child_rowdy_version_1_option_1 }
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12036 # We did pranks and it was fun
		trigger = {
			FROM = { has_character_flag = child_rowdy_version_2_option_1 }
		}
	}

	is_triggered_only = yes
	
	only_capable = yes
	prisoner = no

	# Version 1
	option = {
		name = EVTOPTA_ZE_12036 # Fight happened!
		trigger = {
			FROM = { has_character_flag = child_rowdy_version_1_option_1 }
		}
		add_rival = FROM
		FROM = { clr_character_flag = child_rowdy_version_1_option_1 }
		FROM = { clr_character_flag = child_rowdy_version_1 }
	}
	# Version 2
	option = {
		name = EVTOPTB_ZE_12036 # We did pranks and it was fun
		trigger = {
			FROM = { has_character_flag = child_rowdy_version_2_option_1 }
		}
		add_friend = FROM
		FROM = { clr_character_flag = child_rowdy_version_2_option_1 }
		FROM = { clr_character_flag = child_rowdy_version_2 }
	}
}


#############################################
# Willful									#
#############################################

#Start
character_event = {
	id = ZE.12040
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12040 # Old hat doesn't fit, or will it?
		picture = GFX_evt_guardian
		trigger = {
			has_character_flag = child_willful_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12040 # Spotted haunted house, go there?
		picture = GFX_evt_mysterious_forest
		trigger = {
			has_character_flag = child_willful_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12040 # Fishing for hours with nothing to show, stay?
		picture = GFX_evt_fishing
		trigger = {
			has_character_flag = child_willful_version_3
		}
	}

	is_triggered_only = yes
	hide_from = yes
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_willful_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
		NOT = { is_inaccessible_trigger = yes }
	}

	immediate = { #Find viable courtier or if none, only make third version available
		set_character_flag = ze_child_willful_events
		random_list = {
			10 = {
				modifier = { 
					educator = {
						NOT = {
							any_courtier = {
								is_adult = yes
								NOR = {
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon 
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_willful_version_1
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							NOR = {
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon 
							}
						}
						save_event_target_as = willful_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_willful_version_1
								add_trait = willful
							}
						}
					}
				}
			}
			10 = { 
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								is_adult = no
								NOR = {
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_willful_version_2
				educator = {
					random_courtier = {
						limit = {
							is_adult = no
							NOR = {
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
							}
						}
						save_event_target_as = willful_events_char_2
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_willful_version_2 
								add_trait = willful
							}
						}
					}
				}
			}
			10= {
				set_character_flag = child_willful_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_willful_version_3
					add_trait = willful
				}
			}
		}
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12040	# Tell adult to help out with the hat
		trigger = {
			has_character_flag = child_willful_version_1
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_willful_version_1_asked_for_help
		event_target:willful_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12042 }
			}
		}
		custom_tooltip = {
			text = EVTOPTWIL
		}
	}
	option = {
		name = EVTOPTB_ZE_12040	# Give the hat to someone whom it fits
		trigger = {
			has_character_flag = child_willful_version_1
		}
		ai_chance = {
			factor = 0
		}
		piety = 20
		hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
	}

	# Version 2
	option = {
		name = EVTOPTC_ZE_12040	# Go inside scary house
		trigger = {
			has_character_flag = child_willful_version_2
		}
		ai_chance = {
			factor = 100
		}
		prestige = 10
		set_character_flag = child_willful_version_2_go_inside
		event_target:willful_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12042 }
			}
		}
		custom_tooltip = {
			text = EVTOPTWIL
		}
	}
	option = {
		name = EVTOPTD_ZE_12040	# Go home, friend is scared
		trigger = {
			has_character_flag = child_willful_version_2
		}
		ai_chance = {
			factor = 0
		}
		piety = 10
		set_character_flag = child_willful_version_2_turn_back
		event_target:willful_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12042 }
			}
		}
	}

	# Version 3
	option = {
		name = EVTOPTE_ZE_12040	# Stay longer to try to get some fish
		trigger = {
			has_character_flag = child_willful_version_3
		}
		ai_chance = {
			factor = 100
		}
		add_trait = willful
		random_list = {
			50 = {
				custom_tooltip = {
					text = EVTOPTE_ZE_12040_TOOLTIP1
				}
				tooltip = {
					prestige = 30
				}
				set_character_flag = child_willful_version_3_huge_fish
			}
			50 = {
				custom_tooltip = {
					text = EVTOPTE_ZE_12040_TOOLTIP2
				}
				tooltip = {
					prestige = -30
				}
				set_character_flag = child_willful_version_3_small_fish
			}
		}
		hidden_tooltip = {
			character_event = { id = ZE.12044 }
		}
	}
	option = {
		name = EVTOPTF_ZE_12040	# Time to give up
		trigger = {
			has_character_flag = child_willful_version_3
		}
		ai_chance = {
			factor = 0
		}
		hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
	}

	option = {
		name = EVTOPTF_ZE_12040	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_willful_version_1
				has_character_flag = child_willful_version_2
				has_character_flag = child_willful_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12042
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12042 # Child wants help to fit too small hat
		picture = GFX_evt_guardian
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_1_asked_for_help
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12042 # Friend wants to go to scary house, we shouldn't
		picture = GFX_evt_mysterious_forest
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_2_go_inside
			}
		}
	}
	
	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12042	# Smack child on the head for talking back
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_1_asked_for_help
			}
		}
		ai_chance = {
			factor = 0
		}
		prestige = 20
		FROM = {
			set_character_flag = child_willful_version_1_slapped
			hidden_tooltip = {
				character_event = { id = ZE.12044 }
			}
		}
	}
	option = {
		name = EVTOPTB_ZE_12042	# Let child have it his/her way
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_1_asked_for_help
			}
		}
		ai_chance = {
			factor = 100
		}
		prestige = -20
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
		}
		custom_tooltip = {
			text = EVTOPTWIL_FROM
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12042	# don't want to go in there
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_2_go_inside
			}
		}
		ai_chance = {
			factor = 100
		}
		piety = 10
		any_courtier = {
			opinion = {
				who = ROOT
				modifier = opinion_approves
				years = 2
			}
		}
		FROM = {
			set_character_flag = child_willful_version_2_refused_to_go
			character_event = { id = ZE.12044 }
		}
		custom_tooltip = {
			text = EVTOPTWIL_FROM
		}
	}
	option = {
		name = EVTOPTD_ZE_12042	# I can do this
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_2_go_inside
			}
		}
		ai_chance = {
			factor = 0
		}
		prestige = 20
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
		}
	}
}

# Child reacts
character_event = {
	id = ZE.12044
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12044
		picture = GFX_evt_guardian
		trigger = {
			has_character_flag = child_willful_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12044
		picture = GFX_evt_mysterious_forest
		trigger = {
			has_character_flag = child_willful_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12044
		picture = GFX_evt_fishing
		trigger = {
			has_character_flag = child_willful_version_3_huge_fish
		}
	}
	desc = {
		text = EVTDESCD_ZE_12044
		picture = GFX_evt_fishing
		trigger = {
			has_character_flag = child_willful_version_3_small_fish
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12044	# I hate courtier
		trigger = {
			has_character_flag = child_willful_version_1_slapped
		}
		ai_chance = {
			factor = 40
		}
		prestige = 20
		opinion = {
			who = FROM
			modifier = opinion_dislike
			years = 2
		}
		set_character_flag = child_willful_version_1_dislike
		FROM = {
			character_event = { id = ZE.12046 }
		}
	}
	option = {
		name = EVTOPTB_ZE_12044	# Someone else will help me fix it
		trigger = {
			has_character_flag = child_willful_version_1_slapped
		}
		ai_chance = {
			factor = 60
		}
		add_trait = willful
		set_character_flag = child_willful_version_1_persistent
		FROM = {
			character_event = { id = ZE.12046 }
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12044	# force other child to come with
		trigger = {
			has_character_flag = child_willful_version_2_refused_to_come_with
		}
		ai_chance = {
			factor = 100
		}
		add_trait = willful
		set_character_flag = child_willful_version_2_blackmail
		FROM = {
			character_event = { id = ZE.12046 }
		}
	}
	option = {
		name = EVTOPTD_ZE_12044	# agree to go back with child
		trigger = {
			has_character_flag = child_willful_version_2_refused_to_come_with
		}
		ai_chance = {
			factor = 0
		}
		prestige = -20
		set_character_flag = child_willful_version_2_go_back
		FROM = {
			character_event = { id = ZE.12046 }
		}
	}

	# Version 3
	option = {
		name = EVTOPTE_ZE_12044	
		prestige = 30
		trigger = {
			has_character_flag = child_willful_version_3_huge_fish
		}
		hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
	}
	option = {
		name = EVTOPTF_ZE_12044	
		prestige = -30
		trigger = {
			has_character_flag = child_willful_version_3_small_fish
		}
		hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
	}
}

# Courtier informed
character_event = {
	id = ZE.12046
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12046
		picture = GFX_evt_guardian
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_1_dislike
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12046
		picture = GFX_evt_guardian
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_1_someone_else
			}
		}
	}
	desc = {
		text = EVTDESCC_ZE_12046
		picture = GFX_evt_mysterious_forest
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_2_blackmail
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12046
		picture = GFX_evt_mysterious_forest
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_2_go_back
			}
		}
	}
	desc = {
		text = EVTDESCE_ZE_12046
		picture = GFX_evt_fishing
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_3_huge_fish
			}
		}
	}
	desc = {
		text = EVTDESCF_ZE_12046
		picture = GFX_evt_fishing
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_3_small_fish
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12046	
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_1_dislike
			}
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
		}
	}
	option = {
		name = EVTOPTB_ZE_12046	
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_1_someone_else
			}
		}
		FROM = {
			tooltip = {
				add_trait = willful
			}
			hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12046	
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_2_blackmail
			}
		}
		FROM = {
			tooltip = {
				add_trait = willful
			}
			hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
		}
	}
	option = {
		name = EVTOPTD_ZE_12046	
		trigger = {
			FROM = {
				has_character_flag = child_willful_version_2_go_back
			}
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12047 } } #clear all flags
		}
	}
}

#Catch all event flag clear
character_event = {
	id = ZE.12047
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		clr_character_flag = child_willful_version_1
		clr_character_flag = child_willful_version_2
		clr_character_flag = child_willful_version_3
		clr_character_flag = child_willful_version_1_asked_for_help
		clr_character_flag = child_willful_version_2_go_inside
		clr_character_flag = child_willful_version_2_turn_back
		clr_character_flag = child_willful_version_3_huge_fish
		clr_character_flag = child_willful_version_3_small_fish
		clr_character_flag = child_willful_version_1_slapped
		clr_character_flag = child_willful_version_2_refused_to_go
		clr_character_flag = child_willful_version_1_dislike
		clr_character_flag = child_willful_version_1_persistent
		clr_character_flag = child_willful_version_2_blackmail
		clr_character_flag = child_willful_version_2_go_back
	}
}

#############################################
# Brooding									#
#############################################

#Start
character_event = {
	id = ZE.12050
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12050 # Drunkard courtier doesn't keep promises
		picture = GFX_evt_drunk
		trigger = {
			has_character_flag = child_brooding_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12050 # Learn whistling
		picture = GFX_evt_guardian
		trigger = {
			has_character_flag = child_brooding_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12050 # Commoner child needs help
		picture = GFX_evt_child_bully
		trigger = {
			has_character_flag = child_brooding_version_3
		}
	}

	is_triggered_only = yes
	hide_from = yes
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_brooding_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
		NOT = { is_inaccessible_trigger = yes }
	}

	immediate = { #Find viable courtier or if none, only make third version available
		set_character_flag = ze_child_brooding_events
		random_list = {
			10 = {
				modifier = { 
					educator = {
						NOT = {
							any_courtier = {
								trait = drunkard
								NOR = {
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon 
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_brooding_version_1
				educator = {
					random_courtier = {
						limit = {
							trait = drunkard
							NOR = {
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon 
							}
						}
						save_event_target_as = brooding_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_brooding_version_1 
								add_trait = brooding
							}
						}
					}
				}
			}
			10 = { 
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								is_adult = yes
								NOR = {
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_brooding_version_2
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							NOR = {
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
							}
						}
						save_event_target_as = brooding_events_char_2
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_brooding_version_2 
								add_trait = brooding
							}
						}
					}
				}
			}
			10= {
				set_character_flag = child_brooding_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_brooding_version_3
					add_trait = brooding
				}
			}
		}
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12050	# Pour water on drunk courtier
		trigger = {
			has_character_flag = child_brooding_version_1
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_brooding_version_1_poured_water
		event_target:brooding_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12052 }
			}
		}
		custom_tooltip = {
			text = EVTOPTBRO
		}
	}
	option = {
		name = EVTOPTB_ZE_12050	# Leave courtier alone
		trigger = {
			has_character_flag = child_brooding_version_1
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_brooding_version_1_left_alone
		event_target:brooding_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12052 }
			}
		}
	}

	# Version 2
	option = {
		name = EVTOPTC_ZE_12050	# Ask how courtier can whistle so easily
		trigger = {
			has_character_flag = child_brooding_version_2
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_brooding_version_2_asked
		event_target:brooding_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12052 }
			}
		}
		custom_tooltip = {
			text = EVTOPTBRO
		}
	}
	option = {
		name = EVTOPTD_ZE_12050	# Keep trying to whistle
		trigger = {
			has_character_flag = child_brooding_version_2
		}
		ai_chance = {
			factor = 0
		}
		prestige = 20
		set_character_flag = child_brooding_version_2_kept_trying
		event_target:brooding_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12052 }
			}
		}
	}

	# Version 3
	option = {
		name = EVTOPTE_ZE_12050	# Go help the small child
		trigger = {
			has_character_flag = child_brooding_version_3
		}
		ai_chance = {
			factor = 100
		}
		hidden_tooltip = {
			character_event = { id = ZE.12054 }
		}
		custom_tooltip = {
			text = EVTOPTBRO
		}
	}
	option = {
		name = EVTOPTF_ZE_12050	# Leave the children be
		trigger = {
			has_character_flag = child_brooding_version_3
		}
		ai_chance = {
			factor = 0
		}
		change_intrigue = 1
		hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
	}

	option = {
		name = EVTOPTD_ZE_12040	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_brooding_version_1
				has_character_flag = child_brooding_version_2
				has_character_flag = child_brooding_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12052
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12052 # Poured water on me
		picture = GFX_evt_drunk
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_poured_water
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12052 # Left me, feeling guilty
		picture = GFX_evt_drunk
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_left_alone
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12052 # Wants to know secret to whistling
		picture = GFX_evt_guardian
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_2_asked
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12052 # Keeps trying to whistle
		picture = GFX_evt_guardian
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_2_kept_trying
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12052	# Show child who's boss
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_poured_water
			}
		}
		ai_chance = {
			factor = 100
		}
		prestige = 30
		FROM = {
			set_character_flag = child_brooding_version_1_got_angry
			hidden_tooltip = {
				character_event = { id = ZE.12054 }
			}
		}
		custom_tooltip = {
			text = EVTOPTBRO_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12052	# Apologize to child
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_poured_water
			}
		}
		ai_chance = {
			factor = 0
		}
		prestige = -30
		FROM = {
			set_character_flag = child_brooding_version_1_apologized
			hidden_tooltip = {
				character_event = { id = ZE.12054 }
			}
		}
		custom_tooltip = {
			text = EVTOPTBRO_FROM
		}
	}
	option = {
		name = EVTOPTC_ZE_12052	# Saw child, remembered commitments
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_left_alone
			}
		}
		prestige = -30
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
		}
	}
	# Version 2
	option = {
		name = EVTOPTD_ZE_12052	# Tell child to keep trying, it's easy
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_2_asked
			}
		}
		ai_chance = {
			factor = 100
		}
		FROM = {
			set_character_flag = child_brooding_version_2_condescending
			character_event = { id = ZE.12054 }
		}
		custom_tooltip = {
			text = EVTOPTBRO_FROM
		}
	}
	option = {
		name = EVTOPTE_ZE_12052	# Some people never learn to do it
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_2_asked
			}
		}
		ai_chance = {
			factor = 0
		}
		FROM = {
			set_character_flag = child_brooding_version_2_not_everyone
			character_event = { id = ZE.12054 }
		}
		custom_tooltip = {
			text = EVTOPTBRO_FROM_B
		}
	}
	option = {
		name = EVTOPTF_ZE_12052	# You're happy child is trying
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_2_kept_trying
			}
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
		}
	}
}

# Child reacts
character_event = {
	id = ZE.12054
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12054
		picture = GFX_evt_drunk
		trigger = {
			has_character_flag = child_brooding_version_1_got_angry
		}
	}
	desc = {
		text = EVTDESCB_ZE_12054
		picture = GFX_evt_drunk
		trigger = {
			has_character_flag = child_brooding_version_1_apologized
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12054
		picture = GFX_evt_guardian
		trigger = {
			has_character_flag = child_brooding_version_2_condescending
		}
	}
	desc = {
		text = EVTDESCD_ZE_12054
		picture = GFX_evt_guardian
		trigger = {
			has_character_flag = child_brooding_version_2_not_everyone
		}
	}
	# Version 3
	desc = {
		text = EVTDESCE_ZE_12054
		picture = GFX_evt_child_bully
		trigger = {
			has_character_flag = child_brooding_version_3
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12054	# Courtier is pathetic
		trigger = {
			has_character_flag = child_brooding_version_1_got_angry
		}
		ai_chance = {
			factor = 100
		}
		opinion = {
			who = FROM
			modifier = opinion_hatred
			years = 2
		}
		add_trait = brooding
		set_character_flag = child_brooding_version_1_resent
		FROM = {
			character_event = { id = ZE.12056 }
		}
	}
	option = {
		name = EVTOPTB_ZE_12054	# Steal money
		trigger = {
			has_character_flag = child_brooding_version_1_got_angry
		}
		ai_chance = {
			factor = 0
		}
		change_intrigue = 1
		wealth = 25
		set_character_flag = child_brooding_version_1_stole_money
		FROM = {
			character_event = { id = ZE.12056 }
		}
	}

	option = {
		name = EVTOPTC_ZE_12054	# Courtier is not a grown up
		trigger = {
			has_character_flag = child_brooding_version_1_apologized
		}
		ai_chance = {
			factor = 100
		}
		add_trait = brooding
		set_character_flag = child_brooding_version_1_pity
		FROM = {
			character_event = { id = ZE.12056 }
		}
	}
	option = {
		name = EVTOPTD_ZE_12054	# Help courtier
		trigger = {
			has_character_flag = child_brooding_version_1_apologized
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_brooding_version_1_help
		FROM = {
			tooltip = {
				add_friend = ROOT
				remove_trait = drunkard
			}
			character_event = { id = ZE.12056 }
		}
	}
	
	# Version 2
	option = {
		name = EVTOPTE_ZE_12054	
		trigger = { # For AI weights, check what flag is set
			OR = {
				has_character_flag = child_brooding_version_2_condescending
				has_character_flag = child_brooding_version_2_not_everyone
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				has_character_flag = child_brooding_version_2_condescending
				factor = 2
			}
		}
		add_trait = brooding
		set_character_flag = child_brooding_version_2_brooding
		FROM = {
			character_event = { id = ZE.12056 }
		}
	}
	option = {
		name = EVTOPTF_ZE_12054	
		trigger = { # For AI weights, check what flag is set
			OR = {
				has_character_flag = child_brooding_version_2_condescending
				has_character_flag = child_brooding_version_2_not_everyone
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				has_character_flag = child_brooding_version_2_not_everyone
				factor = 2
			}
		}
		add_trait = timid
		set_character_flag = child_brooding_version_2_positive
		FROM = {
			character_event = { id = ZE.12056 }
		}
	}

	# Version 3
	option = {
		name = EVTOPTG_ZE_12054	
		trigger = {
			has_character_flag = child_brooding_version_3
		}
		ai_chance = {
			factor = 100
		}
		add_trait = brooding
		wealth = -10
		hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
	}
	option = {
		name = EVTOPTH_ZE_12054	
		trigger = {
			has_character_flag = child_brooding_version_3
		}
		ai_chance = {
			factor = 0
		}
		prestige = 40
		hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
	}
}

# Courtier informed
character_event = {
	id = ZE.12056
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12056
		picture = GFX_evt_drunk
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_resent
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12056
		picture = GFX_evt_bad_news
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_stole_money
			}
		}
	}
	desc = {
		text = EVTDESCC_ZE_12056
		picture = GFX_evt_bad_news
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_pity
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12056
		picture = GFX_evt_child_reading
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_help
			}
		}
	}
	desc = {
		text = EVTDESCE_ZE_12056
		picture = GFX_evt_child_play
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_2_brooding
			}
		}
	}
	desc = {
		text = EVTDESCF_ZE_12056
		picture = GFX_evt_child_play
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_2_positive
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12056	
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_resent
			}
		}
		FROM = {
			tooltip = {
				add_trait = brooding
			}
			hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
		}
	}
	option = {
		name = EVTOPTB_ZE_12056	
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_stole_money
			}
		}
		wealth = -25
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
		}
	}
	option = {
		name = EVTOPTC_ZE_12056	
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_pity
			}
		}

		FROM = {
			tooltip = {
				add_trait = brooding
			}
			hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
		}
	}
	option = {
		name = EVTOPTD_ZE_12056	
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_1_help
			}
		}
		add_friend = FROM
		remove_trait = drunkard
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
		}
	}
	# Version 2
	option = {
		name = EVTOPTE_ZE_12056	
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_2_brooding
			}
		}
		FROM = {
			tooltip = {
				add_trait = brooding
			}
			hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
		}
	}
	option = {
		name = EVTOPTF_ZE_12056	
		trigger = {
			FROM = {
				has_character_flag = child_brooding_version_2_positive
			}
		}
		FROM = {
			tooltip = {
				add_trait = timid
			}
			hidden_tooltip = { character_event = { id = ZE.12057 } } #clear all flags
		}
	}
}

#Catch all event flag clear
character_event = {
	id = ZE.12057
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		clr_character_flag = child_brooding_version_1
		clr_character_flag = child_brooding_version_2
		clr_character_flag = child_brooding_version_3
		clr_character_flag = child_brooding_version_1_poured_water
		clr_character_flag = child_brooding_version_1_left_alone
		clr_character_flag = child_brooding_version_2_asked
		clr_character_flag = child_brooding_version_2_kept_trying
		clr_character_flag = child_brooding_version_1_got_angry
		clr_character_flag = child_brooding_version_1_apologized
		clr_character_flag = child_brooding_version_2_condescending
		clr_character_flag = child_brooding_version_2_not_everyone
		clr_character_flag = child_brooding_version_1_resent
		clr_character_flag = child_brooding_version_1_stole_money
		clr_character_flag = child_brooding_version_1_pity
		clr_character_flag = child_brooding_version_1_help
		clr_character_flag = child_brooding_version_2_brooding
		clr_character_flag = child_brooding_version_2_positive
	}
}

#############################################
# Indolent									#
#############################################

# Start
character_event = {
	id = ZE.12060
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12060 # Courtier needs help cutting down trees
		picture = GFX_evt_bandits
		trigger = {
			has_character_flag = child_indolent_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12060 # Pay other child to do work while you take nap
		picture = GFX_evt_child_talking
		trigger = {
			has_character_flag = child_indolent_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12060 # Play with children or watch children play
		picture = GFX_evt_child_reading
		trigger = {
			has_character_flag = child_indolent_version_3
		}
	}

	is_triggered_only = yes
	hide_from = yes
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_indolent_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
		NOT = { is_inaccessible_trigger = yes }
	}

	immediate = { #Find viable courtier or if none, only make third version available
		set_character_flag = ze_child_indolent_events
		random_list = {
			10 = {
				modifier = { # Find mean adult
					educator = {
						NOT = {
							any_courtier = {
								is_adult = yes
								OR = {
									trait = wroth
									trait = cruel
								}
								NOR = {
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon 
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_indolent_version_1
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							OR = {
								trait = wroth
								trait = cruel
							}
							NOR = {
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon 
							}
						}
						save_event_target_as = indolent_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_indolent_version_1 
								add_trait = indolent
							}
						}
					}
				}
			}
			10 = { # Find a child
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								NOR = {
									is_friend = ROOT
									is_adult = yes
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_indolent_version_2
				educator = {
					random_courtier = {
						limit = {
							NOR = {
								is_friend = ROOT
								is_adult = yes
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
							}
							ROOT = {
								wealth = 10
							}
						}
						save_event_target_as = indolent_events_char_2
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_indolent_version_2 
								add_trait = indolent
							}
						}
					}
				}
			}
			10= {
				set_character_flag = child_indolent_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_indolent_version_3
					add_trait = indolent
				}
			}
		}
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12060	# Sudden stomach ache
		trigger = {
			has_character_flag = child_indolent_version_1
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_indolent_version_1_feeling_ill
		event_target:indolent_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12062 }
			}
		}
		custom_tooltip = {
			text = EVTOPTIND
		}
	}
	option = {
		name = EVTOPTB_ZE_12060	# Help out with tree cutting
		trigger = {
			has_character_flag = child_indolent_version_1
		}
		ai_chance = {
			factor = 0
		}
		piety = 50
		set_character_flag = child_indolent_version_1_cut_trees
		event_target:indolent_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12062 }
			}
		}
	}

	# Version 2
	option = {
		name = EVTOPTC_ZE_12060	# Pay friend to do boring chores
		trigger = {
			has_character_flag = child_indolent_version_2
		}
		ai_chance = {
			factor = 100
		}
		tooltip = {
			wealth =-5
		}
		custom_tooltip = {
			text = EVTOPTC_ZE_12060_TOOLTIP
		}
		set_character_flag = child_indolent_version_2_bribe
		event_target:indolent_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12062 }
			}
		}
		custom_tooltip = {
			text = EVTOPTIND
		}
	}
	option = {
		name = EVTOPTD_ZE_12060	# join other child on walk
		trigger = {
			has_character_flag = child_indolent_version_2
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_indolent_version_2_join
		event_target:indolent_events_char_2 = {
			tooltip = {
				add_friend = ROOT
			}
			hidden_tooltip = {
				character_event = { id = ZE.12062 }
			}
		}
	}

	# Version 3
	option = {
		name = EVTOPTE_ZE_12060	# go to other children
		trigger = {
			has_character_flag = child_indolent_version_3
		}
		ai_chance = {
			factor = 100
		}
		hidden_tooltip = {
			character_event = { id = ZE.12064 }
		}
		custom_tooltip = {
			text = EVTOPTIND
		}
	}
	option = {
		name = EVTOPTF_ZE_12060	# read book
		trigger = {
			has_character_flag = child_indolent_version_3
		}
		ai_chance = {
			factor = 0
		}
		prestige = 20
		add_trait = poet
		hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
	}

	option = {
		name = EVTOPTF_ZE_12040	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_indolent_version_1
				has_character_flag = child_indolent_version_2
				has_character_flag = child_indolent_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12062
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12062 # Child complaining about stomach ache
		picture = GFX_evt_noble_in_castle
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_feeling_ill
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12062 # Child helping with cutting down trees
		picture = GFX_evt_bandits
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_cut_trees
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12062 # Other child wants me to run errand
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_2_bribe
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12062 # Joined on travels by other child
		picture = GFX_evt_market
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_2_join
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12062	# Show child what pain is all about
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_feeling_ill
			}
		}
		ai_chance = {
			factor = 0
		}
		prestige = 20
		FROM = {
			set_character_flag = child_indolent_version_1_punished
			hidden_tooltip = {
				character_event = { id = ZE.12064 }
			}
		}
		custom_tooltip = {
			text = EVTOPTIND_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12062	# worry about child
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_feeling_ill
			}
		}
		ai_chance = {
			factor = 100
		}
		FROM = {
			set_character_flag = child_indolent_version_1_worried
			hidden_tooltip = {
				character_event = { id = ZE.12064 }
			}
		}
		prestige = -30
		custom_tooltip = {
			text = EVTOPTIND_FROM
		}
	}
	option = {
		name = EVTOPTC_ZE_12062	# Child helped, be grateful
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_cut_trees
			}
		}
		prestige = 20
	}
	# Version 2
	option = {
		name = EVTOPTD_ZE_12062	# Take money to go to market
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_2_bribe
			}
		}
		ai_chance = {
			factor = 100
		}
		wealth = 5
		FROM = {
			set_character_flag = child_indolent_version_2_took_money
			character_event = { id = ZE.12064 }
		}
		custom_tooltip = {
			text = EVTOPTIND_FROM
		}
	}
	option = {
		name = EVTOPTE_ZE_12062	# Refuse to go
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_2_bribe
			}
		}
		ai_chance = {
			factor = 0
		}
		opinion = {
			who = FROM
			modifier = opinion_dislike
			years = 3
		}
		prestige = 20
		FROM = {
			set_character_flag = child_indolent_version_2_refused
			character_event = { id = ZE.12064 }
		}
	}
	option = {
		name = EVTOPTF_ZE_12062	# Other child joined me to market
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_2_join
			}
		}
		add_friend = FROM
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
		}
	}
}

# Child reacts
character_event = {
	id = ZE.12064
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12064
		picture = GFX_evt_noble_in_castle
		trigger = {
			has_character_flag = child_indolent_version_1_punished
		}
	}
	desc = {
		text = EVTDESCB_ZE_12064
		picture = GFX_evt_noble_in_castle
		trigger = {
			has_character_flag = child_indolent_version_1_worried
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12064
		picture = GFX_evt_child_reading
		trigger = {
			has_character_flag = child_indolent_version_2_took_money
		}
	}
	desc = {
		text = EVTDESCD_ZE_12064
		picture = GFX_evt_noble_in_castle
		trigger = {
			has_character_flag = child_indolent_version_2_refused
		}
	}
	# Version 3
	desc = {
		text = EVTDESCE_ZE_12064
		picture = GFX_evt_child_talking
		trigger = {
			has_character_flag = child_indolent_version_3
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12064	
		trigger = {
			has_character_flag = child_indolent_version_1_punished
		}
		ai_chance = {
			factor = 100
		}
		opinion = {
			who = FROM
			modifier = opinion_mad_at_guardian
			years = 2
		}
		add_trait = indolent
		set_character_flag = child_indolent_version_1_persistent
		FROM = {
			character_event = { id = ZE.12066 }
		}
	}
	option = {
		name = EVTOPTB_ZE_12064	
		trigger = {
			has_character_flag = child_indolent_version_1_punished
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_indolent_version_1_regretful
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_satisfied
					years = 2
				}
			}
			character_event = { id = ZE.12066 }
		}
	}

	option = {
		name = EVTOPTC_ZE_12064	
		trigger = {
			has_character_flag = child_indolent_version_1_worried
		}
		ai_chance = {
			factor = 100
		}
		add_trait = indolent
		set_character_flag = child_indolent_version_1_tea
		FROM = {
			character_event = { id = ZE.12066 }
		}
	}
	option = {
		name = EVTOPTD_ZE_12064	
		trigger = {
			has_character_flag = child_indolent_version_1_worried
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_indolent_version_1_regretful
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_satisfied
					years = 2
				}
			}
			character_event = { id = ZE.12066 }
		}
	}
	
	# Version 2
	option = {
		name = EVTOPTE_ZE_12064	
		trigger = {
			has_character_flag = child_indolent_version_2_took_money
		}
		ai_chance = {
			factor = 100
		}
		add_trait = indolent
		hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
	}
	option = {
		name = EVTOPTF_ZE_12064	
		trigger = {
			has_character_flag = child_indolent_version_2_took_money
		}
		ai_chance = {
			factor = 0
		}
		prestige = 15
		change_stewardship = 1
		hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
		
	}
	option = {
		name = EVTOPTG_ZE_12064
		trigger = {
			has_character_flag = child_indolent_version_2_refused
		}
		prestige = -40
		hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
	}

	# Version 3
	option = {
		name = EVTOPTH_ZE_12064	
		trigger = {
			has_character_flag = child_indolent_version_3
		}
		ai_chance = {
			factor = 100
		}
		add_trait = indolent
		hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
	}
	option = {
		name = EVTOPTI_ZE_12064	
		trigger = {
			has_character_flag = child_indolent_version_3
		}
		ai_chance = {
			factor = 0
		}
		health = 1
		hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
	}
}

# Courtier informed
character_event = {
	id = ZE.12066
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12066
		picture = GFX_evt_religious_exultation
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_persistent
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12066
		picture = GFX_evt_powerful_ruler
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_tea
			}
		}
	}
	desc = {
		text = EVTDESCC_ZE_12066
		picture = GFX_evt_noble_in_castle
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_regretful
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12066	
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_persistent
			}
		}
		FROM = {
			tooltip = {
				add_trait = indolent
			}
			hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTB_ZE_12066	
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_tea
			}
		}
		FROM = {
			tooltip = {
				add_trait = indolent
			}
			hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTC_ZE_12066	
		trigger = {
			FROM = {
				has_character_flag = child_indolent_version_1_regretful
			}
		}
		opinion = {
			who = FROM
			modifier = opinion_satisfied
			years = 2
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12067 } } #Clear all flags
		}
	}
}

#Catch all event flag clear
character_event = {
	id = ZE.12067
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		clr_character_flag = child_indolent_version_1
		clr_character_flag = child_indolent_version_2
		clr_character_flag = child_indolent_version_3
		clr_character_flag = child_indolent_version_1_feeling_ill
		clr_character_flag = child_indolent_version_1_cut_trees
		clr_character_flag = child_indolent_version_2_bribe
		clr_character_flag = child_indolent_version_2_join
		clr_character_flag = child_indolent_version_1_punished
		clr_character_flag = child_indolent_version_1_worried
		clr_character_flag = child_indolent_version_2_took_money
		clr_character_flag = child_indolent_version_2_refused
		clr_character_flag = child_indolent_version_1_persistent
		clr_character_flag = child_indolent_version_1_tea
		clr_character_flag = child_indolent_version_1_regretful
	}
}

#############################################
# Playful									#
#############################################

# Start
character_event = {
	id = ZE.12070
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12070 # Race courtier
		picture = GFX_evt_leaning_tower
		trigger = {
			has_character_flag = child_playful_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12070 # hide and seek with burglar
		picture = GFX_evt_shadow
		trigger = {
			has_character_flag = child_playful_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12070 # Gardening, tickle gardener?
		picture = GFX_evt_garden
		trigger = {
			has_character_flag = child_playful_version_3
		}
	}

	is_triggered_only = yes
	hide_from = yes
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_playful_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
		NOT = { is_inaccessible_trigger = yes }
	}

	immediate = { #Find viable courtier or if none, only make third version available
		set_character_flag = ze_child_playful_events
		random_list = {
			10 = {
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								is_adult = yes
								NOR = {
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
									trait = wroth
									trait = cynical
									trait = incapable
									trait = cruel
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_playful_version_1
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							NOR = {
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
								trait = wroth
								trait = cynical
								trait = incapable
								trait = cruel
							}
						}
						save_event_target_as = playful_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_playful_version_1 
								add_trait = playful
							}
						}
					}
				}
			}
			10 = {
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								is_adult = yes
								NOR = { 
									trait = imbecile
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_playful_version_2
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							NOR = { 
								trait = imbecile
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
							}
						}
						save_event_target_as = playful_events_char_2
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_playful_version_2 
								add_trait = playful
							}
						}
					}
				}
			}
			10= {
				set_character_flag = child_playful_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_playful_version_3
					add_trait = playful
				}
			}
		}
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12070	# Race courtier carrying bags
		trigger = {
			has_character_flag = child_playful_version_1
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_playful_version_1_race
		event_target:playful_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12072 }
			}
		}
		custom_tooltip = {
			text = EVTOPTPLA
		}
	}
	option = {
		name = EVTOPTB_ZE_12070	# Help carrying the bags
		trigger = {
			has_character_flag = child_playful_version_1
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_playful_version_1_help
		event_target:playful_events_char_1 = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = well_mannered
					years = 3
				}
			}
			hidden_tooltip = {
				character_event = { id = ZE.12072 }
			}
		}
	}

	# Version 2
	option = {
		name = EVTOPTC_ZE_12070	# Hide with mysterious man
		trigger = {
			has_character_flag = child_playful_version_2
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_playful_version_2_hide
		hidden_tooltip = {
			character_event = { id = ZE.12072 }
		}
		custom_tooltip = {
			text = EVTOPTPLA
		}
	}
	option = {
		name = EVTOPTD_ZE_12070	# Call for help
		trigger = {
			has_character_flag = child_playful_version_2
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_playful_version_2_call
		event_target:playful_events_char_2 = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_relieved
					years = 2
				}
			}
			hidden_tooltip = {
				character_event = { id = ZE.12072 }
			}
		}
	}

	# Version 3
	option = {
		name = EVTOPTE_ZE_12070	# Tickle gardener
		trigger = {
			has_character_flag = child_playful_version_3
		}
		ai_chance = {
			factor = 100
		}
		random_list = {
			50 = {
				set_character_flag = child_playful_version_3_ticklish
				custom_tooltip = {
					text = EVTOPTE_ZE_12070_TOOLTIP1
				}
				hidden_tooltip = {
					character_event = { id = ZE.12074 }
				}
			}
			50 = {
				set_character_flag = child_playful_version_3_slander
				custom_tooltip = {
					text = EVTOPTE_ZE_12070_TOOLTIP2
				}
				hidden_tooltip = {
					character_event = { id = ZE.12074 }
				}
			}
		}
		custom_tooltip = {
			text = EVTOPTPLA
		}
	}
	option = {
		name = EVTOPTF_ZE_12070	# Work hard
		trigger = {
			has_character_flag = child_playful_version_3
		}
		ai_chance = {
			factor = 0
		}
		piety = 20
		prestige = 30
		hidden_tooltip = { character_event = { id = ZE.12077 } } #Clear all flags
	}
}

# Courtier/Child reacts (special case for version 2)
character_event = {
	id = ZE.12072
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12072 # Child wanted to race
		picture = GFX_evt_leaning_tower
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_1_race
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12072 # Child helped out
		picture = GFX_evt_leaning_tower
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_1_help
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12072 # Hides with strange man (for child)
		picture = GFX_evt_shadow
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_2_hide
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12072 # Child answered when I was looking for him/her
		picture = GFX_evt_shadow
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_2_call
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12072	# Race with the child
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_1_race
			}
		}
		ai_chance = {
			factor = 100
		}
		FROM = {
			set_character_flag = child_playful_version_1_accept
			hidden_tooltip = {
				character_event = { id = ZE.12074 }
			}
		}
		custom_tooltip = {
			text = EVTOPTPLA_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12072	# lecture child
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_1_race
			}
		}
		ai_chance = {
			factor = 0
		}
		FROM = {
			set_character_flag = child_playful_version_1_lecture
			hidden_tooltip = {
				character_event = { id = ZE.12074 }
			}
		}
	}
	option = {
		name = EVTOPTC_ZE_12072	# Grateful for child helping out
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_1_help
			}
		}
		opinion = {
			who = FROM
			modifier = well_mannered
			years = 3
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12077 } } #Clear all flags
		}
	}
	# Version 2 Child
	option = {
		name = EVTOPTD_ZE_12072	# Play game with strange man
		trigger = {
			has_character_flag = child_playful_version_2_hide
		}
		ai_chance = {
			factor = 100
		}
		prestige = 10
		wealth = 5
		set_character_flag = child_playful_version_2_played
		character_event = { id = ZE.12074 }
		custom_tooltip = {
			text = EVTOPTPLA
		}
	}
	option = {
		name = EVTOPTE_ZE_12072	# Call for help
		trigger = {
			has_character_flag = child_playful_version_2_hide
		}
		ai_chance = {
			factor = 0
		}

		hidden_tooltip = {
			clr_character_flag = child_playful_version_2_hide
			set_character_flag = child_playful_version_2_call
		}
		event_target:playful_events_char_2 = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_relieved
					years = 2
				}
			}
			character_event = { id = ZE.12072 }
		}
	}
	#Version 2 Courtier
	option = {
		name = EVTOPTF_ZE_12072	# Child answered my call
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_2_call
			}
		}
		opinion = {
			who = FROM
			modifier = opinion_relieved
			years = 2
		}
		FROM = {
			set_character_flag = child_playful_version_2_worried
			character_event = { id = ZE.12074 }
		}
	}
}

# Child reacts
character_event = {
	id = ZE.12074
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12074 # Racing challenge accepted
		picture = GFX_evt_leaning_tower
		trigger = {
			has_character_flag = child_playful_version_1_accept
		}
	}
	desc = {
		text = EVTDESCB_ZE_12074 # Lectured on responsibilities
		picture = GFX_evt_leaning_tower
		trigger = {
			has_character_flag = child_playful_version_1_lecture
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12074 # Child playing with burglar
		picture = GFX_evt_whispers
		trigger = {
			has_character_flag = child_playful_version_2_played
		}
	}
	# Version 2
	desc = {
		text = EVTDESCD_ZE_12074 # courtier worried about me
		picture = GFX_evt_scandal
		trigger = {
			has_character_flag = child_playful_version_2_worried
		}
	}
	# Version 3
	desc = {
		text = EVTDESCE_ZE_12074 # Gardener was ticklish
		picture = GFX_evt_garden
		trigger = {
			has_character_flag = child_playful_version_3_ticklish
		}
	}
	desc = {
		text = EVTDESCF_ZE_12074 # Gardener slanders me
		picture = GFX_evt_courtiers_talking
		trigger = {
			has_character_flag = child_playful_version_3_slander
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12074	# Good sport
		trigger = {
			has_character_flag = child_playful_version_1_accept
		}
		ai_chance = {
			factor = 100
		}
		add_trait = playful
		set_character_flag = child_playful_version_1_good_sport
		event_target:playful_events_char_1 = {
			character_event = { id = ZE.12076 }
		}
	}
	option = {
		name = EVTOPTB_ZE_12074 # Courtier is a cheater!
		trigger = {
			has_character_flag = child_playful_version_1_accept
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_playful_version_1_sore_loser
		event_target:playful_events_char_1 = {
			character_event = { id = ZE.12076 }
		}
	}
	option = {
		name = EVTOPTC_ZE_12074 # Lectured on responsibilities
		trigger = {
			has_character_flag = child_playful_version_1_lecture
		}
		hidden_tooltip = { character_event = { id = ZE.12077 } } #Clear all flags
	}

	# Version 2
	option = {
		name = EVTOPTD_ZE_12074	
		trigger = {
			has_character_flag = child_playful_version_2_played
		}
		add_trait = playful
		hidden_tooltip = { character_event = { id = ZE.12077 } } #Clear all flags
	}
	option = {
		name = EVTOPTE_ZE_12074	
		trigger = {
			has_character_flag = child_playful_version_2_worried
		}
		event_target:playful_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12076 }
			}
		}
	}

	# Version 3
	option = {
		name = EVTOPTF_ZE_12074	
		trigger = {
			has_character_flag = child_playful_version_3_ticklish
		}
		add_trait = playful
		hidden_tooltip = { character_event = { id = ZE.12077 } } #Clear all flags
	}
	option = {
		name = EVTOPTG_ZE_12074
		trigger = {
			has_character_flag = child_playful_version_3_slander
		}
		educator = {
			any_courtier = {
				opinion = {
					who = ROOT
					modifier = opinion_irritated
					years = 2
				}
			}
		}
		hidden_tooltip = { character_event = { id = ZE.12077 } } #Clear all flags
	}
}

# Courtier informed
character_event = {
	id = ZE.12076
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12076
		picture = GFX_evt_leaning_tower
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_1_good_sport
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12076
		picture = GFX_evt_leaning_tower
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_1_sore_loser
			}
		}
	}
	desc = {
		text = EVTDESCC_ZE_12076
		picture = GFX_evt_scandal
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_2_worried
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12076	
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_1_good_sport
			}
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12077 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTB_ZE_12076	
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_1_sore_loser
			}
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12077 } } #Clear all flags
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12076	
		trigger = {
			FROM = {
				has_character_flag = child_playful_version_2_worried
			}
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12077 } } #Clear all flags
		}
	}
}

#Catch all event flag clear
character_event = {
	id = ZE.12077
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		clr_character_flag = child_playful_version_1
		clr_character_flag = child_playful_version_2
		clr_character_flag = child_playful_version_3
		clr_character_flag = child_playful_version_1_race
		clr_character_flag = child_playful_version_1_help
		clr_character_flag = child_playful_version_2_hide
		clr_character_flag = child_playful_version_2_call
		clr_character_flag = child_playful_version_1_accept
		clr_character_flag = child_playful_version_1_lecture
		clr_character_flag = child_playful_version_2_played
		clr_character_flag = child_playful_version_2_worried
		clr_character_flag = child_playful_version_3_ticklish
		clr_character_flag = child_playful_version_3_slander
		clr_character_flag = child_playful_version_1_good_sport
		clr_character_flag = child_playful_version_1_sore_loser
	}
}

#############################################
# Conscientious								#
#############################################

# Start
character_event = {
	id = ZE.12080
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12080 # Messy room, sort the books or go play?
		picture = GFX_evt_ritual_scroll
		trigger = {
			has_character_flag = child_conscientious_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12080 # child misbehaves, tell an adult or keep secret?
		picture = GFX_evt_council
		trigger = {
			has_character_flag = child_conscientious_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12080 # lost clothing outside, go look for it or go home?
		picture = GFX_evt_child_play
		trigger = {
			has_character_flag = child_conscientious_version_3
		}
	}

	is_triggered_only = yes
	hide_from = yes
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_conscientious_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
		NOT = { is_inaccessible_trigger = yes }
	}

	immediate = { #Find viable courtier or if none, only make third version available
		set_character_flag = ze_child_conscientious_events
		random_list = {
			10 = {
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								is_adult = yes
								NOR = {
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_conscientious_version_1
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							NOR = {
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
							}
						}
						save_event_target_as = conscientious_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_conscientious_version_1 
								add_trait = conscientious
							}
						}
					}
				}
			}
			10 = {
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								is_adult = no
								NOR = { 
									trait = conscientious
									is_rival = ROOT
									is_friend = ROOT
									trait = imbecile
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_conscientious_version_2
				educator = {
					random_courtier = {
						limit = {
							is_adult = no
							NOR = { 
								trait = conscientious
								is_rival = ROOT
								is_friend = ROOT
								trait = imbecile
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
							}
						}
						save_event_target_as = conscientious_events_char_2
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_conscientious_version_2 
								add_trait = conscientious
							}
						}
					}
				}
			}
			10= {
				set_character_flag = child_conscientious_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_conscientious_version_3
					add_trait = conscientious
				}
			}
		}
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12080	# Sort the books
		trigger = {
			has_character_flag = child_conscientious_version_1
		}
		ai_chance = {
			factor = 100
		}
		prestige = 10
		set_character_flag = child_conscientious_version_1_sorted_books
		event_target:conscientious_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12082 }
			}
		}
		custom_tooltip = {
			text = EVTOPTCON
		}
	}
	option = {
		name = EVTOPTB_ZE_12080	# Go out and play
		trigger = {
			has_character_flag = child_conscientious_version_1
		}
		ai_chance = {
			factor = 0
		}
		health = 1
		set_character_flag = child_conscientious_version_1_go_play
		event_target:conscientious_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12082 }
			}
		}
	}

	# Version 2
	option = {
		name = EVTOPTC_ZE_12080	# Child misbehaving, you tell on him/her
		trigger = {
			has_character_flag = child_conscientious_version_2
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_conscientious_version_2_told_on
		event_target:conscientious_events_char_2 = {
			add_rival = ROOT
			hidden_tooltip = {
				character_event = { id = ZE.12082 }
			}
		}
		custom_tooltip = {
			text = EVTOPTCON
		}
	}
	option = {
		name = EVTOPTD_ZE_12080	# Keep the secret
		trigger = {
			has_character_flag = child_conscientious_version_2
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_conscientious_version_2_kept_quiet
		event_target:conscientious_events_char_2 = {
			add_friend = ROOT
			hidden_tooltip = {
				character_event = { id = ZE.12082 }
			}
		}
	}

	# Version 3
	option = {
		name = EVTOPTE_ZE_12080	# Go look for missing clothing
		trigger = {
			has_character_flag = child_conscientious_version_3
		}
		ai_chance = {
			factor = 100
		}
		add_trait = conscientious
		random_list = {
			50 = {
				custom_tooltip = {
					text = EVTOPTE_ZE_12080_TOOLTIP1
				}
				hidden_tooltip = {
					set_character_flag = child_conscientious_version_3_pneumonia
					character_event = { id = ZE.12084 }
				}
			}
			50 = {
				custom_tooltip = {
					text = EVTOPTE_ZE_12080_TOOLTIP2
				}
				hidden_tooltip = {
					set_character_flag = child_conscientious_version_3_found_clothes
					character_event = { id = ZE.12084 }
				}
			}
		}
	}
	option = {
		name = EVTOPTF_ZE_12080	# Go back home
		trigger = {
			has_character_flag = child_conscientious_version_3
		}
		ai_chance = {
			factor = 0
		}
		change_diplomacy = 1
		prestige = 20
		hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
	}

	option = {
		name = EVTOPTF_ZE_12040	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_conscientious_version_1
				has_character_flag = child_conscientious_version_2
				has_character_flag = child_conscientious_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12082
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12082 # Child ruined my research
		picture = GFX_evt_ritual_scroll
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_1_sorted_books
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12082 # Other child told on me
		picture = GFX_evt_leaving_table_angrily
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_2_told_on
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12082 # Other child played with me
		picture = GFX_evt_child_play
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_2_kept_quiet
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12082	# Research ruined I'm furious
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_1_sorted_books
			}
		}
		ai_chance = {
			factor = 100
		}
		FROM = {
			set_character_flag = child_conscientious_version_1_scolded
			hidden_tooltip = {
				character_event = { id = ZE.12084 }
			}
		}
		custom_tooltip = {
			text = EVTOPTCON_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12082	# I should keep my chamber cleaner in the future 
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_1_sorted_books
			}
		}
		ai_chance = {
			factor = 0
		}
		prestige = -50
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12082	# other child told on me, run away
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_2_told_on
			}
		}
		ai_chance = {
			factor = 100
		}
		tooltip = {
			add_rival = FROM
		}
		prestige = 30
		FROM = {
			set_character_flag = child_conscientious_version_2_ran_away
			character_event = { id = ZE.12084 }
		}
		custom_tooltip = {
			text = EVTOPTCON_FROM
		}
	}
	option = {
		name = EVTOPTD_ZE_12082	# other child told on me, finish dishes
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_2_told_on
			}
		}
		ai_chance = {
			factor = 0
		}
		tooltip = {
			add_rival = FROM
		}
		FROM = {
			set_character_flag = child_conscientious_version_2_finish_dishes
			character_event = { id = ZE.12084 }
		}
	}
	option = {
		name = EVTOPTE_ZE_12082	# other child played with me
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_2_kept_quiet
			}
		}
		tooltip = {
			add_friend = FROM
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
		}
	}
}

# Child reacts
character_event = {
	id = ZE.12084
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12084
		picture = GFX_evt_scientist
		trigger = {
			has_character_flag = child_conscientious_version_1_scolded
		}
	}
	desc = {
		text = EVTDESCB_ZE_12084
		picture = GFX_evt_council
		trigger = {
			has_character_flag = child_conscientious_version_2_ran_away
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12084
		picture = GFX_evt_council
		trigger = {
			has_character_flag = child_conscientious_version_2_finished_dishes
		}
	}
	# Version 3
	desc = {
		text = EVTDESCD_ZE_12084
		picture = GFX_evt_mysterious_forest
		trigger = {
			has_character_flag = child_conscientious_version_3_pneumonia
		}
	}
	desc = {
		text = EVTDESCE_ZE_12084
		picture = GFX_evt_mysterious_forest
		trigger = {
			has_character_flag = child_conscientious_version_3_found_clothes
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12084	
		trigger = {
			has_character_flag = child_conscientious_version_1_scolded
		}
		ai_chance = {
			factor = 100
		}
		add_trait = conscientious
		opinion = {
			who = FROM
			modifier = opinion_hate
			years = 5
		}
		set_character_flag = child_conscientious_version_1_clean_again
		event_target:conscientious_events_char_1 = {
			character_event = { id = ZE.12086 }
		}
	}
	option = {
		name = EVTOPTB_ZE_12084
		trigger = {
			has_character_flag = child_conscientious_version_1_scolded
		}
		ai_chance = {
			factor = 0
		}
		any_courtier = {
			opinion = {
				modifier = opinion_disapprove
				who = FROM
				years = 3
			}
		}
		set_character_flag = child_conscientious_version_1_told_everyone
		event_target:conscientious_events_char_1 = {
			character_event = { id = ZE.12086 }
		}
	}

	# Version 2
	option = {
		name = EVTOPTC_ZE_12084	
		trigger = {
			has_character_flag = child_conscientious_version_2_ran_away
		}
		ai_chance = {
			factor = 100
		}
		add_trait = conscientious
		hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
	}
	option = {
		name = EVTOPTD_ZE_12084	
		trigger = {
			has_character_flag = child_conscientious_version_2_ran_away
		}
		ai_chance = {
			factor = 0
		}
		change_learning = 1
		hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
	}
	option = {
		name = EVTOPTE_ZE_12084	
		trigger = {
			has_character_flag = child_conscientious_version_2_finished_dishes
		}
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_hate
					years = 4
				}
			}
		}
		hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
	}

	# Version 3
	option = {
		name = EVTOPTF_ZE_12084	
		trigger = {
			has_character_flag = child_conscientious_version_3_pneumonia
		}
		if = {
			limit = {
				NOT = {
					has_dlc = "Reapers"
				}
			}
			add_trait = pneumonic
		}
		if = {
			limit = {
				has_dlc = "Reapers"
			}
			add_trait = infection
			hidden_tooltip = {
				character_event = { id = RIP.11001 days = 365 random = 1095 }
			}
		}
		hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
	}
	option = {
		name = EVTOPTG_ZE_12084
		trigger = {
			has_character_flag = child_conscientious_version_3_found_clothes
		}
		prestige = 50
		hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
	}
}

# Courtier informed
character_event = {
	id = ZE.12086
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12086
		picture = GFX_evt_mysterious_forest
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_1_clean_again
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12086
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_1_told_everyone
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12086	
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_1_clean_again
			}
		}
		FROM = {
			tooltip = {
				add_trait = conscientious
				opinion = {
					who = ROOT
					modifier = opinion_hate
					years = 5
				}
			}
			hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
		}
	}
	option = {
		name = EVTOPTB_ZE_12086	
		trigger = {
			FROM = {
				has_character_flag = child_conscientious_version_1_told_everyone
			}
		}
		tooltip = {
			any_courtier = {
				opinion = {
					modifier = opinion_disapprove
					who = ROOT
					years = 3
				}
			}
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12087 } } # Clear all flags
		}
	}
}

#Catch all event flag clear
character_event = {
	id = ZE.12087
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		clr_character_flag = child_conscientious_version_1
		clr_character_flag = child_conscientious_version_2
		clr_character_flag = child_conscientious_version_3
		clr_character_flag = child_conscientious_version_1_sorted_books
		clr_character_flag = child_conscientious_version_2_told_on
		clr_character_flag = child_conscientious_version_2_go_play
		clr_character_flag = child_conscientious_version_1_scolded
		clr_character_flag = child_conscientious_version_2_ran_away
		clr_character_flag = child_conscientious_version_2_finished_dishes
		clr_character_flag = child_conscientious_version_3_pneumonia
		clr_character_flag = child_conscientious_version_3_found_clothes
		clr_character_flag = child_conscientious_version_1_clean_again
		clr_character_flag = child_conscientious_version_1_told_everyone
	}
}


#############################################
# Fussy										#
#############################################

# Start
character_event = {
	id = ZE.12090
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12090 # About to go to bed, but missing toy
		picture = GFX_evt_cathedral
		trigger = {
			has_character_flag = child_fussy_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12090 # Food is served, but is very hot
		picture = GFX_evt_feast
		trigger = {
			has_character_flag = child_fussy_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12090 # Invited to eat cake but it's raining outside
		picture = GFX_evt_quarrel
		trigger = {
			has_character_flag = child_fussy_version_3
		}
	}

	is_triggered_only = yes
	hide_from = yes
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_fussy_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
		NOT = { is_inaccessible_trigger = yes }
	}

	immediate = { #Find viable courtier or if none, only make third version available
		set_character_flag = ze_child_fussy_events
		random_list = {
			10 = {
				modifier = {
					educator = {
						OR = {
							trait = blinded
							trait = imbecile
							trait = incapable
							has_character_modifier = the_oubliette
							has_character_modifier = the_dungeon
						}
					}
					factor = 0
				}
				set_character_flag = child_fussy_version_1
				educator = {
					save_event_target_as = fussy_events_char_1
					if = { # If we don't involve a player, skip these events
						limit = {
							ROOT = { ai = yes }
							ai = yes
						}
						ROOT = { 
							clr_character_flag = child_fussy_version_1 
							add_trait = fussy
						}
					}
				}
			}
			10 = {
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								NOR = {
									trait = blinded
									trait = imbecile
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_fussy_version_2
				educator = {
					random_courtier = {
						limit = {
							NOR = {
								trait = blinded
								trait = imbecile
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
							}
						}
						save_event_target_as = fussy_events_char_2
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { 
								clr_character_flag = child_fussy_version_2 
								add_trait = fussy
							}
						}
					}
				}
			}
			10= { 
				set_character_flag = child_fussy_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_fussy_version_3
					add_trait = fussy
				}
			}
		}
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12090	# wont go to bed without toy
		trigger = {
			has_character_flag = child_fussy_version_1
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_fussy_version_1_refused
		event_target:fussy_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12092 }
			}
		}
		custom_tooltip = {
			text = EVTOPTFUS
		}
	}
	option = {
		name = EVTOPTB_ZE_12090	# toy is not that important
		trigger = {
			has_character_flag = child_fussy_version_1
		}
		ai_chance = {
			factor = 0
		}
		prestige = 40
		set_character_flag = child_fussy_version_1_compliant
		event_target:fussy_events_char_1 = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_proud
					years = 2
				}
			}
			hidden_tooltip = {
				character_event = { id = ZE.12092 }
			}
		}
	}

	# Version 2
	option = {
		name = EVTOPTC_ZE_12090	# Food is too hot
		trigger = {
			has_character_flag = child_fussy_version_2
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_fussy_version_2_too_hot
		event_target:fussy_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12092 }
			}
		}
		custom_tooltip = {
			text = EVTOPTFUS
		}
	}
	option = {
		name = EVTOPTD_ZE_12090	# eat food and complement cooking
		trigger = {
			has_character_flag = child_fussy_version_2
		}
		ai_chance = {
			factor = 0
		}
		tooltip = {
			opinion = {
				who = ROOT
				modifier = opinion_happy
				years = 2
			}
		}
		set_character_flag = child_fussy_version_2_complemented_food
		event_target:fussy_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12092 }
			}
		}
	}

	# Version 3
	option = {
		name = EVTOPTE_ZE_12090	# Go out in the rain
		trigger = {
			has_character_flag = child_fussy_version_3
		}
		ai_chance = {
			factor = 0
		}
		prestige = 20
		random_list = {
			50 = {
				custom_tooltip = {
					text = EVTOPTE_ZE_12090_TOOLTIP1
				}
				hidden_tooltip = {
					set_character_flag = child_fussy_version_3_made_it
					character_event = { id = ZE.12094 }
				}
			}
			50 = {
				custom_tooltip = {
					text = EVTOPTE_ZE_12090_TOOLTIP2
				}
				hidden_tooltip = {
					set_character_flag = child_fussy_version_3_became_ill
					character_event = { id = ZE.12094 }
				}
			}
		}
	}
	option = {
		name = EVTOPTF_ZE_12090	# Skip cake to not get wet
		trigger = {
			has_character_flag = child_fussy_version_3
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_fussy_version_3_waited
		add_trait = fussy
		hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
	}

	option = {
		name = EVTOPTF_ZE_12040	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_fussy_version_1
				has_character_flag = child_fussy_version_2
				has_character_flag = child_fussy_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12092
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12092 # wont sleep without toy
		picture = GFX_evt_cathedral
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_refused
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12092 # toy not important
		picture = GFX_evt_cathedral
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_compliant
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12092 # child thinks food is too hot
		picture = GFX_evt_feast
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_2_too_hot
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12092 # Child complemented my cooking
		picture = GFX_evt_feast
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_2_complemented_food
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12092	# offer money for new toy
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_refused
			}
		}
		ai_chance = {
			factor = 60
		}
		FROM = {
			set_character_flag = child_fussy_version_1_offered_money
			hidden_tooltip = {
				character_event = { id = ZE.12094 }
			}
		}
		custom_tooltip = {
			text = EVTOPTFUS_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12092	# go find toy
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_refused
			}
		}
		ai_chance = {
			factor = 40
		}
		prestige = -30
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_happy_with_guardian
					years = 2
				}
			}
			hidden_tooltip = {
				set_character_flag = child_fussy_version_1_fetched_toy
				character_event = { id = ZE.12094 }
			}
		}
		custom_tooltip = {
			text = EVTOPTFUS_FROM
		}
	}
	option = {
		name = EVTOPTC_ZE_12092	# child went to sleep
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_compliant
			}
		}
		prestige = 30
		opinion = {
			who = FROM
			modifier = opinion_proud
			years = 2
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
		}
	}

	# Version 2
	option = {
		name = EVTOPTD_ZE_12092	# touch food to see if it's really too hot
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_2_too_hot
			}
		}
		ai_chance = {
			factor = 50
		}
		FROM = {
			set_character_flag = child_fussy_version_2_touched_food
			hidden_tooltip = {
				character_event = { id = ZE.12094 }
			}
		}
		custom_tooltip = {
			text = EVTOPTFUS_FROM
		}
	}
	option = {
		name = EVTOPTE_ZE_12092	# let child wait
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_2_too_hot
			}
		}
		ai_chance = {
			factor = 50
		}
		FROM = {
			hidden_tooltip = {
				set_character_flag = child_fussy_version_2_do_nothing
				character_event = { id = ZE.12094 }
			}
		}
		custom_tooltip = {
			text = EVTOPTFUS_FROM
		}
	}
	option = {
		name = EVTOPTF_ZE_12092	# Child complemented your food, you are glad
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_2_complemented_food
			}
		}
		prestige = 30
		opinion = {
			who = FROM
			modifier = opinion_happy
			years = 2
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
		}
	}
}

# Child reacts
character_event = {
	id = ZE.12094
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12094
		picture = GFX_evt_bribe_accepted
		trigger = {
			has_character_flag = child_fussy_version_1_offered_money
		}
	}
	desc = {
		text = EVTDESCB_ZE_12094
		picture = GFX_evt_noble_in_castle
		trigger = {
			has_character_flag = child_fussy_version_1_fetched_toy
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12094
		picture = GFX_evt_feast
		trigger = {
			has_character_flag = child_fussy_version_2_touched_food
		}
	}
	desc = {
		text = EVTDESCD_ZE_12094
		picture = GFX_evt_feast
		trigger = {
			has_character_flag = child_fussy_version_2_do_nothing
		}
	}
	# Version 3
	desc = {
		text = EVTDESCE_ZE_12094
		picture = GFX_evt_feast
		trigger = {
			has_character_flag = child_fussy_version_3_made_it
		}
	}
	desc = {
		text = EVTDESCF_ZE_12094
		picture = GFX_evt_illness
		trigger = {
			has_character_flag = child_fussy_version_3_became_ill
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12094	# It's not the same as my old toy
		trigger = {
			has_character_flag = child_fussy_version_1_offered_money
		}
		ai_chance = {
			factor = 100
		}
		add_trait = fussy
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_dislike
					years = 1
				}
			}
		}
		set_character_flag = child_fussy_version_1_persistent
		FROM = {
			character_event = { id = ZE.12096 }
		}
	}
	option = {
		name = EVTOPTB_ZE_12094	# Agree to offer of buying new toy
		trigger = {
			has_character_flag = child_fussy_version_1_offered_money
		}
		ai_chance = {
			factor = 0
		}
		opinion = {
			who = FROM
			modifier = opinion_satisfied
			years = 1
		}
		tooltip = {
			FROM = {
				wealth = -10
			}
		}
		set_character_flag = child_fussy_version_1_took_offer
		FROM = {
			character_event = { id = ZE.12096 }
		}
	}
	option = {
		name = EVTOPTC_ZE_12094	# Toy smells!
		trigger = {
			has_character_flag = child_fussy_version_1_fetched_toy
		}
		ai_chance = {
			factor = 100
		}
		add_trait = fussy
		set_character_flag = child_fussy_version_1_smelly_toy
		FROM = {
			character_event = { id = ZE.12096 }
		}
	}
	option = {
		name = EVTOPTD_ZE_12094	# Accept smelly toy
		trigger = {
			has_character_flag = child_fussy_version_1_fetched_toy
		}
		ai_chance = {
			factor = 0
		}
		opinion = {
			who = FROM
			modifier = opinion_happy_with_guardian
			years = 2
		}
		set_character_flag = child_fussy_version_1_fell_asleep
		FROM = {
			character_event = { id = ZE.12096 }
		}
	}

	
	# Version 2
	option = {
		name = EVTOPTE_ZE_12094	# They touched the food!
		trigger = {
			has_character_flag = child_fussy_version_2_touched_food
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_fussy_version_2_persistent
		add_trait = fussy
		tooltip = {
			opinion = {
				who = FROM
				modifier = opinion_mad_at_guardian
				years = 1
			}
		}
		prestige = 30
		FROM = {
			hidden_tooltip = {
				character_event = { id = ZE.12096 }
			}
		}
	}
	option = {
		name = EVTOPTF_ZE_12094	# I guess it's fine to eat
		trigger = {
			has_character_flag = child_fussy_version_2_touched_food
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_fussy_version_2_ate_food
		prestige = -20
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_satisfied
					years = 1
				}
			}
			hidden_tooltip = {
				character_event = { id = ZE.12096 }
			}
		}
	}
	option = {
		name = EVTOPTG_ZE_12094	# Now it's too cold!
		trigger = {
			has_character_flag = child_fussy_version_2_do_nothing
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_fussy_version_2_persistent
		add_trait = fussy
		tooltip = {
			opinion = {
				who = FROM
				modifier = opinion_mad_at_guardian
				years = 1
			}
		}
		prestige = 30
		FROM = {
			hidden_tooltip = {
				character_event = { id = ZE.12096 }
			}
		}
	}
	option = {
		name = EVTOPTH_ZE_12094	# Eat food
		trigger = {
			has_character_flag = child_fussy_version_2_do_nothing
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_fussy_version_2_ate_food
		prestige = -10
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_satisfied
					years = 1
				}
			}
			hidden_tooltip = {
				character_event = { id = ZE.12096 }
			}
		}
	}
	# Version 3
	option = {
		name = EVTOPTI_ZE_12094	# Made it to servants quarter 
		trigger = {
			has_character_flag = child_fussy_version_3_made_it
		}
		change_diplomacy = 1
		change_martial = 1
		hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
	}
	option = {
		name = EVTOPTJ_ZE_12094	# Took too long, became ill
		trigger = {
			has_character_flag = child_fussy_version_3_became_ill
		}
		change_diplomacy = 2
		if = {
			limit = {
				NOT = {
					has_dlc = "Reapers"
				}
			}
			add_trait = ill
		}
		if = {
			limit = {
				has_dlc = "Reapers"
			}
			add_symptom_effect = yes
		}
		hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
	}
}

# Courtier informed
character_event = {
	id = ZE.12096
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12096 # Child refuses to replace toy
		picture = GFX_evt_bribe_declined
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_persistent
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12096 # Child agreed to buy new toy
		picture = GFX_evt_bribe_accepted
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_took_offer
			}
		}
	}
	desc = {
		text = EVTDESCC_ZE_12096 # Child complains that now, the toy smells
		picture = GFX_evt_noble_in_castle
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_smelly_toy
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12096 # Child fell asleep after getting toy back
		picture = GFX_evt_cathedral
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_fell_asleep
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCE_ZE_12096 # Child still won't eat food
		picture = GFX_evt_feast
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_2_persistent
			}
		}
	}
	desc = { 
		text = EVTDESCF_ZE_12096 # Child ate food, finally
		picture = GFX_evt_feast
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_2_ate_food
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12096	
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_persistent
			}
		}
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_mad_at_guardian
					years = 1
				}
			}
			hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTB_ZE_12096	
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_took_offer
			}
		}
		wealth = -10
		FROM = {
			tooltip = {
				opinion = {
					who = FROM
					modifier = opinion_satisfied
					years = 1
				}
			}
			hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTC_ZE_12096	
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_smelly_toy
			}
		}
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_mad_at_guardian
					years = 1
				}
			}
			hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTD_ZE_12096	
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_1_fell_asleep
			}
		}
		opinion = {
			who = FROM
			modifier = opinion_satisfied
			years = 1
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
		}
	}
	# Version 2
	option = {
		name = EVTOPTE_ZE_12096	
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_2_persistent
			}
		}
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_mad_at_guardian
					years = 1
				}
				prestige = 50
			}
		}
		prestige = -50
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTF_ZE_12096	
		trigger = {
			FROM = {
				has_character_flag = child_fussy_version_2_ate_food
			}
		}
		prestige = 30
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12097 } } #Clear all flags
		}
	}
}

#Catch all event flag clear
character_event = {
	id = ZE.12097
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		clr_character_flag = child_fussy_version_1
		clr_character_flag = child_fussy_version_2
		clr_character_flag = child_fussy_version_3
		clr_character_flag = child_fussy_version_1_refused
		clr_character_flag = child_fussy_version_1_compliant
		clr_character_flag = child_fussy_version_2_too_hot
		clr_character_flag = child_fussy_version_2_complemented_food
		clr_character_flag = child_fussy_version_1_offered_money
		clr_character_flag = child_fussy_version_1_fetched_toy
		clr_character_flag = child_fussy_version_2_touched_food
		clr_character_flag = child_fussy_version_2_do_nothing
		clr_character_flag = child_fussy_version_3_made_it
		clr_character_flag = child_fussy_version_3_became_ill
		clr_character_flag = child_fussy_version_1_persistent
		clr_character_flag = child_fussy_version_1_took_offer
		clr_character_flag = child_fussy_version_1_smelly_toy
		clr_character_flag = child_fussy_version_1_fell_asleep
		clr_character_flag = child_fussy_version_2_persistent
		clr_character_flag = child_fussy_version_2_ate_food
	}
}

#############################################
# Curious									#
#############################################

# Start
character_event = {
	id = ZE.12100
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12100 # Follow adult when told to stay at home?
		picture = GFX_evt_guardian
		trigger = {
			has_character_flag = child_curious_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12100 # Open sealed letter meant for adult?
		picture = GFX_evt_recieve_letter
		trigger = {
			has_character_flag = child_curious_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12100 # Sounds coming from the bushes, investigate?
		picture = GFX_evt_child_play
		trigger = {
			has_character_flag = child_curious_version_3
		}
	}

	is_triggered_only = yes
	hide_from = yes
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_curious_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
		NOT = { is_inaccessible_trigger = yes }
	}

	immediate = { #Find viable courtier or if none, only make third version available
		set_character_flag = ze_child_curious_events
		random_list = {
			10 = {
				modifier = {
					educator = {
						OR = {
							NOT = { trait = charitable }
							trait = incapable
							has_character_modifier = the_oubliette
							has_character_modifier = the_dungeon 
						}
					}
					factor = 0
				}
				set_character_flag = child_curious_version_1
				educator = { 
					save_event_target_as = curious_events_char_1
					if = { # If we don't involve a player, skip these events
						limit = {
							ROOT = { ai = yes }
							ai = yes
						}
						ROOT = { 
							clr_character_flag = child_curious_version_1 
							add_trait = curious
						}
					}
				}
			}
			10 = {
				modifier = {
					educator = {
						OR = {
							trait = imbecile
							trait = incapable
							has_character_modifier = the_oubliette
							has_character_modifier = the_dungeon
						}
					}
					factor = 0
				}
				set_character_flag = child_curious_version_2
				educator = { 
					save_event_target_as = curious_events_char_2
					if = { # If we don't involve a player, skip these events
						limit = {
							ROOT = { ai = yes }
							ai = yes
						}
						ROOT = { 
							clr_character_flag = child_curious_version_2 
							add_trait = curious
						}
					}
				}
			}
			10= {
				set_character_flag = child_curious_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_curious_version_3
					add_trait = curious
				}
			}
		}
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12100	# Follow our educator
		trigger = {
			has_character_flag = child_curious_version_1
		}
		ai_chance = {
			factor = 100
		}
		add_trait = curious
		set_character_flag = child_curious_version_1_followed
		event_target:curious_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12102 }
			}
		}
	}
	option = {
		name = EVTOPTB_ZE_12100	# Stay at home like a good boy/girl
		trigger = {
			has_character_flag = child_curious_version_1
		}
		ai_chance = {
			factor = 0
		}
		piety = 50
		set_character_flag = child_curious_version_1_stayed_home
		event_target:curious_events_char_1 = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_satisfied
					years = 2
				}
			}
			hidden_tooltip = {
				character_event = { id = ZE.12102 }
			}
		}
	}

	# Version 2
	option = {
		name = EVTOPTC_ZE_12100	# Put the letter on a table for our educator
		trigger = {
			has_character_flag = child_curious_version_2
		}
		ai_chance = {
			factor = 0
		}
		piety = 50
		tooltip = {
			opinion = {
				who = ROOT
				modifier = opinion_glad
				years = 2
			}
		}
		set_character_flag = child_curious_version_2_left_letter
		event_target:curious_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12102 }
			}
		}
	}
	option = {
		name = EVTOPTD_ZE_12100	# Open the letter
		trigger = {
			has_character_flag = child_curious_version_2
		}
		ai_chance = {
			factor = 100
		}
		add_trait = curious
		set_character_flag = child_curious_version_2_read_letter
		event_target:curious_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12102 }
			}
		}
	}

	# Version 3
	option = {
		name = EVTOPTE_ZE_12100	# Investigate strange noise in bushes
		trigger = {
			has_character_flag = child_curious_version_3
		}
		ai_chance = {
			factor = 100
		}
		add_trait = curious
		random_list = {
			50 = {
				custom_tooltip = {
					text = EVTOPTE_ZE_12100_TOOLTIP1
				}
				hidden_tooltip = {
					set_character_flag = child_curious_version_3_bit
					character_event = { id = ZE.12104 }
				}
			}
			50 = {
				custom_tooltip = {
					text = EVTOPTE_ZE_12100_TOOLTIP2
				}
				hidden_tooltip = {
					set_character_flag = child_curious_version_3_found_pet
					character_event = { id = ZE.12104 }
				}
			}
		}
	}
	option = {
		name = EVTOPTF_ZE_12100	# Go tell someone
		trigger = {
			has_character_flag = child_curious_version_3
		}
		ai_chance = {
			factor = 0
		}
		hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
	}

	option = {
		name = EVTOPTF_ZE_12040	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_curious_version_1
				has_character_flag = child_curious_version_2
				has_character_flag = child_curious_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12102
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12102 # Child followed me to market
		picture = GFX_evt_guardian
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_1_followed
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12102 # Child waited patiently at home
		picture = GFX_evt_child_reading
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_1_stayed_home
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12102 # Child opened my private letter
		picture = GFX_evt_recieve_letter
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_2_read_letter
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12102 # Child left my letter untouched
		picture = GFX_evt_recieve_letter
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_2_left_letter
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12102	# Grab child by ear and correct them
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_1_followed
			}
		}
		ai_chance = {
			factor = 70
		}
		if = {
			limit = { religion = jain }
			piety = -15
		}
		prestige = 30
		FROM = {
			set_character_flag = child_curious_version_1_scolded
			hidden_tooltip = {
				character_event = { id = ZE.12104 }
			}
		}
	}
	option = {
		name = EVTOPTB_ZE_12102	# Laugh it off
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_1_followed
			}
		}
		ai_chance = {
			factor = 30
		}
		prestige = -40
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_happy_with_guardian
					years = 2
				}
			}
			hidden_tooltip = {
				set_character_flag = child_curious_version_1_forgiven
				character_event = { id = ZE.12104 }
			}
		}
	}
	option = {
		name = EVTOPTC_ZE_12102	# Child stayed at home, you are glad
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_1_stayed_home
			}
		}
		opinion = {
			who = FROM
			modifier = opinion_satisfied
			years = 2
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
		}
	}

	
	# Version 2
	option = {
		name = EVTOPTD_ZE_12102	# Punish child for opening your letter
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_2_read_letter
			}
		}
		ai_chance = {
			factor = 40
		}
		if = {
			limit = { religion = jain }
			piety = -15
		}
		FROM = {
			set_character_flag = child_curious_version_2_punished
			hidden_tooltip = {
				character_event = { id = ZE.12104 }
			}
		}
		if = {
			limit = { NOT = { trait = cruel } }
			add_trait = cruel
		}
	}
	option = {
		name = EVTOPTE_ZE_12102	# Tell child about privacy
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_2_read_letter
			}
		}
		ai_chance = {
			factor = 60
		}
		FROM = {
			tooltip = {
				prestige = -30
			}
			hidden_tooltip = {
				set_character_flag = child_curious_version_2_warned
				character_event = { id = ZE.12104 }
			}
		}
	}
	option = {
		name = EVTOPTF_ZE_12102	# You're glad child didn't open the letter
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_2_left_letter
			}
		}
		opinion = {
			who = FROM
			modifier = opinion_glad
			years = 2
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
		}
	}
}

# Child reacts
character_event = {
	id = ZE.12104
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12104
		picture = GFX_evt_guardian
		trigger = {
			has_character_flag = child_curious_version_1_scolded
		}
	}
	desc = {
		text = EVTDESCB_ZE_12104
		picture = GFX_evt_guardian
		trigger = {
			has_character_flag = child_curious_version_1_forgiven
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12104
		picture = GFX_evt_recieve_letter
		trigger = {
			has_character_flag = child_curious_version_2_punished
		}
	}
	desc = {
		text = EVTDESCD_ZE_12104
		picture = GFX_evt_recieve_letter
		trigger = {
			has_character_flag = child_curious_version_2_warned
		}
	}
	# Version 3
	desc = {
		text = EVTDESCE_ZE_12104
		picture = GFX_evt_child_play
		trigger = {
			has_character_flag = child_curious_version_3_bit
		}
	}
	desc = {
		text = EVTDESCF_ZE_12104
		picture = GFX_evt_child_play
		trigger = {
			has_character_flag = child_curious_version_3_found_pet
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12104	
		trigger = {
			has_character_flag = child_curious_version_1_scolded
		}
		ai_chance = {
			factor = 70
		}
		change_intrigue = 1
		opinion = {
			who = FROM
			modifier = opinion_dislike
			years = 1
		}
		set_character_flag = child_curious_version_1_persistent
		hidden_tooltip = {
			FROM = {
				character_event = { id = ZE.12106 }
			}
		}
	}
	option = {
		name = EVTOPTB_ZE_12104	
		trigger = {
			has_character_flag = child_curious_version_1_scolded
		}
		ai_chance = {
			factor = 30
		}
		tooltip = {
			opinion = {
				who = FROM
				modifier = opinion_satisfied
				years = 1
			}
		}
		set_character_flag = child_curious_version_1_regretful
		hidden_tooltip = {
			FROM = {
				character_event = { id = ZE.12106 }
			}
		}
	}
	option = {
		name = EVTOPTC_ZE_12104	
		trigger = {
			has_character_flag = child_curious_version_1_forgiven
		}
		opinion = {
			who = FROM
			modifier = opinion_happy_with_guardian
			years = 2
		}
		hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
	}

	
	# Version 2
	option = {
		name = EVTOPTD_ZE_12104	
		trigger = {
			has_character_flag = child_curious_version_2_punished
		}
		ai_chance = {
			factor = 40
		}
		set_character_flag = child_curious_version_1_persistent
		opinion = {
			who = FROM
			modifier = opinion_dislike
			years = 1
		}
		prestige = 30
		FROM = {
			hidden_tooltip = {
				character_event = { id = ZE.12106 }
			}
		}
	}
	option = {
		name = EVTOPTE_ZE_12104	
		trigger = {
			has_character_flag = child_curious_version_2_punished
		}
		ai_chance = {
			factor = 60
		}
		set_character_flag = child_curious_version_2_regretful
		prestige = -10
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_satisfied
					years = 1
				}
			}
			hidden_tooltip = {
				character_event = { id = ZE.12106 }
			}
		}
	}
	option = {
		name = EVTOPTF_ZE_12104	
		trigger = {
			has_character_flag = child_curious_version_2_warned
		}
		prestige = -30
		hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
	}

	# Version 3
	option = {
		name = EVTOPTG_ZE_12104	
		trigger = {
			has_character_flag = child_curious_version_3_bit
		}
		ai_chance = {
			factor = 30
		}
		add_trait = curious
		hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags

	}
	option = {
		name = EVTOPTH_ZE_12104	
		trigger = {
			has_character_flag = child_curious_version_3_bit
		}
		ai_chance = {
			factor = 70
		}
		change_learning = 1
		hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
	}
	option = {
		name = EVTOPTI_ZE_12104	
		trigger = {
			has_character_flag = child_curious_version_3_found_pet
		}
		add_trait = curious
		piety = 15
		hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
	}
}

# Courtier informed
character_event = {
	id = ZE.12106
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12106
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_1_persistent
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12106
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_1_regretful
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12106
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_2_persistent
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12106
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_2_regretful
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12106	
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_1_persistent
			}
		}
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_mad_at_guardian
					years = 1
				}
			}
			hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTB_ZE_12106	
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_1_regretful
			}
		}
		opinion = {
			who = FROM
			modifier = opinion_satisfied
			years = 1
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12106	
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_2_persistent
			}
		}
		prestige = -50
		FROM = {
			tooltip = {
				opinion = {
					who = ROOT
					modifier = opinion_mad_at_guardian
					years = 1
				}
				prestige = 50
			}
			hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTD_ZE_12106	
		trigger = {
			FROM = {
				has_character_flag = child_curious_version_2_regretful
			}
		}
		prestige = 30
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12107 } } #Clear all flags
		}
	}
}

#Catch all flag clearing event
character_event = {
	id = ZE.12107
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		clr_character_flag = child_curious_version_1
		clr_character_flag = child_curious_version_2
		clr_character_flag = child_curious_version_3
		clr_character_flag = child_curious_version_1_followed
		clr_character_flag = child_curious_version_1_stayed_home
		clr_character_flag = child_curious_version_2_read_letter
		clr_character_flag = child_curious_version_2_left_letter
		clr_character_flag = child_curious_version_1_scolded
		clr_character_flag = child_curious_version_1_forgiven
		clr_character_flag = child_curious_version_2_punished
		clr_character_flag = child_curious_version_2_warned
		clr_character_flag = child_curious_version_3_bit
		clr_character_flag = child_curious_version_3_found_pet
		clr_character_flag = child_curious_version_1_persistent
		clr_character_flag = child_curious_version_1_regretful
		clr_character_flag = child_curious_version_2_persistent
		clr_character_flag = child_curious_version_2_regretful
	}
}

#############################################
# Idolizer									#
#############################################

# Start
character_event = {
	id = ZE.12110
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12110 # Amazed by courtier
		picture = GFX_evt_son_asking_father
		trigger = {
			has_character_flag = child_idolizer_version_1
		}
	}
	# Version 2
	desc = {
		text = EVTDESCB_ZE_12110 # Adore other child, love?
		picture = GFX_evt_child_talking
		trigger = {
			has_character_flag = child_idolizer_version_2
		}
	}
	# Version 3
	desc = {
		text = EVTDESCC_ZE_12110 # All consuming devotion to god
		picture = GFX_evt_bishop
		trigger = {
			has_character_flag = child_idolizer_version_3
		}
	}

	is_triggered_only = yes
	hide_from = yes
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_flag = ze_child_idolizer_events }
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
		NOT = { is_inaccessible_trigger = yes }
	}

	immediate = { #Find viable courtier or if none, only make third version available
		set_character_flag = ze_child_idolizer_events
		random_list = {
			10 = {
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								is_adult = yes
								NOR = {
									trait = incapable
									trait = wroth
									trait = cruel
									trait = cynical
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_idolizer_version_1
				educator = {
					random_courtier = {
						limit = {
							is_adult = yes
							NOR = {
								trait = incapable
								trait = wroth
								trait = cruel
								trait = cynical
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
							}
						}
						save_event_target_as = idolizer_events_char_1
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = {
								clr_character_flag = child_idolizer_version_1 
								add_trait = idolizer
							}
						}
					}
				}
			}
			10 = {
				modifier = {
					educator = {
						NOT = {
							any_courtier = {
								is_adult = no
								NOR = { 
									trait = imbecile
									trait = incapable
									has_character_modifier = the_oubliette
									has_character_modifier = the_dungeon
								}
							}
						}
					}
					factor = 0
				}
				set_character_flag = child_idolizer_version_2
				educator = {
					random_courtier = {
						limit = {
							is_adult = no
							NOR = { 
								trait = imbecile
								trait = incapable
								has_character_modifier = the_oubliette
								has_character_modifier = the_dungeon
							}
						}
						save_event_target_as = idolizer_events_char_2
						if = { # If we don't involve a player, skip these events
							limit = {
								ROOT = { ai = yes }
								ai = yes
							}
							ROOT = { clr_character_flag = child_idolizer_version_2 
								add_trait = idolizer
							}
						}
					}
				}
			}
			10= {
				set_character_flag = child_idolizer_version_3
				if = { # If we don't involve a player, skip these events
					limit = {
						ai = yes
					}
					clr_character_flag = child_idolizer_version_3
					add_trait = idolizer
				}
			}
		}
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12110	# write a song to specific courtier
		trigger = {
			has_character_flag = child_idolizer_version_1
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_idolizer_version_1_wrote_song
		event_target:idolizer_events_char_1 = {
			hidden_tooltip = {
				character_event = { id = ZE.12112 }
			}
		}
		custom_tooltip = {
			text = EVTOPTIDO
		}
	}
	option = {
		name = EVTOPTB_ZE_12110	# tell all courtiers how nice it is here
		trigger = {
			has_character_flag = child_idolizer_version_1
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_idolizer_version_1_grateful
		event_target:idolizer_events_char_1 = {
			any_courtier = {
				opinion = {
					who = ROOT
					modifier = opinion_happy
					years = 3
				}
			}
			hidden_tooltip = {
				character_event = { id = ZE.12112 }
			}
		}
	}

	# Version 2
	option = {
		name = EVTOPTC_ZE_12110	# Everything event_target does is great
		trigger = {
			has_character_flag = child_idolizer_version_2
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_idolizer_version_2_adore
		event_target:idolizer_events_char_2 = {
			hidden_tooltip = {
				character_event = { id = ZE.12112 }
			}
		}
		custom_tooltip = {
			text = EVTOPTIDO
		}
	}
	option = {
		name = EVTOPTD_ZE_12110	# We should stay friends forever
		trigger = {
			has_character_flag = child_idolizer_version_2
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_idolizer_version_2_friends
		event_target:idolizer_events_char_2 = {
			add_friend = ROOT
			hidden_tooltip = {
				character_event = { id = ZE.12112 }
			}
		}
	}

	# Version 3
	option = {
		name = EVTOPTE_ZE_12110	# Dedicate myself to the faith
		trigger = {
			has_character_flag = child_idolizer_version_3
		}
		ai_chance = {
			factor = 100
		}
		piety = 30
		hidden_tooltip = {
			character_event = { id = ZE.12114 }
		}
		custom_tooltip = {
			text = EVTOPTIDO
		}
	}
	option = {
		name = EVTOPTF_ZE_12110	# steal money from church
		trigger = {
			has_character_flag = child_idolizer_version_3
		}
		ai_chance = {
			factor = 0
		}
		change_intrigue = 1
		wealth = 40
		hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags
	}

	option = {
		name = EVTOPTF_ZE_12040	# ai option, nothing to see here
		trigger = {
			NOT = {
				has_character_flag = child_idolizer_version_1
				has_character_flag = child_idolizer_version_2
				has_character_flag = child_idolizer_version_3
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

# Courtier reacts
character_event = {
	id = ZE.12112
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12112 # Child wrote me a song
		picture = GFX_evt_son_asking_father
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_1_wrote_song
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12112 # Child is grateful to everyone
		picture = GFX_evt_son_asking_father
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_1_grateful
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12112 # Other child adores me
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_2_adore
			}
		}
	}
	desc = {
		text = EVTDESCD_ZE_12112 # Other child wants to stay friends
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_2_friends
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12112	# Tell child they are sweet
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_1_wrote_song
			}
		}
		ai_chance = {
			factor = 50
		}
		prestige = 30
		opinion = {
			who = FROM
			modifier = opinion_happy
			years = 5
		}
		FROM = {
			set_character_flag = child_idolizer_version_1_brag
			hidden_tooltip = {
				character_event = { id = ZE.12114 }
			}
		}
		custom_tooltip = {
			text = EVTOPTIDO_FROM
		}
	}
	option = {
		name = EVTOPTB_ZE_12112	# I'm just doing my duties
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_1_wrote_song
			}
		}
		ai_chance = {
			factor = 50
		}
		prestige = 20
		if = {
			limit = {
				NOT = { trait = humble }
			}
			add_trait = humble
		}
		FROM = {
			hidden_tooltip = {
				set_character_flag = child_idolizer_version_1_humble
				character_event = { id = ZE.12114 }
			}
		}
		custom_tooltip = {
			text = EVTOPTIDO_FROM
		}
	}
	option = {
		name = EVTOPTC_ZE_12112	# Child shows gratitude to everyone
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_1_grateful
			}
		}
		tooltip = {
			any_courtier = {
				opinion = {
					who = FROM
					modifier = opinion_happy
					years = 2
				}
			}
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags
		}
	}

	
	# Version 2
	option = {
		name = EVTOPTD_ZE_12112	# I like being around you too
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_2_adore
			}
		}
		ai_chance = {
			factor = 100
		}
		FROM = {
			set_character_flag = child_idolizer_version_2_agree
			character_event = { id = ZE.12114 }
		}
		custom_tooltip = {
			text = EVTOPTIDO_FROM
		}
	}
	option = {
		name = EVTOPTE_ZE_12112	# I don't feel the same way
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_2_adore
			}
		}
		ai_chance = {
			factor = 0
		}
		change_diplomacy = 1
		FROM = {
			tooltip = {
				prestige = -30
			}
			hidden_tooltip = {
				set_character_flag = child_idolizer_version_2_disagree
				character_event = { id = ZE.12114 }
			}
		}
	}
	option = {
		name = EVTOPTF_ZE_12112	# What a good friend
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_2_friend
			}
		}
		tooltip = {
			add_friend = FROM
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags
		}
	}
}

# Child reacts
character_event = {
	id = ZE.12114
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12114
		picture = GFX_evt_son_asking_father
		trigger = {
			has_character_flag = child_idolizer_version_1_brag
		}
	}
	desc = {
		text = EVTDESCB_ZE_12114
		picture = GFX_evt_son_asking_father
		trigger = {
			has_character_flag = child_idolizer_version_1_humble
		}
	}
	# Version 2
	desc = {
		text = EVTDESCC_ZE_12114
		picture = GFX_evt_child_talking
		trigger = {
			has_character_flag = child_idolizer_version_2_agree
		}
	}
	desc = {
		text = EVTDESCD_ZE_12114
		picture = GFX_evt_child_talking
		trigger = {
			has_character_flag = child_idolizer_version_2_disagree
		}
	}
	# Version 3
	desc = {
		text = EVTDESCE_ZE_12114
		picture = GFX_evt_bishop
		trigger = {
			has_character_flag = child_idolizer_version_3
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12114	
		trigger = {
			has_character_flag = child_idolizer_version_1_brag
		}
		ai_chance = {
			factor = 100
		}
		add_trait = idolizer
		opinion = {
			who = FROM
			modifier = opinion_impressed
			years = 2
		}
		set_character_flag = child_idolizer_version_1_impressed
		FROM = {
			tooltip = {
				prestige = 20
			}
			hidden_tooltip = {
				character_event = { id = ZE.12116 }
			}
		}
	}
	option = {
		name = EVTOPTB_ZE_12114	
		trigger = {
			has_character_flag = child_idolizer_version_1_brag
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_idolizer_version_1_unimpressed
		FROM = {
			tooltip = {
				prestige = -20
			}
			hidden_tooltip = {
				character_event = { id = ZE.12116 }
			}
		}
	}
	option = {
		name = EVTOPTC_ZE_12114	
		trigger = {
			has_character_flag = child_idolizer_version_1_humble
		}
		ai_chance = {
			factor = 100
		}
		add_trait = idolizer
		opinion = {
			who = FROM
			modifier = opinion_impressed
			years = 2
		}
		set_character_flag = child_idolizer_version_1_impressed
		FROM = {
			tooltip = {
				prestige = 20
			}
			hidden_tooltip = {
				character_event = { id = ZE.12116 }
			}
		}
	}
	option = {
		name = EVTOPTD_ZE_12114	
		trigger = {
			has_character_flag = child_idolizer_version_1_humble
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_idolizer_version_1_unimpressed
		FROM = {
			tooltip = {
				prestige = -20
			}
			hidden_tooltip = {
				character_event = { id = ZE.12116 }
			}
		}
	}

	
	# Version 2
	option = {
		name = EVTOPTE_ZE_12114	
		trigger = {
			has_character_flag = child_idolizer_version_2_agree
		}
		ai_chance = {
			factor = 100
		}
		set_character_flag = child_idolizer_version_2_mutual
		add_trait = idolizer
		opinion = {
			who = FROM
			modifier = childhood_sweetheart
			years = 3
		}
		FROM = {
			hidden_tooltip = {
				character_event = { id = ZE.12116 }
			}
		}
	}
	option = {
		name = EVTOPTF_ZE_12114	
		trigger = {
			has_character_flag = child_idolizer_version_2_agree
		}
		ai_chance = {
			factor = 0
		}
		set_character_flag = child_idolizer_version_2_unanswered
		prestige = 30
		FROM = {
			tooltip = {
				prestige = -30
				opinion = {
					who = ROOT
					modifier = love_scorned
					years = 3
				}
			}
			hidden_tooltip = {
				character_event = { id = ZE.12116 }
			}
		}
	}
	option = {
		name = EVTOPTG_ZE_12114	
		trigger = {
			has_character_flag = child_idolizer_version_2_disagree
		}
		prestige = -30
		hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags
	}

	# Version 3
	option = {
		name = EVTOPTH_ZE_12114	
		trigger = {
			has_character_flag = child_idolizer_version_3
		}
		ai_chance = {
			factor = 100
		}
		add_trait = idolizer
		piety = 15
		hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags

	}
	option = {
		name = EVTOPTI_ZE_12114	
		trigger = {
			has_character_flag = child_idolizer_version_3
		}
		ai_chance = {
			factor = 0
		}
		change_martial = 1
		prestige = 20
		hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags
	}
}


# Courtier informed
character_event = {
	id = ZE.12116
	picture = GFX_evt_child_talking

	# Version 1
	desc = {
		text = EVTDESCA_ZE_12116
		picture = GFX_evt_son_asking_father
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_1_impressed
			}
		}
	}
	desc = {
		text = EVTDESCB_ZE_12116
		picture = GFX_evt_son_asking_father
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_1_unimpressed
			}
		}
	}
	desc = {
		text = EVTDESCC_ZE_12116
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_2_mutual
			}
		}
	}
	# Version 2
	desc = {
		text = EVTDESCD_ZE_12116
		picture = GFX_evt_child_talking
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_2_unanswered
			}
		}
	}

	is_triggered_only = yes
	
	only_capable = yes

	trigger = {
		has_dlc = "Zeus"
		NOT = { has_character_modifier = the_oubliette }
		NOT = { has_character_modifier = the_dungeon }
	}

	# Version 1
	option = {
		name = EVTOPTA_ZE_12116	
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_1_impressed
			}
		}
		FROM = {
			tooltip = {
				add_trait = idolizer
				opinion = {
					who = ROOT
					modifier = opinion_impressed
					years = 2
				}
			}
			hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTB_ZE_12116	
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_1_unimpressed
			}
		}
		prestige = -20
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags
		}
	}
	# Version 2
	option = {
		name = EVTOPTC_ZE_12116	
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_2_mutual
			}
		}
		prestige = -50
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_childhood_sweetheart
				years = 2
			}
			prestige = 50
			hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags
		}
	}
	option = {
		name = EVTOPTD_ZE_12116	
		trigger = {
			FROM = {
				has_character_flag = child_idolizer_version_2_unanswered
			}
		}
		prestige = -30
		opinion = {
			who = FROM
			modifier = love_scorned
			years = 3
		}
		FROM = {
			hidden_tooltip = { character_event = { id = ZE.12117 } } #Clear all flags
		}
	}
}

#Catch all flag clearing event
character_event = {
	id = ZE.12117
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		clr_character_flag = child_idolizer_version_1
		clr_character_flag = child_idolizer_version_2
		clr_character_flag = child_idolizer_version_3
		clr_character_flag = child_idolizer_version_1_wrote_song
		clr_character_flag = child_idolizer_version_1_grateful
		clr_character_flag = child_idolizer_version_2_adore
		clr_character_flag = child_idolizer_version_2_friends
		clr_character_flag = child_idolizer_version_1_brag
		clr_character_flag = child_idolizer_version_1_humble
		clr_character_flag = child_idolizer_version_2_agree
		clr_character_flag = child_idolizer_version_2_disagree
		clr_character_flag = child_idolizer_version_1_impressed
		clr_character_flag = child_idolizer_version_1_unimpressed
		clr_character_flag = child_idolizer_version_2_mutual
		clr_character_flag = child_idolizer_version_2_unanswered
	}
}

#############################################
# Clear childhood trait event chain flags	#
#############################################

# Clear childhood trait event chain flags on adolescence
character_event = {
	id = ZE.12998

	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		clr_character_flag = ze_child_haughty_events
		clr_character_flag = ze_child_affectionate_events
		clr_character_flag = ze_child_timid_events
		clr_character_flag = ze_child_rowdy_events
		clr_character_flag = ze_child_willful_events
		clr_character_flag = ze_child_brooding_events
		clr_character_flag = ze_child_indolent_events
		clr_character_flag = ze_child_playful_events
		clr_character_flag = ze_child_conscientious_events
		clr_character_flag = ze_child_fussy_events
		clr_character_flag = ze_child_curious_events
		clr_character_flag = ze_child_idolizer_events
	}
}


#############################################
# Special events for children who are		#
# prisoners (not if only in house arrest)	#
#############################################


# trait outcomes: timid, brooding, indolent

# Randomly select event
character_event = {
	id = ZE.12200

	hide_window = yes
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	
	immediate = {
		random_list = {
			10 = {
				character_event = { id = ZE.12210 days = 10 random = 30 }
				modifier = {
					factor = 0
					has_character_modifier = pet_rat_dungeon
				}
			}
			10 = {
				character_event = { id = ZE.12220 days = 10 random = 30 }
			}
			10 = {
				character_event = { id = ZE.12230 days = 10 random = 30 }
				modifier = {
					factor = 0
					NAND = {
						age = 6
						OR = {
							has_character_modifier = the_oubliette
							has_character_modifier = the_dungeon
						}
						host = {
							any_courtier = {
								NOT = { character = ROOT }
								NOT = { trait = incapable }
								prisoner = yes
								NOT = { is_friend = ROOT }
							}
						}
					}
				}
			}
			40 = { # Nothing happens
			}
		}
	}
}


### Befriends rat
character_event = {
	id = ZE.12210
	desc = EVTDESC_ZE_12210
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	
	option = {
		name = EVTOPTA_ZE_12210 # Name it Flipper
		set_character_flag = rat_name_1
		add_character_modifier = {
			name = pet_rat_dungeon
			duration = -1
		}
		hidden_tooltip = { character_event = { id = ZE.12211 days = 100 } }
	}
	option = {
		name = EVTOPTB_ZE_12210 # Name it Cuddles
		set_character_flag = rat_name_2
		add_character_modifier = {
			name = pet_rat_dungeon
			duration = -1
		}
		hidden_tooltip = { character_event = { id = ZE.12211 days = 100 } }
	}
	option = {
		name = EVTOPTC_ZE_12210 # Name it Smelly
		set_character_flag = rat_name_3
		add_character_modifier = {
			name = pet_rat_dungeon
			duration = -1
		}
		hidden_tooltip = {
			random = {
				chance = 50
				character_event = { id = ZE.12211 days = 100 } # Rat gets sick
			}
		}
	}
	option = {
		name = EVTOPTD_ZE_12210 # Eat it
		if = {
			limit = {
				NOT = { trait = indolent }
			}
			add_trait = indolent
		}
		if = {
			limit = {
				NOT = { is_ill = yes }
				NOT = { trait = pneumonic }
			}
			random = {
				chance = 20
				if = {
					limit = {
						NOT = {
							has_dlc = "Reapers"
						}
					}
					add_trait = ill
				}
				if = {
					limit = {
						has_dlc = "Reapers"
					}
					add_symptom_effect = yes
				}
			}
		}
	}
}

# Rat is sick - help her?
character_event = {
	id = ZE.12211
	picture = GFX_evt_into_the_dungeon

	desc = {
		text = EVTDESCA_ZE_12211 # Flipper
		trigger = {
			has_character_flag = rat_name_1
		}
	}
	desc = {
		text = EVTDESCB_ZE_12211 # Cuddles
		trigger = {
			has_character_flag = rat_name_2
		}
	}
	desc = {
		text = EVTDESCC_ZE_12211 # Smelly
		trigger = {
			has_character_flag = rat_name_3
		}
	}
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		has_character_modifier = pet_rat_dungeon
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	
	immediate = {
		if = {
			limit = { NOT = { trait = indolent } }
			set_character_flag = ZE_12211_add_indolent
			break = yes
		}
		if = {
			limit = { NOT = { trait = brooding } }
			set_character_flag = ZE_12211_add_brooding
		}
	}
	
	option = {
		name = EVTOPTA_ZE_12211 # Give it some of my food
		if = {
			limit = { NOT = { trait = affectionate } }
			add_trait = affectionate
		}
		if = {
			limit = {
				NOT = { trait = infirm }
				trait = pneumonic
			}
			random = {
				chance = 30
				add_trait = infirm
				hidden_tooltip = {
					character_event = {
						id = 38284 #Notify Infirm
					}
				}
			}
		}
		if = {
			limit = {
				is_ill = yes
			}
			random = {
				chance = 30
				if = {
					limit = {
						NOT = {
							has_dlc = "Reapers"
						}
					}
					add_trait = pneumonic
				}
				if = {
					limit = {
						has_dlc = "Reapers"
					}
					add_trait = infection
					hidden_tooltip = {
						character_event = { id = RIP.11001 days = 365 random = 1095 }
					}
				}
			}
		}
		if = {
			limit = {
				NOT = { is_ill = yes }
				NOT = { trait = pneumonic }
			}
			random = {
				chance = 30
				if = {
					limit = {
						NOT = {
							has_dlc = "Reapers"
						}
					}
					add_trait = ill
				}
				if = {
					limit = {
						has_dlc = "Reapers"
					}
					add_symptom_effect = yes
				}
			}
		}
	}
	option = {
		name = EVTOPTB_ZE_12211 # No I need my food
		if = {
			limit = { has_character_flag = ZE_12211_add_brooding }
			clr_character_flag = ZE_12211_add_brooding
			add_trait = brooding
		}
		if = {
			limit = { has_character_flag = ZE_12211_add_indolent }
			clr_character_flag = ZE_12211_add_indolent
			add_trait = indolent
		}
		if = {
			limit = { has_character_flag = rat_name_1 }
			random = {
				chance = 30
				custom_tooltip = { text = rat_dies_tooltip_1 }
				hidden_tooltip = { remove_character_modifier = pet_rat_dungeon }
			}
		}
		if = {
			limit = { has_character_flag = rat_name_2 }
			random = {
				chance = 30
				custom_tooltip = { text = rat_dies_tooltip_2 }
				hidden_tooltip = { remove_character_modifier = pet_rat_dungeon }
			}
		}
		if = {
			limit = { has_character_flag = rat_name_3 }
			random = {
				chance = 30
				custom_tooltip = { text = rat_dies_tooltip_3 }
				hidden_tooltip = { remove_character_modifier = pet_rat_dungeon }
			}
		}
	}
}

# Released from dungeon and must leave rat behind
character_event = {
	id = ZE.12219
	picture = GFX_evt_into_the_dungeon

	desc = {
		text = EVTDESCA_ZE_12219 # 
		trigger = {
			has_character_flag = rat_name_1
		}
	}
	desc = {
		text = EVTDESCB_ZE_12219 # 
		trigger = {
			has_character_flag = rat_name_2
		}
	}
	desc = {
		text = EVTDESCC_ZE_12219 # 
		trigger = {
			has_character_flag = rat_name_3
		}
	}
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		has_character_modifier = pet_rat_dungeon
	}

	option = {
		name = {
			text = EVTOPTA_ZE_12219 # I will never forget you, rat!
			trigger = {
				has_character_flag = rat_name_1
			}
		}
		name = {
			text = EVTOPTB_ZE_12219 # I will never forget you, rat!
			trigger = {
				has_character_flag = rat_name_2
			}
		}
		name = {
			text = EVTOPTC_ZE_12219 # I will never forget you, rat!
			trigger = {
				has_character_flag = rat_name_3
			}
		}
		remove_character_modifier = pet_rat_dungeon
		if = {
			limit = {
				NOT = { trait = brooding }
				NOT = { age = 12 }
			}
			add_trait = brooding
		}
	}
}


### Creating imaginary world, going a little strange
character_event = {
	id = ZE.12220
	desc = EVTDESC_ZE_12220
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	
	option = {
		name = EVTOPTA_ZE_12220 # Serve Dread King of Darkness
		hidden_tooltip = { character_event = { id = ZE.12221 days = 30 random = 50 } }
		custom_tooltip = { text = 12220_submit_to_king }
	}
	option = {
		name = EVTOPTB_ZE_12220 # Fight Dread King of Darkness
		hidden_tooltip = { character_event = { id = ZE.12225 days = 30 random = 50 } }
		custom_tooltip = { text = 12220_fight_king }
	}
}

# Serve - Dread King of Darkness gives you quest
character_event = {
	id = ZE.12221
	desc = EVTDESC_ZE_12221
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	option = {
		name = EVTOPTA_ZE_12221 # Use force
		hidden_tooltip = {
			random_list = {
				10 = {
					modifier = {
						factor = 3
						martial = 4
					}
					modifier = {
						factor = 0.3
						NOT = { martial = 1 }
					}
					character_event = { id = ZE.12222 days = 50 random = 50 }
				}
				10 = {
					character_event = { id = ZE.12223 days = 50 random = 50 }
				}
			}
		}
		custom_tooltip = { text = dread_king_martial_tooltip }
	}
	option = {
		name = EVTOPTB_ZE_12221 # Use cunning
		hidden_tooltip = {
			random_list = {
				10 = {
					modifier = {
						factor = 3
						intrigue = 4
					}
					modifier = {
						factor = 0.3
						NOT = { intrigue = 1 }
					}
					character_event = { id = ZE.12222 days = 50 random = 50 }
				}
				10 = {
					character_event = { id = ZE.12223 days = 50 random = 50 }
				}
			}
		}
		custom_tooltip = { text = dread_king_intrigue_tooltip }
	}
}

# Serve - Dread King of Darkness quest success
character_event = {
	id = ZE.12222
	desc = EVTDESC_ZE_12222
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	option = {
		name = EVTOPTA_ZE_12222 # 
		if = {
			limit = {
				NOT = { trait = timid }
			}
			add_trait = timid
		}
		add_character_modifier = {
			name = found_dark_stones
			years = 2
		}
	}
}

# Serve - Dread King of Darkness quest failure, punishment
character_event = {
	id = ZE.12223
	desc = EVTDESC_ZE_12223
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	option = {
		name = EVTOPTA_ZE_12223 # 
		if = {
			limit = {
				NOT = { trait = brooding }
			}
			add_trait = brooding
		}
	}
}

# Fighting the Dread King of Darkness
character_event = {
	id = ZE.12225
	desc = EVTDESC_ZE_12225
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	option = {
		name = EVTOPTA_ZE_12225 # Use force
		hidden_tooltip = {
			random_list = {
				10 = {
					modifier = {
						factor = 3
						martial = 4
					}
					modifier = {
						factor = 0.3
						NOT = { martial = 1 }
					}
					character_event = { id = ZE.12226 days = 50 random = 50 }
				}
				10 = {
					character_event = { id = ZE.12227 days = 50 random = 50 }
				}
			}
		}
		custom_tooltip = { text = dread_king_martial_tooltip }
	}
	option = {
		name = EVTOPTB_ZE_12225 # Use cunning
		hidden_tooltip = {
			random_list = {
				10 = {
					modifier = {
						factor = 3
						intrigue = 4
					}
					modifier = {
						factor = 0.3
						NOT = { intrigue = 1 }
					}
					character_event = { id = ZE.12226 days = 50 random = 50 }
				}
				10 = {
					character_event = { id = ZE.12227 days = 50 random = 50 }
				}
			}
		}
		custom_tooltip = { text = dread_king_intrigue_tooltip }
	}
}

# Victory against the Dread King of Darkness
character_event = {
	id = ZE.12226
	desc = EVTDESC_ZE_12226
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	option = {
		name = EVTOPTA_ZE_12226 # 
		if = {
			limit = {
				NOT = { trait = willful }
			}
			add_trait = willful
		}
		add_character_modifier = {
			name = defeated_dread_king
			years = 2
		}
	}
}

# Fighting the Dread King of Darkness - defeat
character_event = {
	id = ZE.12227
	desc = EVTDESC_ZE_12227
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	option = {
		name = EVTOPTA_ZE_12227 # 
		if = {
			limit = {
				NOT = { trait = indolent }
			}
			add_trait = indolent
		}
	}
}


### Befriends other prisoner
character_event = {
	id = ZE.12230
	desc = EVTDESC_ZE_12230
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		age = 6
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
		host = {
			any_courtier = {
				NOT = { character = ROOT }
				NOT = { trait = incapable }
				prisoner = yes
				NOT = { is_friend = ROOT }
			}
		}
	}
	
	immediate = {
		host = {
			random_courtier = {
				limit = {
					NOT = { character = ROOT }
					NOT = { trait = incapable }
					prisoner = yes
					NOT = { is_friend = ROOT }
				}
				save_event_target_as = event_ze_12230_prisoner
			}
		}
		if = {
			limit = { NOT = { trait = timid } }
			set_character_flag = ZE_12230_add_timid
			break = yes
		}
		if = {
			limit = { NOT = { trait = indolent } }
			set_character_flag = ZE_12230_add_indolent
			break = yes
		}
		if = {
			limit = { NOT = { trait = brooding } }
			set_character_flag = ZE_12230_add_brooding
		}
	}
	
	option = {
		name = EVTOPTA_ZE_12230 # Talk to them
		hidden_tooltip = {
			event_target:event_ze_12230_prisoner = {
				character_event = { id = ZE.12232 }
			}
		}
	}
	option = {
		name = EVTOPTB_ZE_12230 # Ignore them
		if = {
			limit = { has_character_flag = ZE_12230_add_timid }
			clr_character_flag = ZE_12230_add_timid
			add_trait = timid
		}
		if = {
			limit = { has_character_flag = ZE_12230_add_indolent }
			clr_character_flag = ZE_12230_add_indolent
			add_trait = indolent
			break = yes
		}
		if = {
			limit = { has_character_flag = ZE_12230_add_brooding }
			clr_character_flag = ZE_12230_add_brooding
			add_trait = brooding
		}
	}
}

# Other prisoner response
character_event = {
	id = ZE.12232
	picture = GFX_evt_into_the_dungeon
	
	desc = {
		text = EVTDESCA_ZE_12232 # Adult
		trigger = {
			age = 13
		}
	}
	desc = {
		text = EVTDESCB_ZE_12232 # Child
		trigger = {
			NOT = { age = 13 }
		}
	}
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	option = {
		name = EVTOPTA_ZE_12232 # Answer
		add_friend = FROM
		hidden_tooltip = { FROM = {	character_event = { id = ZE.12234 } } }
	}
	option = {
		name = EVTOPTB_ZE_12232 # Ignore
		reverse_opinion = {
			modifier = opinion_disappointed
			who = FROM
			years = 3
		}
		if = {
			limit = { NOT = { trait = paranoid } }
			add_trait = paranoid
			break = yes
		}
		if = {
			limit = {
				trait = paranoid
				NOT = { trait = shy }
			}
			add_trait = shy
		}
		hidden_tooltip = { FROM = {	character_event = { id = ZE.12236 } } }
	}
}

# Gets good response
character_event = {
	id = ZE.12234
	desc = EVTDESC_ZE_12234
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	option = {
		name = EVTOPTA_ZE_12234 # Great
		add_friend = FROM
	}
}

# Gets bad response
character_event = {
	id = ZE.12236
	desc = EVTDESC_ZE_12236
	picture = GFX_evt_into_the_dungeon
	
	is_triggered_only = yes
	
	only_capable = yes
	prisoner = yes
	
	trigger = {
		has_dlc = "Zeus"
		OR = {
			has_character_modifier = the_oubliette
			has_character_modifier = the_dungeon
		}
	}
	
	immediate = {
		if = {
			limit = { NOT = { trait = brooding } }
			set_character_flag = ZE_12236_add_brooding
			break = yes
		}
		if = {
			limit = { NOT = { trait = timid } }
			set_character_flag = ZE_12236_add_timid
			break = yes
		}
		if = {
			limit = { NOT = { trait = indolent } }
			set_character_flag = ZE_12236_add_indolent
		}
	}
	
	option = {
		name = EVTOPTA_ZE_12236 # Sad
		if = {
			limit = { has_character_flag = ZE_12236_add_brooding }
			clr_character_flag = ZE_12236_add_brooding
			add_trait = brooding
		}
		if = {
			limit = { has_character_flag = ZE_12236_add_timid }
			clr_character_flag = ZE_12236_add_timid
			add_trait = timid
		}
		if = {
			limit = { has_character_flag = ZE_12236_add_indolent }
			clr_character_flag = ZE_12236_add_indolent
			add_trait = indolent
		}
	}
}

#############################################
#                                         	#
# Culture/religion shift events				#
# ID ZE.2100-ZE.2199                    	#
#                                         	#
#############################################


character_event = {
	id = ZE.2103
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		if = { 
			limit = {
				OR = {
					NOT = { FROM = { educator = { character = ROOT } } }
					religion = FROM
				}
			}
			break = yes
		}
		save_event_target_as = target_educator
		FROM = { save_event_target_as = target_child }
		character_event = { id = ZE.2100 }
	}
}

# Faith focus - Child adopts Educators religion
character_event = {
	id = ZE.2100
	desc = EVTDESC_ZE_2100
	picture = GFX_evt_guardian
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	#trigger = {
	#	NOT = { religion = FROM }
	#}
	
	option = {
		name = EVTOPTA_ZE_2100
		ai_chance = { factor = 100 }
		tooltip = {
			reverse_religion = event_target:target_child
		}
		event_target:target_child = { character_event = { id = ZE.2101} }
	}
	
	option = {
		name = EVTOPTB_ZE_2100
		ai_chance = { factor = 0 }
	}
}

character_event = {
	id = ZE.2101
	desc = EVTDESC_ZE_2101
	picture = GFX_evt_guardian
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	trigger = { 
		NOT = { religion = event_target:target_educator }
	}
	
	option = {
		name = EVTOPTA_ZE_2101
		ai_chance = { factor = 100 }
		religion = event_target:target_educator
		hidden_tooltip = {
			if = {
				limit = {
					liege = {
						NOR = {
							character = event_target:target_educator
							character = ROOT
						}
					}
				}
				liege = { character_event = { id = ZE.2102 } }
			}
		}
	}
	
	option = {
		name = EVTOPTB_ZE_2101
		ai_chance = { factor = 0 }
		prestige = -5
	}
}

character_event = {
	id = ZE.2102
	desc = EVTDESC_ZE_2102
	picture = GFX_evt_library
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ZE_2102
		tooltip = {
			FROM = {
				religion = ROOT_FROMFROM
			}
		}
	}
}

character_event = {
	id = ZE.2113
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		if = { 
			limit = {
				OR = {
					NOT = { FROM = { educator = { character = ROOT } } }
					religion = FROM
				}
			}
			break = yes
		}
		save_event_target_as = target_educator
		FROM = { save_event_target_as = target_child }
		character_event = { id = ZE.2110 }
	}
}

# Heritage focus - Child adopts Educators religion
character_event = {
	id = ZE.2110
	desc = EVTDESC_ZE_2100
	picture = GFX_evt_guardian
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ZE_2100
		ai_chance = { factor = 100 }
		tooltip = {
			reverse_religion = event_target:target_child
		}
		event_target:target_child = { character_event = { id = ZE.2111 } } 
	}
	
	option = {
		name = EVTOPTB_ZE_2100
		ai_chance = { factor = 0 }
	}
}

character_event = {
	id = ZE.2111
	desc = EVTDESC_ZE_2101
	picture = GFX_evt_guardian
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	trigger = { 
		NOT = { religion = event_target:target_educator }
	}
	
	option = {
		name = EVTOPTA_ZE_2101
		ai_chance = { factor = 100 }
		religion = event_target:target_educator
		hidden_tooltip = {
			if = {
				limit = {
					liege = {
						NOR = {
							character = event_target:target_educator
							character = ROOT
						}
					}
				}
				liege = { character_event = { id = ZE.2112 } }
			}
		}
	}
	
	option = {
		name = EVTOPTB_ZE_2101
		ai_chance = { factor = 0 }
		prestige = -5
	}
}

character_event = {
	id = ZE.2112
	desc = EVTDESC_ZE_2102
	picture = GFX_evt_library
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ZE_2102
		tooltip = {
			FROM = {
				religion = ROOT_FROMFROM
			}
		}
	}
}

character_event = {
	id = ZE.2123
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		if = { 
			limit = {
				OR = {
					NOT = { FROM = { educator = { character = ROOT } } }
					culture = FROM
				}
			}
			break = yes
		}
		save_event_target_as = target_educator
		FROM = { save_event_target_as = target_child }
		character_event = { id = ZE.2120 }
	}
}

# Heritage focus - Child adopts Educators Culture
character_event = {
	id = ZE.2120
	desc = EVTDESC_ZE_2120
	picture = GFX_evt_guardian
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ZE_2120
		ai_chance = { factor = 100 }
		tooltip = {
			reverse_culture = event_target:target_child
		}
		event_target:target_child = { character_event = { id = ZE.2121 } }
	}
	
	option = {
		name = EVTOPTB_ZE_2120
		ai_chance = { factor = 0 }
	}
}

character_event = {
	id = ZE.2121
	desc = EVTDESC_ZE_2121
	picture = GFX_evt_guardian
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes
	
	trigger = { 
		NOT = { culture = event_target:target_educator }
	}
	
	option = {
		name = EVTOPTA_ZE_2121
		ai_chance = { factor = 100 }
		culture = event_target:target_educator
		hidden_tooltip = {
			if = {
				limit = {
					liege = {
						NOR = {
							character = event_target:target_educator
							character = ROOT
						}
					}
				}
				liege = { character_event = { id = ZE.2122 } }
			}
		}
	}
	
	option = {
		name = EVTOPTB_ZE_2121
		ai_chance = { factor = 0 }
		prestige = -5
	}
}

character_event = {
	id = ZE.2122
	desc = EVTDESC_ZE_2122
	picture = GFX_evt_noble_in_castle
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA_ZE_2122
		tooltip = {
			FROM = {
				culture = ROOT_FROMFROM
			}
		}
	}
}

# Fired from targeted decision to ask allowance to swap wards culture/religion
letter_event = {
	id = ZE.2130
	desc = EVTDESC_ZE_2130
	border = GFX_event_letter_frame_diplomacy
	
	is_triggered_only = yes
	
	show_from_from = yes
	
	immediate = {
		save_event_target_as = target_liege
		FROM = { save_event_target_as = target_ward }
		FROMFROM = { save_event_target_as = target_guardian }
	}
	
	option = {
		name = EVTOPTA_ZE_2130
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.1
				event_target:target_ward = {
					culture = ROOT
					religion = ROOT
					any_heir_title = { holder = ROOT }
				}
			}
			modifier = {
				factor = 0.5
				event_target:target_ward = {
					culture = ROOT
					religion = ROOT
					NOT = { any_heir_title = { holder = ROOT } }
					is_child_of = ROOT
				}
			}
			modifier = {
				factor = 0.1
				event_target:target_ward = {
					educator = {
						OR = {
							is_heresy_of = ROOT
							is_parent_religion = ROOT
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				event_target:target_ward = {
					educator = {
						NOT = { religion_group = ROOT }
					}
				}
			}
			modifier = {
				factor = 0.5
				event_target:target_ward = {
					educator = {
						NOT = { culture_group = ROOT }
					}
				}
			}
			modifier = {
				factor = 1.25
				opinion = { who = FROMFROM value = 25 }
			}
			modifier = {
				factor = 1.25
				opinion = { who = FROMFROM value = 50 }
			}
			modifier = {
				factor = 1.5
				opinion = { who = FROMFROM value = 75 }
			}
			modifier = {
				factor = 1.5
				opinion = { who = FROMFROM value = 90 }
			}
			modifier = {
				factor = 0
				NOT = { opinion = { who = FROMFROM value = -50 } }
			}
		}
		if = {
			limit = { FROMFROM = { holds_favor_on = ROOT } }
			reverse_remove_favor = FROMFROM
		}
		tooltip = {
			event_target:target_ward = {
				set_focus = focus_ch_heritage
			}
		}
		hidden_tooltip = {
			event_target:target_guardian = {
				letter_event = { id = ZE.2131 }
			}
		}
	}
	
	option = {
		name = EVTOPTB_ZE_2130
		trigger = {
			NOT = { FROMFROM = { holds_favor_on = ROOT } }
		}
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				NOT = { opinion = { who = FROMFROM value = 0 } }
			}
			modifier = {
				factor = 1.5
				NOT = { opinion = { who = FROMFROM value = -25 } }
			}
			modifier = {
				factor = 0.5
				event_target:target_ward = {
					NOR = {
						is_child_of = ROOT
						dynasty = ROOT
					}
				}
			}
			modifier = {
				factor = 10
				FROM = {
					educator = {
						culture = ROOT
						religion = ROOT
					}
				}
			}
		}
		if = {
			limit = {
				opinion = {
					who = event_target:target_guardian
					value = 25
				}
			}
			tooltip = {
				reverse_opinion = {
					who = event_target:target_guardian
					modifier = opinion_insulted
					years = 2
				}
			}
		}
		hidden_tooltip = {
			event_target:target_guardian = {
				letter_event = { id = ZE.2132 }
			}
		}
	}
}

letter_event = {
	id = ZE.2131
	desc = EVTDESC_ZE_2131
	border = GFX_event_letter_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ZE_2131
		event_target:target_ward = {
			hidden_tooltip = {
				clear_focus = yes
			}
			set_focus = focus_ch_heritage
		}
	}
}

letter_event = {
	id = ZE.2132
	desc = {
		text = EVTDESCA_ZE_2132
		trigger = {
			has_character_flag = ZE_2132_DIPLOMATIC_RESPONSE
		}
	}
	desc = {
		text = EVTDESCB_ZE_2132
		trigger = {
			has_character_flag = ZE_2132_OFFENDED_RESPONSE
		}
	}
	border = GFX_event_letter_frame_diplomacy
	
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				reverse_opinion = {
					who = event_target:target_liege
					value = 25
				}
			}
			set_character_flag = ZE_2132_DIPLOMATIC_RESPONSE
			break = yes
		}
		set_character_flag = ZE_2132_OFFENDED_RESPONSE
	}
	
	option = {
		name = EVTOPTA_ZE_2132
		trigger = {
			has_character_flag = ZE_2132_DIPLOMATIC_RESPONSE
		}
		clr_character_flag = ZE_2132_DIPLOMATIC_RESPONSE
		clr_character_flag = ZE_2132_OFFENDED_RESPONSE
	}
	
	option = {
		name = EVTOPTB_ZE_2132
		trigger = {
			has_character_flag = ZE_2132_OFFENDED_RESPONSE
		}
		opinion = {
			who = event_target:target_liege
			modifier = opinion_insulted
			years = 2
		}
		clr_character_flag = ZE_2132_DIPLOMATIC_RESPONSE
		clr_character_flag = ZE_2132_OFFENDED_RESPONSE
	}
}

# Fired from targeted decision to ask allowance to change ward's focus to faith
letter_event = {
	id = ZE.2140
	desc = EVTDESC_ZE_2140
	border = GFX_event_letter_frame_diplomacy
	
	is_triggered_only = yes
	
	show_from_from = yes
	
	immediate = {
		save_event_target_as = target_liege
		FROM = { save_event_target_as = target_ward }
		FROMFROM = { save_event_target_as = target_guardian }
	}
	
	option = {
		name = EVTOPTA_ZE_2130
		ai_chance = {
			factor = 100	# AI always accepts
		}
		
		tooltip = {
			event_target:target_ward = {
				set_focus = focus_ch_faith
			}
		}
		hidden_tooltip = {
			event_target:target_guardian = {
				letter_event = { id = ZE.2141 }
			}
		}
	}
	
	option = {
		name = EVTOPTB_ZE_2130
		ai_chance = {
			factor = 0
		}
		if = {
			limit = {
				opinion = {
					who = event_target:target_guardian
					value = 25
				}
			}
			tooltip = {
				reverse_opinion = {
					who = event_target:target_guardian
					modifier = opinion_insulted
					years = 2
				}
			}
		}
		hidden_tooltip = {
			event_target:target_guardian = {
				letter_event = { id = ZE.2142 }
			}
		}
	}
}

letter_event = {
	id = ZE.2141
	desc = EVTDESC_ZE_2141
	border = GFX_event_letter_frame_diplomacy
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ZE_2131
		event_target:target_ward = {
			hidden_tooltip = {
				clear_focus = yes
			}
			set_focus = focus_ch_faith
		}
	}
}

letter_event = {
	id = ZE.2142
	desc = {
		text = EVTDESCA_ZE_2132
		trigger = {
			has_character_flag = ZE_2142_DIPLOMATIC_RESPONSE
		}
	}
	desc = {
		text = EVTDESCB_ZE_2142
		trigger = {
			has_character_flag = ZE_2142_OFFENDED_RESPONSE
		}
	}
	border = GFX_event_letter_frame_diplomacy
	
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				reverse_opinion = {
					who = event_target:target_liege
					value = 25
				}
			}
			set_character_flag = ZE_2142_DIPLOMATIC_RESPONSE
			break = yes
		}
		set_character_flag = ZE_2142_OFFENDED_RESPONSE
	}
	
	option = {
		name = EVTOPTA_ZE_2132
		trigger = {
			has_character_flag = ZE_2142_DIPLOMATIC_RESPONSE
		}
		clr_character_flag = ZE_2142_DIPLOMATIC_RESPONSE
		clr_character_flag = ZE_2142_OFFENDED_RESPONSE
	}
	
	option = {
		name = EVTOPTB_ZE_2132
		trigger = {
			has_character_flag = ZE_2142_OFFENDED_RESPONSE
		}
		opinion = {
			who = event_target:target_liege
			modifier = opinion_insulted
			years = 2
		}
		clr_character_flag = ZE_2142_DIPLOMATIC_RESPONSE
		clr_character_flag = ZE_2142_OFFENDED_RESPONSE
	}
}