﻿#Events for children developing personality traits

namespace = child_personality

#0000-0999: Child events
#1000-1999: Guardian events
	#Key:
	#1012 = response to event option 0001.b (the "second" option of event 0001)
	#1111 = response to event option 0011.a (the "first" option of event 0011)
#2000-2999: Other events fired by child events
#3000-3999: Childhood personality assignment
#4000-4999: Sexuality assignment
#9900-9910: Reincarnation events

#By Petter Vilberg, Linnéa Thimrén, and Bianca Savazzi

#####
# CHILD EVENTS
# 0000-0999
#####

#Craven, Lazy or Arbitrary
#Child is trying to deal with a bully
child_personality.0001 = {
	type = character_event
	title = child_personality.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:bully }
				desc = {
					desc = child_personality.0001.opening
					random_valid = {
						desc = child_personality.0001.bullying_1
						desc = child_personality.0001.bullying_2
						desc = child_personality.0001.bullying_3
					}
					desc = child_personality.0001.end
				}
			}
			desc = child_personality.0001.no_bully_fallback
		}
	}
	theme = education
	override_icon = {
		reference = "gfx/interface/icons/event_types/type_relation_unfriendly.dds"
	}
	override_background = { reference = corridor_day }
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:bully
		animation = schadenfreude
	}

	trigger = {
		is_available_child_allow_travel = yes
		OR = {
			any_relation = { type = bully count >= 1 }
			any_vassal = {
				save_good_bully_character_trigger_check = yes
				is_ai = yes
			}
			any_vassal = {
				any_child = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
			}
			any_courtier_or_guest = {
				save_good_bully_character_trigger_check = yes
				is_ai = yes
			}
			AND = {
				is_independent_ruler = no
				exists = liege
				liege = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
			}
			AND = {
				is_independent_ruler = no
				exists = liege
				liege = {
					any_vassal = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
			}
			AND = {
				is_independent_ruler = no
				exists = liege
				liege = {
					any_vassal = {
						any_child = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
			}
			AND = {
				is_independent_ruler = no
				exists = liege
				liege = {
					any_courtier_or_guest = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
			}
			AND = {
				exists = host
				host = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
			}
			AND = {
				exists = host
				host = {
					any_vassal = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
			}
			AND = {
				exists = host
				host = {
					any_vassal = {
						any_child = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
			}
			AND = {
				exists = host
				host = {
					any_courtier_or_guest = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
			}
		}
		NAND = {
			OR = {
				has_trait = craven
				has_trait = brave
			}
			OR = {
				has_trait = lazy
				has_trait = diligent
			}
			OR = {
				has_trait = arbitrary
				has_trait = just
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = craven }
		child_personality_main_event_weight_modifier = { TRAIT = lazy }
		child_personality_main_event_weight_modifier = { TRAIT = arbitrary }
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = { type = bully count >= 1 }
			}
			random_relation = {
				type = bully
				save_scope_as = bully
			}
		}
		else = {
			every_vassal = {
				limit = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
				add_to_list = bullies
			}
			every_vassal = {
				every_child = {
					limit = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
					add_to_list = bullies
				}
			}
			every_courtier_or_guest = {
				limit = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
				add_to_list = bullies
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
				liege = {
					add_to_list = bullies
				}
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						any_vassal = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
				liege = {
					every_vassal = {
						limit = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
						add_to_list = bullies
					}
				}
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						any_vassal = {
							any_child = {
								save_good_bully_character_trigger_check = yes
								is_ai = yes
							}
						}
					}
				}
				liege = {
					every_vassal = {
						every_child = {
							limit = {
								save_good_bully_character_trigger_check = yes
								is_ai = yes
							}
							add_to_list = bullies
						}
					}
				}
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						any_courtier_or_guest = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
				liege = {
					every_courtier_or_guest = {
						limit = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
						add_to_list = bullies
					}
				}
			}
			if = {
				limit = {
					exists = host
					host = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
				host = {
					add_to_list = bullies
				}
			}
			if = {
				limit = {
					exists = host
					host = {
						any_vassal = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
				host = {
					every_vassal = {
						limit = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
						add_to_list = bullies
					}
				}
			}
			if = {
				limit = {
					exists = host
					host = {
						any_vassal = {
							any_child = {
								save_good_bully_character_trigger_check = yes
								is_ai = yes
							}
						}
					}
				}
				host = {
					every_vassal = {
						every_child = {
							limit = {
								save_good_bully_character_trigger_check = yes
								is_ai = yes
							}
							add_to_list = bullies
						}
					}
				}
			}
			if = {
				limit = {
					exists = host
					host = {
						any_courtier_or_guest = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
				host = {
					every_courtier_or_guest = {
						limit = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
						add_to_list = bullies
					}
				}
			}
			
			random_in_list = {
				list = bullies
				weight = {
					base = 1
					modifier = {
						add = 10
						is_of_major_interest_to_root_trigger = yes
					}
					modifier = {
						add = 5
						is_of_minor_interest_to_root_trigger = yes
					}
					modifier = {
						add = 5
						number_of_opposing_personality_traits = {
							target = root
							value >= 1
						}
					}
					modifier = {
						add = 5
						number_of_opposing_personality_traits = {
							target = root
							value >= 2
						}
					}
					modifier = {
						add = 5
						number_of_opposing_personality_traits = {
							target = root
							value >= 3
						}
					}
					modifier = {
						add = 5
						has_trait = wrathful
					}
					modifier = {
						add = 10
						has_trait = sadistic
					}
				}
				save_scope_as = bully
			}
		}

		#Prepare them to become a bully. Here in case this should be randomised
		if = {
			limit = {
				exists = scope:bully
				NOT = { has_relation_bully = scope:bully }
			}
			add_character_flag = gain_bully_flag
		}
	}

	option = {
		name = child_personality.0001.a
		trigger = {
			NOR = {
				has_trait = craven
				has_trait = brave
			}
		}
		add_trait = craven
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1011
			}
		}
		if = {
			limit = {
				exists = scope:bully
				has_character_flag = gain_bully_flag
			}
			show_as_tooltip = { set_relation_bully = scope:bully }
		}
		if = {
			limit = {
				exists = scope:bully
			}
			scope:bully = { trigger_event = child_personality.2001 }
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = craven }
		}
	}

	option = {
		name = child_personality.0001.b
		trigger = {
			NOR = {
				has_trait = lazy
				has_trait = diligent
			}
		}
		add_trait = lazy
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1012
			}
		}
		if = {
			limit = {
				exists = scope:bully
				has_character_flag = gain_bully_flag
			}
			show_as_tooltip = { set_relation_bully = scope:bully }
		}
		if = {
			limit = {
				exists = scope:bully
			}
			scope:bully = { trigger_event = child_personality.2002 }
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = lazy }
		}
	}

	#Take outsized revenge, become arbitrary
	option = {
		name = child_personality.0001.c
		trigger = {
			exists = scope:bully
			NOR = {
				has_trait = arbitrary
				has_trait = just
			}
		}
		add_trait = arbitrary
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1013
			}
		}
		if = {
			limit = {
				has_character_flag = gain_bully_flag
			}
			show_as_tooltip = { set_relation_bully = scope:bully }
		}
		scope:bully = { trigger_event = child_personality.2003 }
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = arbitrary }
		}
	}

	after = {
		remove_character_flag = gain_bully_flag
	}
}


#arrogant, compassionate or callous
child_personality.0002 = {
	type = character_event
	title = child_personality.0002.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:guardian
				}
				desc = child_personality.0002.guardian
			}
			desc = child_personality.0002.no_guardian
		}
	}
	theme = education
	override_background = {
		reference = gallows
	}
	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:guardian
		animation = personality_callous
	}

	trigger = {
		is_available_child_allow_travel = yes
		NAND = {
			OR = {
				has_trait = arrogant
				has_trait = humble
			}
			OR = {
				has_trait = compassionate
				has_trait = callous
				has_trait = sadistic
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = arrogant }
		child_personality_main_event_weight_modifier = { TRAIT = compassionate }
		child_personality_main_event_weight_modifier = { TRAIT = callous }
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = {
					type = guardian
					is_available = yes
				}		
			}
			random_relation = {
				type = guardian
				save_scope_as = guardian
			}
		}
	}

	option = {
		name = child_personality.0002.a
		trigger = {
			NOR = {
				has_trait = arrogant
				has_trait = humble
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = arrogant }
		}
		add_trait = arrogant
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1021
			}
		}	
	}

	option = {
		name = child_personality.0002.b
		trigger = {
			NOR = {
				has_trait = callous
				has_trait = compassionate
				has_trait = sadistic	
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = compassionate }
		}
		add_trait = compassionate
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1022
			}
		}
	}

	option = {
		name = child_personality.0002.c
		trigger = {
			NOR = {
				has_trait = callous
				has_trait = compassionate
				has_trait = sadistic
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = callous }
		}
		add_trait = callous
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1023
			}
		}	
	}
}


#deceitful, honest or humble
child_personality.0003 = {
	type = character_event
	title = child_personality.0003.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:guardian
				}
				desc = child_personality.0003.guardian
			}
			desc = child_personality.0003.no_guardian
		}
	}
	theme = education
	override_background = {
		reference = sitting_room
	}
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:robbed_guest
		animation = anger
	}
	lower_left_portrait = scope:guardian

	trigger = {
		is_available_child_allow_travel = yes
		NAND = {
			OR = {
				has_trait = deceitful
				has_trait = honest
			}
			OR = {
				has_trait = humble
				has_trait = arrogant
			}
		}
		AND = {
			exists = host
			host = {
				any_vassal = {
					is_adult = yes
					is_imprisoned = no
					NOT = { has_trait = incapable }
					NOT = { this = root }
					NOT = {
						any_relation = {
							type = ward
							this = root
						}
					}
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = deceitful }
		child_personality_main_event_weight_modifier = { TRAIT = honest }
		child_personality_main_event_weight_modifier = { TRAIT = humble }
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = {
					type = guardian
					is_available = yes
				}
			}
			random_relation = {
				type = guardian
				save_scope_as = guardian
			}
		}
		host = {
			random_vassal = {
				limit = {
					is_adult = yes
					is_imprisoned = no
					NOT = { has_trait = incapable }
					NOT = { this = root }
					NOT = {
						any_relation = {
							type = ward
							this = root
						}
					}
				}
				save_scope_as = robbed_guest
			}
		}
	}

	option = {
		name = child_personality.0003.a
		trigger = {
			NOR = {
				has_trait = deceitful
				has_trait = honest
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = deceitful }
		}
		add_trait = deceitful
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1031
			}
		}	
	}

	option = {
		name = child_personality.0003.b
		trigger = {
			NOR = {
				has_trait = honest
				has_trait = deceitful
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = honest }
		}
		add_trait = honest
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1032
			}
		}	
	}

	option = {
		name = child_personality.0003.c
		trigger = {
			NOR = {
				has_trait = humble
				has_trait = arrogant
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = humble }
		}
		add_trait = humble
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1033
			}
		}	
	}
}


#generous, diligent or patient
child_personality.0004 = {
	type = character_event
	title = child_personality.0004.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:knight
				}
				desc = child_personality.0004.desc_knight
			}
			desc = child_personality.0004.desc
		}
	}
	theme = education
	
	override_background = {
		reference = armory
	}
	left_portrait = {
		character = root
		animation = personality_honorable
	}
	right_portrait = {
		character = scope:knight
		animation = marshal
	}

	trigger = {
		is_available_child_allow_travel = yes
		NAND = {
			OR = {
				has_trait = generous
				has_trait = greedy
			}
			OR = {
				has_trait = diligent
				has_trait = lazy
			}
			OR = {
				has_trait = patient
				has_trait = impatient
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = generous }
		child_personality_main_event_weight_modifier = { TRAIT = diligent }
		child_personality_main_event_weight_modifier = { TRAIT = patient }
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				exists = host
				host = {
					any_knight = {
						is_available_ai_adult = yes
						NOR = {
							has_trait = greedy
							has_trait = lazy
							has_trait = impatient
						}
					}
				}
			}
			host = {
				random_knight = {
					limit = {
						is_available_ai_adult = yes
						NOR = {
							has_trait = greedy
							has_trait = lazy
							has_trait = impatient
						}
					}
					save_scope_as = knight
				}
			}
		}
	}

	option = {
		name = child_personality.0004.a
		trigger = {
			NOR = {
				has_trait = generous
				has_trait = greedy
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = generous }
		}
		add_trait = generous
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1041
			}
		}	
	}

	option = {
		name = child_personality.0004.b
		trigger = {
			NOR = {
				has_trait = diligent
				has_trait = lazy
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = diligent }
		}
		add_trait = diligent
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1042
			}
		}	
	}

	option = {
		name = child_personality.0004.c
		trigger = {
			NOR = {
				has_trait = patient
				has_trait = impatient
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = patient }
		}
		add_trait = patient
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1043
			}
		}	
	}
}


#wrathful, forgiving or fickle
child_personality.0005 = {
	type = character_event
	title = child_personality.0005.t
	desc = child_personality.0005.desc
	theme = education
	
	override_background = {
		reference = courtyard
	}
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:doing_push
		animation = anger
	}

	trigger = {
		is_available_child_allow_travel = yes
		OR = {
			any_relation = { type = bully count >= 1 }
			any_vassal = {
				save_good_bully_character_trigger_check = yes
				is_ai = yes
			}
			any_vassal = {
				any_child = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
			}
			any_courtier_or_guest = {
				save_good_bully_character_trigger_check = yes
				is_ai = yes
			}
			AND = {
				is_independent_ruler = no
				exists = liege
				liege = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
			}
			AND = {
				is_independent_ruler = no
				exists = liege
				liege = {
					any_vassal = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
			}
			AND = {
				is_independent_ruler = no
				exists = liege
				liege = {
					any_vassal = {
						any_child = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
			}
			AND = {
				is_independent_ruler = no
				exists = liege
				liege = {
					any_courtier_or_guest = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
			}
			AND = {
				exists = host
				host = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
			}
			AND = {
				exists = host
				host = {
					any_vassal = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
			}
			AND = {
				exists = host
				host = {
					any_vassal = {
						any_child = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
			}
			AND = {
				exists = host
				host = {
					any_courtier_or_guest = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
			}
		}
		NAND = {
			OR = {
				has_trait = wrathful
				has_trait = calm
			}
			OR = {
				has_trait = forgiving
				has_trait = vengeful
			}
			OR = {
				has_trait = fickle
				has_trait = stubborn
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = wrathful }
		child_personality_main_event_weight_modifier = { TRAIT = forgiving }
		child_personality_main_event_weight_modifier = { TRAIT = fickle }
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = { type = bully count >= 1 }
			}
			random_relation = {
				type = bully
				save_scope_as = doing_push
			}
		}
		else = {
			every_vassal = {
				limit = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
				add_to_list = bullies
			}
			every_vassal = {
				every_child = {
					limit = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
					add_to_list = bullies
				}
			}
			every_courtier_or_guest = {
				limit = {
					save_good_bully_character_trigger_check = yes
					is_ai = yes
				}
				add_to_list = bullies
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
				liege = {
					add_to_list = bullies
				}
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						any_vassal = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
				liege = {
					every_vassal = {
						limit = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
						add_to_list = bullies
					}
				}
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						any_vassal = {
							any_child = {
								save_good_bully_character_trigger_check = yes
								is_ai = yes
							}
						}
					}
				}
				liege = {
					every_vassal = {
						every_child = {
							limit = {
								save_good_bully_character_trigger_check = yes
								is_ai = yes
							}
							add_to_list = bullies
						}
					}
				}
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						any_courtier_or_guest = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
				liege = {
					every_courtier_or_guest = {
						limit = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
						add_to_list = bullies
					}
				}
			}
			if = {
				limit = {
					exists = host
					host = {
						save_good_bully_character_trigger_check = yes
						is_ai = yes
					}
				}
				host = {
					add_to_list = bullies
				}
			}
			if = {
				limit = {
					exists = host
					host = {
						any_vassal = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
				host = {
					every_vassal = {
						limit = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
						add_to_list = bullies
					}
				}
			}
			if = {
				limit = {
					exists = host
					host = {
						any_vassal = {
							any_child = {
								save_good_bully_character_trigger_check = yes
								is_ai = yes
							}
						}
					}
				}
				host = {
					every_vassal = {
						every_child = {
							limit = {
								save_good_bully_character_trigger_check = yes
								is_ai = yes
							}
							add_to_list = bullies
						}
					}
				}
			}
			if = {
				limit = {
					exists = host
					host = {
						any_courtier_or_guest = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
					}
				}
				host = {
					every_courtier_or_guest = {
						limit = {
							save_good_bully_character_trigger_check = yes
							is_ai = yes
						}
						add_to_list = bullies
					}
				}
			}
			
			random_in_list = {
				list = bullies
				weight = {
					base = 1
					modifier = {
						add = 10
						is_of_major_interest_to_root_trigger = yes
					}
					modifier = {
						add = 5
						is_of_minor_interest_to_root_trigger = yes
					}
					modifier = {
						add = 5
						number_of_opposing_personality_traits = {
							target = root
							value >= 1
						}
					}
					modifier = {
						add = 5
						number_of_opposing_personality_traits = {
							target = root
							value >= 2
						}
					}
					modifier = {
						add = 5
						number_of_opposing_personality_traits = {
							target = root
							value >= 3
						}
					}
					modifier = {
						add = 5
						has_trait = wrathful
					}
					modifier = {
						add = 10
						has_trait = sadistic
					}
				}
				save_scope_as = doing_push
			}
		}
	}

	option = {
		name = child_personality.0005.a
		trigger = {
			NOR = {
				has_trait = wrathful
				has_trait = calm
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = wrathful }
		}
		add_trait = wrathful
		if = {
			limit = {
				is_ai = yes
				exists = scope:doing_push
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1051
			}
		}	
	}

	option = {
		name = child_personality.0005.b
		trigger = {
			NOR = {
				has_trait = forgiving
				has_trait = vengeful
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = forgiving }
		}
		add_trait = forgiving
		if = {
			limit = {
				is_ai = yes
				exists = scope:doing_push
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1052
			}
		}
		
		if = {
			limit = {
				exists = scope:doing_push
				scope:doing_push = {
					NOT = {
						any_relation = {
							type = victim
							this = root
						}
					}
				}
			}
			show_as_tooltip = {
				scope:doing_push = { set_relation_friend = { reason = friend_playing_children target = root } }
			}
			scope:doing_push = { trigger_event = child_personality.2004 }
		}
	}

	option = {
		name = child_personality.0005.c
		trigger = {
			NOR = {
				has_trait = fickle
				has_trait = stubborn
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = fickle }
		}
		add_trait = fickle
		if = {
			limit = {
				is_ai = yes
				exists = scope:doing_push
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1053
			}
		}	
	}
}


#vengeful, chaste or stubborn
#Child is rejected by a crush
child_personality.0006 = {
	type = character_event
	title = child_personality.0006.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:crush
				}
				desc = child_personality.0006.desc_crush
			}
			desc = child_personality.0006.desc
		}
	}
	theme = education
	override_icon = {
		reference = "gfx/interface/icons/event_types/type_relation_unfriendly.dds"
	}
	
	override_background = {
		reference = corridor_day
	}
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:crush
		animation = dismissal
	}

	trigger = {
		is_available_child_allow_travel = yes
		age >= 13 #Because chaste/lustful are only given at age 13
		NOT = {
			has_sexuality = none
		}
		NAND = {
			OR = {
				has_trait = vengeful
				has_trait = forgiving
			}
			OR = {
				has_trait = chaste
				has_trait = lustful
			}
			OR = {
				has_trait = stubborn
				has_trait = fickle
			}
		}
	}

	weight_multiplier = {
		base = 1

		child_personality_main_event_weight_modifier = { TRAIT = vengeful }
		child_personality_main_event_weight_modifier = { TRAIT = chaste }
		child_personality_main_event_weight_modifier = { TRAIT = stubborn }
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = {
					type = crush
					is_available_child_allow_travel = yes
				}
				NOT = { #Not a crush who crushes on you!
					any_relation = {
						type = crush
						is_available_child_allow_travel = yes
						any_relation = {
							type = crush
							this = root
						}
					}
				}
			}
			random_relation = {
				type = crush
				limit = {
					is_available_child_allow_travel = yes
					NOT = {
						any_relation = {
							type = crush
							this = root
						}
					}
				}
				save_scope_as = crush
			}
		}
		else = {
			every_vassal = {
				limit = {
					save_good_crush_character_trigger_check = yes
				}
				add_to_list = crushes
			}
			every_vassal = {
				every_child = {
					limit = {
						save_good_crush_character_trigger_check = yes
					}
					add_to_list = crushes
				}
			}
			every_courtier_or_guest = {
				limit = {
					save_good_crush_character_trigger_check = yes
				}
				add_to_list = crushes
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						save_good_crush_character_trigger_check = yes
					}
				}
				liege = {
					add_to_list = crushes
				}
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						any_vassal = {
							save_good_crush_character_trigger_check = yes
						}
					}
				}
				liege = {
					every_vassal = {
						limit = {
							save_good_crush_character_trigger_check = yes
						}
						add_to_list = crushes
					}
				}
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						any_vassal = {
							any_child = {
								save_good_crush_character_trigger_check = yes
							}
						}
					}
				}
				liege = {
					every_vassal = {
						every_child = {
							limit = {
								save_good_crush_character_trigger_check = yes
							}
							add_to_list = crushes
						}
					}
				}
			}
			if = {
				limit = {
					is_independent_ruler = no
					exists = liege
					liege = {
						any_courtier_or_guest = {
							save_good_crush_character_trigger_check = yes
						}
					}
				}
				liege = {
					every_courtier_or_guest = {
						limit = {
							save_good_crush_character_trigger_check = yes
						}
						add_to_list = crushes
					}
				}
			}
			
			random_in_list = {
				list = crushes
				weight = {
					base = 1
					modifier = {
						add = 10
						is_independent_ruler = no
						exists = liege
						is_primary_heir_of = liege
					}
					modifier = {
						add = 5
						is_independent_ruler = no
						exists = liege
						is_heir_of = liege
					}
					modifier = {
						add = 10
						any_parent = {
							is_powerful_vassal_of = root
						}
					}
					modifier = {
						add = 5
						any_parent = {
							is_vassal_of = root
						}
					}
					modifier = {
						add = 10
						is_of_major_interest_to_root_trigger = yes
					}
					modifier = {
						add = 5
						is_of_minor_interest_to_root_trigger = yes
					}
				}
				save_scope_as = crush
			}
		}
		if = {
			limit = {
				exists = scope:crush
				NOT = { has_relation_crush = scope:crush }
			}
			set_relation_crush = scope:crush
		}
		if = {
			limit = {
				NOT = {
					exists = scope:crush
				}
			}
			pick_servant_romance_target_effect = yes
		}
	}

	option = { #Vengeful
		name = {
			text = child_personality.0006.a
		}
		name = {
			trigger = { exists = scope:crush }
			text = child_personality.0006.a_crush
		}
		trigger = {
			NOR = {
				has_trait = vengeful
				has_trait = forgiving
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = vengeful }
		}
		if = {
			limit = {
				exists = scope:crush
			}
			remove_relation_crush = scope:crush
			if = {
				limit = {
					can_set_relation_victim_trigger = { CHARACTER = scope:crush }
				}
				set_relation_victim = scope:crush
			}
		}
		add_trait = vengeful
		if = {
			limit = {
				is_ai = yes
				exists = scope:crush
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1061
			}
		}
	}

	option = { #Chaste
		name = child_personality.0006.b
		trigger = {
			NOR = {
				has_trait = chaste
				has_trait = lustful
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = chaste }
		}
		if = {
			limit = {
				exists = scope:crush
			}
			remove_relation_crush = scope:crush
		}
		add_trait = chaste
		if = {
			limit = {
				is_ai = yes
				exists = scope:crush
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1062
			}
		}	
	}

	option = { #Stubborn
		name = {
			text = child_personality.0006.c
		}
		name = {
			trigger = { exists = scope:crush }
			text = child_personality.0006.c_crush
		}
		trigger = {
			NOR = {
				has_trait = stubborn
				has_trait = fickle
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = stubborn }
		}
		add_trait = stubborn
		if = {
			limit = {
				is_ai = yes
				exists = scope:crush
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1063
			}
		}
		if = {
			limit = {
				exists = scope:crush
			}
			scope:crush = {
				trigger_event = child_personality.2005
			}
		}
	}
}


#just, cynical or temperate
child_personality.0007 = {
	type = character_event
	title = child_personality.0007.t
	desc = child_personality.0007.desc
	theme = education
	
	override_background = {
		reference = gallows
	}
	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:guardian
		animation = personality_cynical
	}

	trigger = {
		is_available_child_allow_travel = yes
		OR = {
			any_relation = {
				type = guardian
				is_available = yes
			}
			any_courtier_or_guest = {
				is_adult = yes
				is_available = yes
			}
			AND = {
				exists = host
				host = {
					any_courtier_or_guest = {
						is_adult = yes
						is_available = yes
					}
				}
			}
		}
		NAND = {
			OR = {
				has_trait = just
				has_trait = arbitrary
			}
			OR = {
				has_trait = cynical
				has_trait = trusting
			}
			OR = {
				has_trait = temperate
				has_trait = gluttonous
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = just }
		child_personality_main_event_weight_modifier = { TRAIT = cynical }
		child_personality_main_event_weight_modifier = { TRAIT = temperate }
	}

	immediate = {
		save_scope_as = child
		get_guardian_scope_effect = yes
	}

	option = {
		name = child_personality.0007.a
		trigger = {
			NOR = {
				has_trait = just
				has_trait = arbitrary
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = just }
		}
		add_trait = just
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1071
			}
		}	
	}

	option = {
		name = child_personality.0007.b
		trigger = {
			NOR = {
				has_trait = cynical
				has_trait = trusting
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = cynical }
		}
		add_trait = cynical
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1072
			}
		}	
	}

	option = {
		name = child_personality.0007.c
		trigger = {
			NOR = {
				has_trait = temperate
				has_trait = gluttonous
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = temperate }
		}
		add_trait = temperate
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1073
			}
		}
	}
}


#greedy, gregarious or lustful
child_personality.0008 = {
	type = character_event
	title = child_personality.0008.t
	desc = {
		desc = child_personality.0008.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:boy
				}
				desc = child_personality.0008.servant_boy
			}
			triggered_desc = {
				trigger = {
					exists = scope:girl
				}
				desc = child_personality.0008.serving_wench
			}
			desc = child_personality.0008.desc_not_server
		}
	}
	theme = education
	override_background = {
		reference = feast
	}
	left_portrait = {
		character = root
		animation = ecstasy
	}
	right_portrait = {
		character = scope:peasant_server
		animation = admiration
	}

	trigger = {
		is_available_child_allow_travel = yes
		age >= 13 #Because chaste/lustful are only given at age 13
		NOT = {
			has_sexuality = none
		}
		NAND = {
			OR = {
				has_trait = greedy
				has_trait = generous
			}
			OR = {
				has_trait = gregarious
				has_trait = shy
			}
			OR = {
				has_trait = lustful
				has_trait = chaste
				has_sexuality = asexual
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = greedy }
		child_personality_main_event_weight_modifier = { TRAIT = gregarious }
		child_personality_main_event_weight_modifier = { TRAIT = lustful }
	}

	immediate = {
		save_scope_as = child
		hidden_effect = {
			if = {
				limit = {
					NOR = {
						has_sexuality = asexual
						has_trait = lustful
						has_trait = chaste
					}
				}
				add_character_flag = {
					flag = become_lustful
				}
			}
			if = {
				limit = {
					has_character_flag = become_lustful
					OR = {
						AND = {
							has_sexuality = homosexual
							is_female = no
						}
						AND = {
							is_female = yes
							has_sexuality = heterosexual
						}
					}
				}
				save_scope_value_as = {
					name = boy
					value = yes
				}
			}
			else_if = {
				limit = {
					has_character_flag = become_lustful
					OR = {
						AND = {
							has_sexuality = homosexual
							is_female = yes
						}
						AND = {
							is_female = no
							has_sexuality = heterosexual
						}
					}
				}
				save_scope_value_as = {
					name = girl
					value = yes
				}
			}
			else_if = {
				limit = {
					has_sexuality = bisexual
					has_character_flag = become_lustful
				}
				random_list = {
					10 = {
						save_scope_value_as = {
							name = boy
							value = yes
						}
					}
					10 = {
						save_scope_value_as = {
							name = girl
							value = yes
						}
					}
				}
			}
			
			if = { # Generate a crush, for fun
				limit = {
					is_ai = no # Avoid character bloat
					OR = {
						exists = scope:boy
						exists = scope:girl
					}
				}
				hidden_effect = {
					create_character = {
						location = root.capital_province
						template = servant_character
						age = root.age
						gender_female_chance = root_attraction_based_female_chance
						faith = root.capital_province.county.faith
						culture = root.capital_province.county.culture
						dynasty = none
						save_scope_as = peasant_server
					}
					add_courtier = scope:peasant_server
					scope:peasant_server = {
						add_character_flag = peasant_outfit
						set_relation_crush = root
					}
					random_list = {
						25 = {
							trigger = {
								is_female = yes
								scope:peasant_server = { is_female = yes }
							}
							scope:peasant_server = { set_sexuality = homosexual }
						}
						100 = {
							trigger = {
								is_female = yes
								scope:peasant_server = { is_male = yes }
							}
							scope:peasant_server = { set_sexuality = heterosexual }
						}
						25 = {
							trigger = {
								is_male = yes
								scope:peasant_server = { is_male = yes }
							}
							scope:peasant_server = { set_sexuality = homosexual }
						}
						100 = {
							trigger = {
								is_male = yes
								scope:peasant_server = { is_female = yes }
							}
							scope:peasant_server = { set_sexuality = heterosexual }
						}
						50 = {
							scope:peasant_server = { set_sexuality = bisexual }
						}
					}
				}
			}
		}
	}

	option = {
		name = child_personality.0008.a
		trigger = {
			NOR = {
				has_trait = greedy
				has_trait = generous
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = greedy }
		}
		add_trait = greedy
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1081
			}
		}	
	}

	option = {
		name = child_personality.0008.b
		trigger = {
			NOR = {
				has_trait = gregarious
				has_trait = shy
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = gregarious }
		}
		add_trait = gregarious
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1082
			}
		}	
	}

	option = {
		name = child_personality.0008.c
		trigger = {
			has_character_flag = become_lustful
			NOR = {
				has_trait = lustful
				has_trait = chaste
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = lustful }
		}
		add_trait = lustful
		if = {
			limit = {
				exists = scope:peasant_server
			}
			set_relation_crush = scope:peasant_server
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1083
			}
		}	
	}


	after = {
		if = {
			limit = {
				has_character_flag = become_lustful
			}
			remove_character_flag = become_lustful
		}
	}
}


scripted_trigger child_personality_0009_child_preacher_trigger = {
	is_ai = yes
	is_available_child_allow_travel = yes
	age >= 4 # Kid should be able to talk in order to preach
	NOT = { this = root }
	NOT = { has_trait = cynical }
}

#brave, calm or zealous
child_personality.0009 = {
	type = character_event
	title = child_personality.0009.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:child_preacher
				}
				desc = child_personality.0009.desc
			}
			desc = child_personality.0009.desc_fallback
		}
	}
	theme = education
	override_background = {
		reference = courtyard
	}
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:child_preacher
		animation = personality_zealous
	}

	trigger = {
		is_available_child_allow_travel = yes
		NAND = {
			OR = {
				has_trait = brave
				has_trait = craven
			}
			OR = {
				has_trait = calm
				has_trait = wrathful
			}
			OR = {
				has_trait = zealous
				has_trait = cynical
			}
		}
		OR = {
			any_courtier_or_guest = {
				child_personality_0009_child_preacher_trigger = yes
			}
			AND = {
				exists = host
				host = {
					OR = {
						any_courtier_or_guest = {
							child_personality_0009_child_preacher_trigger = yes
						}
						any_vassal = {
							any_courtier_or_guest = {
								child_personality_0009_child_preacher_trigger = yes
							}
						}
					}
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = brave }
		child_personality_main_event_weight_modifier = { TRAIT = calm }
		child_personality_main_event_weight_modifier = { TRAIT = zealous }
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				is_landed = yes
			}
			random_courtier_or_guest = {
				limit = {
					child_personality_0009_child_preacher_trigger = yes
					has_trait = zealous
				}
				alternative_limit = {
					child_personality_0009_child_preacher_trigger = yes
				}
				save_scope_as = child_preacher
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:child_preacher }
			}
			host = {
				random_courtier_or_guest = {
					limit = {
						child_personality_0009_child_preacher_trigger = yes
						has_trait = zealous
					}
					alternative_limit = {
						child_personality_0009_child_preacher_trigger = yes
					}
					save_scope_as = child_preacher
				}
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:child_preacher }
			}
			host = {
				random_vassal = {
					limit = {
						any_courtier_or_guest = {
							child_personality_0009_child_preacher_trigger = yes
						}	
					}
					random_courtier_or_guest = {
						limit = {
							child_personality_0009_child_preacher_trigger = yes
							has_trait = zealous
						}
						alternative_limit = {
							child_personality_0009_child_preacher_trigger = yes
						}
						save_scope_as = child_preacher
					}
				}
			}
		}
	}

	option = {
		name = child_personality.0009.a
		trigger = {
			NOR = {
				has_trait = brave
				has_trait = craven
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = brave }
		}
		add_trait = brave
		random = {
			chance = 25
			increase_wounds_effect = { REASON = fight }
		}
		if = {
			limit = {
				exists = scope:child_preacher
				any_relation = {
					type = bully
					NOT = {
						any_relation = {
							type = friend
							this = scope:child_preacher
						}
					}
				}
			}
			hidden_effect = {
				random = {
					chance = 50
					show_as_tooltip = {
						random_relation = {
							type = bully
							limit = {
								NOT = {
									any_relation = {
										type = friend
										this = scope:child_preacher
									}
								}
							}
							increase_wounds_effect = { REASON = fight }
						}
					}
					hidden_effect = {
						random_relation = {
							type = bully
							limit = {
								NOT = {
									any_relation = {
										type = friend
										this = scope:child_preacher
									}
								}
							}
							trigger_event = child_personality.2007
						}
					}
				}
			}
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1091
			}
		}
		if = {
			limit = {
				has_relation_bully = scope:child_preacher
			}
			show_as_tooltip = {
				remove_relation_bully = scope:child_preacher
			}
		}
		if = {
			limit = {
				has_relation_victim = scope:child_preacher
			}
			show_as_tooltip = {
				remove_relation_victim = scope:child_preacher
			}
		}
		show_as_tooltip = {
			set_relation_friend = { reason = friend_saved_as_children target = scope:child_preacher }
		}
	}

	option = {
		name = child_personality.0009.b
		trigger = {
			NOR = {
				has_trait = calm
				has_trait = wrathful
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = calm }
		}
		add_trait = calm
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1092
			}
		}
		if = {
			limit = {
				has_relation_bully = scope:child_preacher
			}
			show_as_tooltip = {
				remove_relation_bully = scope:child_preacher
			}
		}
		if = {
			limit = {
				has_relation_victim = scope:child_preacher
			}
			show_as_tooltip = {
				remove_relation_victim = scope:child_preacher
			}
		}
		show_as_tooltip = {
			set_relation_friend = { reason = friend_saved_as_children target = scope:child }
		}
	}

	option = {
		name = child_personality.0009.c
		trigger = {
			NOR = {
				has_trait = zealous
				has_trait = cynical
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = zealous }
		}
		add_trait = zealous
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1093
			}
		}
		if = {
			limit = {
				has_relation_bully = scope:child_preacher
			}
			show_as_tooltip = {
				remove_relation_bully = scope:child_preacher
			}
		}
		if = {
			limit = {
				has_relation_victim = scope:child_preacher
			}
			show_as_tooltip = {
				remove_relation_victim = scope:child_preacher
			}
		}
		show_as_tooltip = {
			set_relation_friend = { reason = friend_saved_as_children target = scope:child }
		}	
	}

	option = {
		name = child_personality.0009.d
		trigger = {
			OR = {
				has_relation_victim = scope:child_preacher
				has_relation_bully = scope:child_preacher
			}
		}
		scope:child_preacher = {
			random = {
				chance = 25
				increase_wounds_effect = { REASON = fight }
			}
		}
		if = {
			limit = {
				NOR = {
					has_trait = compassionate
					has_trait = callous
					has_trait = sadistic
				}
			}
			add_trait = sadistic
		}
		
		ai_chance = {
			base = 0
		}
	}

	after = {
		scope:child_preacher = {
			trigger_event = child_personality.2006
		}
	}
}


#ambitious, sadistic or paranoid
child_personality.0010 = {
	type = character_event
	title = child_personality.0010.t
	desc = child_personality.0010.desc
	theme = education
	override_background = {
		reference = terrain
	}
	
	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:guardian
		animation = marshal
	}

	trigger = {
		is_available_child_allow_travel = yes
		OR = {
			any_relation = {
				type = guardian
				is_available = yes
			}
			any_courtier_or_guest = {
				is_adult = yes
				is_available = yes
			}
			AND = {
				exists = host
				host = {
					any_courtier_or_guest = {
						is_adult = yes
						is_available = yes
					}
				}
			}
		}
		NAND = {
			OR = {
				has_trait = ambitious
				has_trait = content
			}
			OR = {
				has_trait = sadistic
				has_trait = compassionate
				has_trait = callous
			}
			OR = {
				has_trait = paranoid
				has_trait = trusting
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = ambitious }
		child_personality_main_event_weight_modifier = { TRAIT = sadistic }
		child_personality_main_event_weight_modifier = { TRAIT = paranoid }
	}

	immediate = {
		save_scope_as = child
		get_guardian_scope_effect = yes
	}

	option = {
		name = child_personality.0010.a
		trigger = {
			NOR = {
				has_trait = ambitious
				has_trait = content
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = ambitious }
		}
		add_trait = ambitious
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1101
			}
		}	
	}

	option = {
		name = child_personality.0010.b
		trigger = {
			NOR = {
				has_trait = sadistic
				has_trait = compassionate
				has_trait = callous
			}
		}
		ai_chance = {
			base = 0.25
			
			child_personality_option_weight_modifier = { TRAIT = sadistic }
		}
		add_trait = sadistic
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1102
			}
		}
	}

	option = {
		name = child_personality.0010.c
		trigger = {
			NOR = {
				has_trait = paranoid
				has_trait = trusting
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = paranoid }
		}
		add_trait = paranoid
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1103
			}
		}	
	}
}


#content, fickle or trusting
child_personality.0011 = {
	type = character_event
	title = child_personality.0011.t
	desc = child_personality.0011.desc
	theme = education
	
	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:guardian
		animation = chancellor
	}

	trigger = {
		is_available_child_allow_travel = yes
		OR = {
			any_relation = {
				type = guardian
				is_available = yes
			}
			any_courtier_or_guest = {
				is_adult = yes
				is_available = yes
			}
			AND = {
				exists = host
				host = {
					any_courtier_or_guest = {
						is_adult = yes
						is_available = yes
					}
				}
			}
		}
		NAND = {
			OR = {
				has_trait = content
				has_trait = ambitious
			}
			OR = {
				has_trait = fickle
				has_trait = stubborn
			}
			OR = {
				has_trait = trusting
				has_trait = cynical
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = content }
		child_personality_main_event_weight_modifier = { TRAIT = fickle }
		child_personality_main_event_weight_modifier = { TRAIT = trusting }
	}

	immediate = {
		save_scope_as = child
		get_guardian_scope_effect = yes
	}


	option = {
		name = child_personality.0011.a
		trigger = {
			NOR = {
				has_trait = content
				has_trait = ambitious
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = content }
		}
		add_trait = content
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1111
			}
		}	
	}

	option = {
		name = child_personality.0011.b
		trigger = {
			NOR = {
				has_trait = fickle
				has_trait = stubborn
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = fickle }
		}
		add_trait = fickle
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1112
			}
		}	
	}

	option = {
		name = child_personality.0011.c
		trigger = {
			NOR = {
				has_trait = trusting
				has_trait = cynical
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = trusting }
		}
		add_trait = trusting
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1113
			}
		}	
	}
}


#impatient, shy or gluttonous
child_personality.0012 = {
	type = character_event
	title = child_personality.0012.t
	desc = child_personality.0012.desc
	theme = education
	override_background = {
		reference = feast
	}
	
	left_portrait = {
		character = root
		animation = boredom
	}
	right_portrait = {
		character = scope:guardian
		animation = happiness
	}

	trigger = {
		is_available_child_allow_travel = yes
		OR = {
			any_relation = {
				type = guardian
				is_available = yes
			}
			any_courtier_or_guest = {
				is_adult = yes
				is_available = yes
			}
			AND = {
				exists = host
				host = {
					any_courtier_or_guest = {
						is_adult = yes
						is_available = yes
					}
				}
			}
		}
		NAND = {
			OR = {
				has_trait = impatient
				has_trait = patient
			}
			OR = {
				has_trait = shy
				has_trait = gregarious
			}
			OR = {
				has_trait = gluttonous
				has_trait = temperate
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		child_personality_main_event_weight_modifier = { TRAIT = impatient }
		child_personality_main_event_weight_modifier = { TRAIT = shy }
		child_personality_main_event_weight_modifier = { TRAIT = gluttonous }
	}

	immediate = {
		save_scope_as = child
		get_guardian_scope_effect = yes
	}

	option = {
		name = child_personality.0012.a
		trigger = {
			NOR = {
				has_trait = impatient
				has_trait = patient
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = impatient }
		}
		add_trait = impatient
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1121
			}
		}	
	}

	option = {
		name = child_personality.0012.b
		trigger = {
			NOR = {
				has_trait = shy
				has_trait = gregarious
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = shy }
		}
		add_trait = shy
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1122
			}
		}	
	}

	option = {
		name = child_personality.0012.c
		trigger = {
			NOR = {
				has_trait = gluttonous
				has_trait = temperate
			}
		}
		ai_chance = {
			base = 1
			
			child_personality_option_weight_modifier = { TRAIT = gluttonous }
		}
		add_trait = gluttonous
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.1123
			}
		}	
	}
}



#####
# PERSONALITY GAIN IN PRISON
#####

#Gain lustful
child_personality.0021 = {
	type = character_event
	title = child_personality.0021.t
	desc = {
		desc = child_personality.0021.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:boy
				}
				desc = child_personality.0021.servant_boy
			}
			triggered_desc = {
				trigger = {
					exists = scope:girl
				}
				desc = child_personality.0021.serving_wench
			}
			desc = child_personality.0021.desc_no_gender
		}
	}
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = flirtation
	}

	trigger = {
		is_imprisoned = yes
		age >= 13 #Because chaste/lustful are only given at age 13
		NOR = {
			has_trait = lustful
			has_trait = chaste
		}
		NOT = { has_trait = incapable }
	}

	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = lustful }
		
		modifier = {
			factor = 0.5
			
			has_sexuality = asexual
		}
		modifier = {	#court.6050
			add = 5
			imprisoner ?= { has_character_flag = supported_indecent_books }
		}
	}

	immediate = {
		hidden_effect = {
			if = {
				limit = {
					has_sexuality = none
				}
				random_list = {
					0 = { #Heterosexual
						modifier = {
							add = heterosexuality_chance
						}
						save_scope_value_as = {
							name = heterosexual
							value = yes
						}
					}
					0 = { #Homosexual
						modifier = {
							add = homosexuality_chance
						}
						save_scope_value_as = {
							name = homosexual
							value = yes
						}
					}
					0 = { #Bisexual
						modifier = {
							add = bisexuality_chance
						}
						save_scope_value_as = {
							name = bisexual
							value = yes
						}
					}
					0 = { #Asexual
						modifier = {
							add = asexuality_chance
						}
						save_scope_value_as = {
							name = asexual
							value = yes
						}
					}
				}
			}
		}
		#To give tooltip
		if = {
			limit = {
				exists = scope:heterosexual
			}
			set_sexuality = heterosexual
		}
		else_if = {
			limit = {
				exists = scope:homosexual
			}
			set_sexuality = homosexual
		}
		else_if = {
			limit = {
				exists = scope:bisexual
			}
			set_sexuality = bisexual
		}
		else_if = {
			limit = {
				exists = scope:asexual
			}
			set_sexuality = asexual
		}
		hidden_effect = {
			if = {
				limit = {
					OR = {
						AND = {
							has_sexuality = homosexual
							is_female = no
						}
						AND = {
							is_female = yes
							has_sexuality = heterosexual
						}
					}
				}
				save_scope_value_as = {
					name = boy
					value = yes
				}
			}
			else_if = {
				limit = {
					OR = {
						AND = {
							has_sexuality = homosexual
							is_female = yes
						}
						AND = {
							is_female = no
							has_sexuality = heterosexual
						}
					}
				}
				save_scope_value_as = {
					name = girl
					value = yes
				}
			}
		}
	}

	option = {
		name = child_personality.0021.a
		add_trait = lustful
	}
}

#Gain chaste
child_personality.0022 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0022.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = dismissal
	}

	trigger = {
		is_imprisoned = yes
		age >= 13 #Because chaste/lustful are only given at age 13
		NOR = {
			has_trait = chaste
			has_trait = lustful
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = chaste }
		
		modifier = {
			factor = 2
			has_sexuality = asexual
		}
		modifier = {	#court.6050
			add = 5
			imprisoner ?= { has_character_flag = burned_indecent_books }
		}
	}

	option = {
		name = child_personality.0022.a
		add_trait = chaste
	}
}

#Gain gluttonous
child_personality.0023 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0023.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_greedy
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = gluttonous
			has_trait = temperate
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = gluttonous }
	}

	option = {
		name = child_personality.0023.a
		add_trait = gluttonous
	}
}

#Gain temperate
child_personality.0024 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0024.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_content
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = temperate
			has_trait = gluttonous
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = temperate }
	}

	option = {
		name = child_personality.0024.a
		add_trait = temperate
	}
}

#Gain greedy
child_personality.0025 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0025.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_greedy
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = greedy
			has_trait = generous
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = greedy }
	}

	option = {
		name = child_personality.0025.a
		add_trait = greedy
	}
}

#Gain generous
child_personality.0026 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0026.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_compassionate
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = greedy
			has_trait = generous
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = generous }
	}

	option = {
		name = child_personality.0026.a
		add_trait = generous
	}
}

#Gain lazy
child_personality.0027 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0027.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_content
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = diligent
			has_trait = lazy
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = lazy }
	}

	option = {
		name = child_personality.0027.a
		add_trait = lazy
	}
}

#Gain diligent
child_personality.0028 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0028.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_rational
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = diligent
			has_trait = lazy
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = diligent }
	}

	option = {
		name = child_personality.0028.a
		add_trait = diligent
	}
}

#Gain wrathful
child_personality.0029 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0029.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = anger
	}
	right_portrait = scope:imprisoner

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = wrathful
			has_trait = calm
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = wrathful }
	}

	immediate = {
		imprisoner = {
			save_scope_as = imprisoner
		}
	}

	option = {
		name = child_personality.0029.a
		add_trait = wrathful
	}
}

#Gain calm
child_personality.0030 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0030.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_content
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = wrathful
			has_trait = calm
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = calm }
	}

	option = {
		name = child_personality.0030.a
		add_trait = calm
	}
}

#Gain patient
child_personality.0031 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0031.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_content
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = impatient
			has_trait = patient
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = patient }
	}

	option = {
		name = child_personality.0031.a
		add_trait = patient
	}
}

#Gain impatient
child_personality.0032 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0032.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = anger
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = impatient
			has_trait = patient
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = impatient }
	}

	option = {
		name = child_personality.0032.a
		add_trait = impatient
	}
}

#Gain arrogant
child_personality.0033 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0033.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = dismissal
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = arrogant
			has_trait = humble
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = arrogant }
	}

	option = {
		name = child_personality.0033.a
		add_trait = arrogant
	}
}

#Gain humble
child_personality.0034 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0034.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = shame
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = arrogant
			has_trait = humble
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = humble }
	}

	option = {
		name = child_personality.0034.a
		add_trait = humble
	}
}

#Gain deceitful
child_personality.0035 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0035.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_dishonorable
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = honest
			has_trait = deceitful
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = deceitful }
	}

	option = {
		name = child_personality.0035.a
		add_trait = deceitful
	}
}

#Gain honest
child_personality.0036 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0036.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_honorable
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = honest
			has_trait = deceitful
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = honest }
	}

	option = {
		name = child_personality.0036.a
		add_trait = honest
	}
}

#Gain craven
child_personality.0037 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0037.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = shame
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = craven
			has_trait = brave
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = craven }
	}

	option = {
		name = child_personality.0037.a
		add_trait = craven
	}
}

#Gain brave
child_personality.0038 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0038.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_bold
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = craven
			has_trait = brave
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = brave }
	}

	immediate = {
		imprisoner = {
			save_scope_as = imprisoner
		}
	}

	option = {
		name = child_personality.0038.a
		add_trait = brave
	}
}

#Gain shy
child_personality.0039 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0039.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = shame
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = gregarious
			has_trait = shy
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = shy }
	}

	option = {
		name = child_personality.0039.a
		add_trait = shy
	}
}

#Gain gregarious
child_personality.0040 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0040.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = happiness
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = gregarious
			has_trait = shy
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = gregarious }
	}

	option = {
		name = child_personality.0040.a
		add_trait = gregarious
	}
}

#Gain ambitious
child_personality.0041 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0041.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_greedy
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = ambitious
			has_trait = content
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = ambitious }
	}

	option = {
		name = child_personality.0041.a
		add_trait = ambitious
	}
}

#Gain content
child_personality.0042 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0042.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = boredom
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = ambitious
			has_trait = content
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = content }
	}

	option = {
		name = child_personality.0042.a
		add_trait = content
	}
}

#Gain arbitrary
child_personality.0043 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0043.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_irrational
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = arbitrary
			has_trait = just
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = arbitrary }
	}

	option = {
		name = child_personality.0043.a
		add_trait = arbitrary
	}
}

#Gain just
child_personality.0044 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0044.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_honorable
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = arbitrary
			has_trait = just
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = just }
	}

	option = {
		name = child_personality.0044.a
		add_trait = just
	}
}

#Gain cynical
child_personality.0045 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0045.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_callous
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = cynical
			has_trait = zealous
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = cynical }
		
		modifier = {	#court.6050
			add = 5
			imprisoner ?= { has_character_flag = supported_indecent_books }
		}
	}

	option = {
		name = child_personality.0045.a
		add_trait = cynical
	}
}

#Gain zealous
child_personality.0046 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0046.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_zealous
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = cynical
			has_trait = zealous
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = zealous }
		modifier = {	#court.6050
			add = 5
			imprisoner ?= { has_character_flag = burned_indecent_books }
		}
	}

	option = {
		name = child_personality.0046.a
		add_trait = zealous
	}
}

#Gain paranoid
child_personality.0047 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0047.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = paranoia
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = paranoid
			has_trait = trusting
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = paranoid }
	}

	option = {
		name = child_personality.0047.a
		add_trait = paranoid
	}
}

#Gain trusting
child_personality.0048 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0048.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_compassionate
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = paranoid
			has_trait = trusting
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = trusting }
	}

	option = {
		name = child_personality.0048.a
		add_trait = trusting
	}
}

#Gain compassionate
child_personality.0049 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0049.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_compassionate
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = compassionate
			has_trait = callous
			has_trait = sadistic
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = compassionate }
	}

	option = {
		name = child_personality.0049.a
		add_trait = compassionate
	}
}

#Gain callous
child_personality.0050 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0050.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_callous
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = compassionate
			has_trait = callous
			has_trait = sadistic
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = callous }
	}

	option = {
		name = child_personality.0050.a
		add_trait = callous
	}
}

#Gain sadistic
child_personality.0051 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0051.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = schadenfreude
	}
	right_portrait = scope:imprisoner

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = sadistic
			has_trait = stubborn
			has_trait = callous
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = sadistic }
	}

	immediate = {
		imprisoner = {
			save_scope_as = imprisoner
		}
	}

	option = {
		name = child_personality.0051.a
		add_trait = sadistic
	}
}

#Gain stubborn
child_personality.0052 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0052.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_callous
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = stubborn
			has_trait = fickle
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = stubborn }
	}

	option = {
		name = child_personality.0052.a
		add_trait = stubborn
	}
}

#Gain fickle
child_personality.0053 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0053.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_irrational
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = stubborn
			has_trait = fickle
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = fickle }
	}

	option = {
		name = child_personality.0053.a
		add_trait = fickle
	}
}

#Gain vengeful
child_personality.0054 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0054.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = anger
	}
	right_portrait = scope:imprisoner

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = vengeful
			has_trait = forgiving
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = vengeful }
	}

	immediate = {
		imprisoner = {
			save_scope_as = imprisoner
			if = {
				limit = {
					NOR = {
						has_relation_rival = root
						has_relation_potential_rival = root
					}
				}
				set_relation_potential_rival = root
			}
		}
	}

	option = {
		name = child_personality.0054.a
		add_trait = vengeful
	}
}

#Gain forgiving
child_personality.0055 = {
	type = character_event
	title = child_personality.0021.t
	desc = child_personality.0055.desc
	theme = education
	override_background = {
		trigger = { is_in_prison_type = house_arrest }
		reference = sitting_room
	}
	override_background = {
		trigger = { is_in_prison_type = dungeon }
		reference = dungeon
	}
	left_portrait = {
		character = root
		animation = personality_compassionate
	}

	trigger = {
		is_imprisoned = yes
		NOR = {
			has_trait = vengeful
			has_trait = forgiving
		}
		NOT = { has_trait = incapable }
	}
	
	weight_multiplier = {
		base = 1
		
		child_personality_prison_weight_modifier = { TRAIT = forgiving }
	}

	option = {
		name = child_personality.0055.a
		add_trait = forgiving
	}
}


# Child may gain a propensity to drinking by watching their ward 
# By Bianca Savazzi 
child_personality.0061 = {
	type = character_event
	title = child_personality.0061.t
	desc = {
		desc = child_personality.0061.desc_opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:guardian = {					
						has_trait = shy
					}
				}
				desc = child_personality.0061.desc_shy
			}
			triggered_desc = {
				trigger = {
					scope:guardian = {
						has_trait = gregarious
					}
				}
				desc = child_personality.0061.desc_gregarious
			}
			desc = child_personality.0061.desc_fallback
		}
		desc = child_personality.0061.desc_ending
	}
	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:guardian
		animation = happiness
	}
	theme = education

	cooldown = { years = 20 }

	trigger = {
		is_ai = no
		is_available_child_allow_travel = yes
		age >= 11
		any_relation = {
			type = guardian
			is_available = yes
			OR = {
				has_trait = drunkard 
				has_trait = lifestyle_reveler
			}
		}
	}

	immediate = {
		if = {
			limit = {
				any_relation = { type = guardian count >= 1 }
			}
			random_relation = {
				type = guardian
				limit = {
					is_available = yes
					OR = {
						has_trait = drunkard 
						has_trait = lifestyle_reveler
					}
				}
				save_scope_as = guardian
			}
		}
	}

	option = {
		name = child_personality.0061.a
		custom_tooltip = child_personality.0061.a.tt

		ai_chance = {
			base = 10
		}
		if = {
			limit = { has_trait = shy } 
			random = {
				chance = 25
				remove_trait = shy
			}
		}
		hidden_effect = { #Progress in the reveler lifestyle
			if = {
				limit = { NOT = { has_variable = reveler_lifestyle_progress } }
				set_variable = {
					name = reveler_lifestyle_progress
					value = 1
				}
			}
			else = {
				change_variable = {
					name = reveler_lifestyle_progress
					add = 1
				}
			}
			random = {
				chance = 33
				change_variable = {
					name = reveler_lifestyle_progress
					add = 1
				}
			}
			random = {
				chance = 33
				add_diplomacy_skill = 1 
			}
		}
	}

	option = {
		name = child_personality.0061.b
		if = {
			limit = { 
				NOR = {
					has_trait = zealous
					has_trait = cynical
				}
			}
			add_trait = zealous
		}
		
		add_piety = minor_piety_gain
	}
}

####
# GUARDIAN EVENTS
# 1000-1999
####


#Responses to Craven, Lazy or Arbitrary
#0001

#Child has become craven
child_personality.1011 = {
	type = character_event
	title = child_personality.1011.t
	desc = {
		desc = my_ward_or_child
		first_valid = {
			triggered_desc = {
			    trigger = {
					exists = scope:bully
			    }
			    desc = {
			    	desc = child_personality.101.desc
			    }
			}
			desc = child_personality.101.desc_no_bully
		}
		desc = child_personality.101.craven
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = sadness
	}
	right_portrait = {
		character = scope:bully
		animation = anger
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = lazy
					has_trait = diligent
				}
				OR = {
					has_trait = arbitrary
					has_trait = just
				}
			}
		}
	}

	option = {
		name = child_personality.101.confirm_craven
		custom_tooltip = child_personality.keeps_craven_tt
	}

	option = {
		name = child_personality.101.lazy_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = lazy
					has_trait = diligent
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = craven
			add_trait_force_tooltip = lazy
		}
	}

	option = {
		name = child_personality.101.arbitrary_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = arbitrary
					has_trait = just
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = craven
			add_trait_force_tooltip = arbitrary
		}
	}
}



#Child has become lazy
child_personality.1012 = {
	type = character_event
	title = child_personality.1012.t
	desc = {
		desc = my_ward_or_child
		first_valid = {
			triggered_desc = {
			    trigger = {
					exists = scope:bully
			    }
			    desc = {
			    	desc = child_personality.101.desc
			    }
			}
			desc = child_personality.101.desc_no_bully
		}
		desc = child_personality.101.lazy
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = shame
	}
	right_portrait = {
		character = scope:bully
		animation = anger
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = craven
					has_trait = brave
				}
				OR = {
					has_trait = arbitrary
					has_trait = just
				}
			}
		}
	}

	option = {
		name = child_personality.101.confirm_lazy
		custom_tooltip = child_personality.keeps_lazy_tt
	}

	option = {
		name = child_personality.101.craven_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = craven
					has_trait = brave
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = lazy
			add_trait_force_tooltip = craven
		}
	}

	option = {
		name = child_personality.101.arbitrary_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = arbitrary
					has_trait = just
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = lazy
			add_trait_force_tooltip = arbitrary
		}
	}
}


#Child has become arbitrary
child_personality.1013 = {
	type = character_event
	title = child_personality.1013.t
	desc = {
		desc = my_ward_or_child
		first_valid = {
			triggered_desc = {
			    trigger = {
					exists = scope:bully
			    }
			    desc = {
			    	desc = child_personality.101.desc
			    }
			}
			desc = child_personality.101.desc_no_bully
		}
		desc = child_personality.101.arbitrary
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_cynical
	}
	right_portrait = {
		character = scope:bully
		animation = anger
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = craven
					has_trait = brave
				}
				OR = {
					has_trait = lazy
					has_trait = diligent
				}
			}
		}
	}

	option = {
		name = child_personality.1013.confirm_arbitrary
		custom_tooltip = child_personality.keeps_arbitrary_tt
	}

	option = {
		name = child_personality.101.craven_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = craven
					has_trait = brave
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = arbitrary
			add_trait_force_tooltip = craven
		}
	}

	option = {
		name = child_personality.101.lazy_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = lazy
					has_trait = diligent
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = arbitrary
			add_trait_force_tooltip = lazy
		}
	}
}



#Responses to Arrogant, Compassionate or Callous
#0002

#Child has become arrogant
child_personality.1021 = {
	type = character_event
	title = child_personality.1021.t
	desc = {
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						exists = scope:court_location
					}
					desc = child_personality.102.desc_court_location
				}
				desc = child_personality.102.desc
			}
		}
		desc = child_personality.102.arrogant
	}
	theme = education
	override_background = {
		reference = gallows
	}
	left_portrait = {
		character = scope:child
		animation = dismissal
	}
	right_portrait = {
		character = root
		animation = worry
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = compassionate
					has_trait = callous
					has_trait = sadistic
				}
				OR = {
					has_trait = callous
					has_trait = compassionate
				}
			}
		}
	}

	immediate = {
		if = {
			limit = {
				exists = court_owner
				court_owner = {
					exists = capital_province
				}
			}
			court_owner = {
				capital_province = {
					barony = { save_scope_as = court_location }
				}
			}
		}
	}

	option = {
		name = child_personality.102.confirm_arrogant
		custom_tooltip = child_personality.keeps_arrogant_tt
	}

	option = {
		name = child_personality.102.compassionate_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = compassionate
					has_trait = callous
					has_trait = sadistic
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = arrogant
			add_trait_force_tooltip = compassionate
		}
	}

	option = {
		name = child_personality.102.callous_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = callous
					has_trait = compassionate
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = arrogant
			add_trait_force_tooltip = callous
		}
	}
}

#Child has become compassionate
child_personality.1022 = {
	type = character_event
	title = child_personality.1022.t
	desc = {
		desc = child_personality.102.desc
		desc = child_personality.102.compassionate
	}
	theme = education
	override_background = {
		reference = gallows
	}
	left_portrait = {
		character = scope:child
		animation = personality_compassionate
	}
	right_portrait = {
		character = root
		animation = personality_rational
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = arrogant
					has_trait = humble
				}
				OR = {
					has_trait = callous
					has_trait = sadistic
				}
			}
		}
	}

	option = {
		name = child_personality.102.confirm_compassionate
		custom_tooltip = child_personality.keeps_compassionate_tt
	}

	option = {
		name = child_personality.102.arrogant_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = arrogant
					has_trait = humble
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = compassionate
			add_trait_force_tooltip = arrogant
		}
	}

	option = {
		name = child_personality.102.callous_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = callous
					has_trait = sadistic
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = compassionate
			add_trait_force_tooltip = callous
		}
	}
}

#Child has become callous
child_personality.1023 = {
	type = character_event
	title = child_personality.1023.t
	desc = {
		desc = child_personality.102.desc
		desc = child_personality.102.callous
	}
	theme = education
	override_background = {
		reference = gallows
	}
	left_portrait = {
		character = scope:child
		animation = personality_callous
	}
	right_portrait = {
		character = root
		animation = worry
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = arrogant
					has_trait = humble
				}
				OR = {
					has_trait = sadistic
					has_trait = compassionate
				}
			}
		}
	}

	option = {
		name = child_personality.102.confirm_callous
		custom_tooltip = child_personality.keeps_callous_tt
	}
	option = {
		name = child_personality.102.arrogant_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = arrogant
					has_trait = humble
				}
			}
		}
		scope:child = {
			if = {
				limit = {
					NOT = { has_trait = arrogant }
				}
				add_trait = arrogant
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = callous
		}
	}
	option = {
		name = child_personality.102.compassionate_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = compassionate
					has_trait = sadistic
				}
			}
		}
		scope:child = {
			if = {
				limit = {
					NOT = { has_trait = compassionate }
				}
				add_trait = compassionate
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = callous
			add_trait_force_tooltip = compassionate
		}
	}
}


#Responses to Deceitful, Honest or Humble
#0003

#Child has become deceitful
child_personality.1031 = {
	type = character_event
	title = child_personality.1031.t
	desc = {
		desc = child_personality.103.desc
		desc = child_personality.103.deceitful
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_dishonorable
	}
	right_portrait = {
		character = scope:robbed_guest
		animation = anger
	}

	trigger = {
		scope:child = {
			NAND = {
				has_trait = honest
				OR = {
					has_trait = humble
					has_trait = arrogant
				}
			}
		}
	}

	option = {
		name = child_personality.103.confirm_deceitful
		custom_tooltip = child_personality.keeps_deceitful_tt
	}

	option = {
		name = child_personality.103.honest_change
		trigger = {
			scope:child = {
				NOT = { has_trait = honest }
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = deceitful
			add_trait_force_tooltip = honest
		}
	}

	option = {
		name = child_personality.103.humble_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = humble
					has_trait = arrogant
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = deceitful
			add_trait_force_tooltip = humble
		}
	}
}

#Child has become honest
child_personality.1032 = {
	type = character_event
	title = child_personality.1032.t
	desc = {
		desc = child_personality.103.desc
		desc = child_personality.103.honest
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_honorable
	}
	right_portrait = {
		character = scope:robbed_guest
		animation = anger
	}

	trigger = {
		scope:child = {
			NAND = {
				has_trait = deceitful
				OR = {
					has_trait = humble
					has_trait = arrogant
				}
			}
		}
	}

	option = {
		name = child_personality.103.confirm_honest
		custom_tooltip = child_personality.keeps_honest_tt
	}

	option = {
		name = child_personality.103.deceitful_change
		trigger = {
			NOT = {
				scope:child = { has_trait = deceitful }
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = honest
			add_trait_force_tooltip = deceitful
		}
	}

	option = {
		name = child_personality.103.humble_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = humble
					has_trait = arrogant
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = honest
			add_trait_force_tooltip = humble
		}
	}
}

#Child has become humble
child_personality.1033 = {
	type = character_event
	title = child_personality.1033.t
	desc = {
		desc = child_personality.103.desc
		desc = child_personality.103.humble
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_forgiving
	}
	right_portrait = {
		character = scope:robbed_guest
		animation = anger
	}

	trigger = {
		scope:child = {
			NOR = {
				has_trait = honest
				has_trait = deceitful
			}
		}
	}

	option = {
		name = child_personality.103.confirm_humble
		custom_tooltip = child_personality.keeps_humble_tt
	}

	option = {
		name = child_personality.103.deceitful_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = honest
					has_trait = deceitful
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = humble
			add_trait_force_tooltip = deceitful
		}
	}

	option = {
		name = child_personality.103.honest_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = deceitful
					has_trait = honest
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = humble
			add_trait_force_tooltip = honest
		}
	}
}


#Responses to Generous, Diligent or Patient
#0004

#Child has become generous
child_personality.1041 = {
	type = character_event
	title = child_personality.1041.t
	desc = {
		desc = child_personality.104.desc
		desc = child_personality.104.generous
	}
	theme = education
	override_background = {
		reference = armory
	}
	left_portrait = {
		character = scope:child
		animation = personality_honorable
	}
	right_portrait = {
		character = scope:knight
		animation = marshal
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = diligent
					has_trait = lazy
				}
				OR = {
					has_trait = patient
					has_trait = impatient
				}
			}
		}
	}
	
	immediate = {
		random_knight = { # Just for flavor
			limit = {
				is_available_ai_adult = yes
				is_courtier = yes
			}
			save_scope_as = knight
		}
	}

	option = {
		name = child_personality.104.confirm_generous
		custom_tooltip = child_personality.keeps_generous_tt
	}

	option = {
		name = child_personality.104.diligent_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = diligent
					has_trait = lazy
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = generous
			add_trait_force_tooltip = diligent
		}
	}

	option = {
		name = child_personality.104.patient_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = patient
					has_trait = impatient
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = generous
			add_trait_force_tooltip = patient
		}
	}
}

#Child has become diligent
child_personality.1042 = {
	type = character_event
	title = child_personality.1042.t
	desc = {
		desc = child_personality.104.desc
		desc = child_personality.104.diligent
	}
	theme = education
	override_background = {
		reference = armory
	}
	left_portrait = {
		character = scope:child
		animation = personality_honorable
	}
	right_portrait = {
		character = scope:knight
		animation = marshal
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = generous
					has_trait = greedy
				}
				OR = {
					has_trait = patient
					has_trait = impatient
				}
			}
		}
	}
	
	immediate = {
		random_courtier = {
			limit = {
				is_physically_able = yes
				is_knight = yes
			}
			save_scope_as = knight
		}
	}

	option = {
		name = child_personality.104.confirm_diligent
		custom_tooltip = child_personality.keeps_diligent_tt
	}

	option = {
		name = child_personality.104.generous_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = generous
					has_trait = greedy
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = diligent
			add_trait_force_tooltip = generous
		}
	}

	option = {
		name = child_personality.104.patient_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = patient
					has_trait = impatient
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = diligent
			add_trait_force_tooltip = patient
		}
	}
}

#Child has become patient
child_personality.1043 = {
	type = character_event
	title = child_personality.1043.t
	desc = {
		desc = child_personality.104.desc
		desc = child_personality.104.patient
	}
	theme = education
	override_background = {
		reference = armory
	}
	left_portrait = {
		character = scope:child
		animation = personality_honorable
	}
	right_portrait = {
		character = scope:knight
		animation = marshal
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = generous
					has_trait = greedy
				}
				OR = {
					has_trait = diligent
					has_trait = lazy
				}
			}
		}
	}

	option = {
		name = child_personality.104.confirm_patient
		custom_tooltip = child_personality.keeps_patient_tt
	}

	option = {
		name = child_personality.104.generous_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = generous
					has_trait = greedy
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = patient
			add_trait_force_tooltip = generous
		}
	}

	option = {
		name = child_personality.104.diligent_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = diligent
					has_trait = lazy
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = patient
			add_trait_force_tooltip = diligent
		}
	}
}





#Responses to Wrathful, Forgiving or Fickle
#0005

#Child has become wrathful
child_personality.1051 = {
	type = character_event
	title = child_personality.1051.t
	desc = {
		desc = child_personality.105.desc
		desc = child_personality.105.wrathful
	}
	theme = education
	override_background = {
		reference = courtyard
	}
	left_portrait = {
		character = scope:child
		animation = anger
	}
	right_portrait = {
		character = scope:doing_push
		animation = personality_vengeful
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = forgiving
					has_trait = vengeful
				}
				OR = {
					has_trait = fickle
					has_trait = stubborn
				}
			}
		}
	}

	option = {
		name = child_personality.105.confirm_wrathful
		custom_tooltip = child_personality.keeps_wrathful_tt
	}

	option = {
		name = child_personality.105.forgiving_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = forgiving
					has_trait = vengeful
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = wrathful
			add_trait_force_tooltip = forgiving
		}
	}

	option = {
		name = child_personality.105.fickle_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = fickle
					has_trait = stubborn
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = wrathful
			add_trait_force_tooltip = fickle
		}
	}
}

#Child has become forgiving
child_personality.1052 = {
	type = character_event
	title = child_personality.1052.t
	desc = {
		desc = child_personality.105.desc
		desc = child_personality.105.forgiving
	}
	theme = education
	override_background = {
		reference = courtyard
	}
	left_portrait = {
		character = scope:child
		animation = personality_forgiving
	}
	right_portrait = {
		character = scope:doing_push
		animation = personality_vengeful
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = wrathful
					has_trait = calm
				}
				OR = {
					has_trait = fickle
					has_trait = stubborn
				}
			}
		}
	}

	option = {
		name = child_personality.105.confirm_forgiving
		custom_tooltip = child_personality.keeps_forgiving_tt
	}

	option = {
		name = child_personality.105.wrathful_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = wrathful
					has_trait = calm
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = forgiving
			add_trait_force_tooltip = wrathful
		}
	}

	option = {
		name = child_personality.105.fickle_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = fickle
					has_trait = stubborn
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = forgiving
			add_trait_force_tooltip = fickle
		}
	}
}

#Child has become fickle
child_personality.1053 = {
	type = character_event
	title = child_personality.1053.t
	desc = {
		desc = child_personality.105.desc
		desc = child_personality.105.fickle
	}
	theme = education
	override_background = {
		reference = courtyard
	}
	left_portrait = {
		character = scope:child
		animation = personality_irrational
	}
	right_portrait = {
		character = scope:doing_push
		animation = personality_vengeful
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = wrathful
					has_trait = calm
				}
				OR = {
					has_trait = forgiving
					has_trait = vengeful
				}
			}
		}
	}

	option = {
		name = child_personality.105.confirm_fickle
		custom_tooltip = child_personality.keeps_fickle_tt
	}

	option = {
		name = child_personality.105.wrathful_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = wrathful
					has_trait = calm
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = fickle
			add_trait_force_tooltip = wrathful
		}
	}

	option = {
		name = child_personality.105.forgiving_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = forgiving
					has_trait = vengeful
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = fickle
			add_trait_force_tooltip = forgiving
		}
	}
}





#Responses to Vengeful, Chaste or Stubborn
#0006

#Child has become vengeful
child_personality.1061 = {
	type = character_event
	title = child_personality.1061.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.106.desc
		desc = child_personality.106.vengeful
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_vengeful
	}
	right_portrait = {
		character = scope:crush
		animation = dismissal
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = chaste
					has_trait = lustful
				}
				OR = {
					has_trait = stubborn
					has_trait = fickle
				}
			}
		}
	}

	option = {
		name = child_personality.106.confirm_vengeful
		custom_tooltip = child_personality.keeps_vengeful_tt
	}

	option = {
		name = child_personality.106.chaste_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = chaste
					has_trait = lustful
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = vengeful
			add_trait_force_tooltip = chaste
		}
	}

	option = {
		name = child_personality.106.vengeful_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = stubborn
					has_trait = fickle
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = vengeful
			add_trait_force_tooltip = stubborn
		}
	}
}

#Child has become chaste
child_personality.1062 = {
	type = character_event
	title = child_personality.1062.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.106.desc
		desc = child_personality.106.chaste
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_coward
	}
	right_portrait = {
		character = scope:crush
		animation = dismissal
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = vengeful
					has_trait = forgiving
				}
				OR = {
					has_trait = stubborn
					has_trait = fickle
				}
			}
		}
	}

	option = {
		name = child_personality.106.confirm_chaste
		custom_tooltip = child_personality.keeps_chaste_tt
	}

	option = {
		name = child_personality.106.vengeful_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = vengeful
					has_trait = forgiving
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = chaste
			add_trait_force_tooltip = vengeful
		}
	}

	option = {
		name = child_personality.106.stubborn_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = stubborn
					has_trait = fickle
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = chaste
			add_trait_force_tooltip = stubborn
		}
	}
}

#Child has become stubborn
child_personality.1063 = {
	type = character_event
	title = child_personality.1063.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.106.desc
		desc = child_personality.106.stubborn
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_irrational
	}
	right_portrait = {
		character = scope:crush
		animation = dismissal
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = vengeful
					has_trait = forgiving
				}
				OR = {
					has_trait = chaste
					has_trait = lustful
				}
			}
		}
	}

	option = {
		name = child_personality.106.confirm_stubborn
		custom_tooltip = child_personality.keeps_stubborn_tt
	}

	option = {
		name = child_personality.106.vengeful_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = vengeful
					has_trait = forgiving
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = stubborn
			add_trait_force_tooltip = vengeful
		}
	}

	option = {
		name = child_personality.106.chaste_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = chaste
					has_trait = lustful
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = stubborn
			add_trait_force_tooltip = chaste
		}
	}
}





#Responses to Just, Cynical or Temperate
#0007

#Child has become just
child_personality.1071 = {
	type = character_event
	title = child_personality.1071.t
	desc = {
		desc = child_personality.107.desc
		desc = child_personality.107.just
	}
	theme = education
	override_background = { reference = gallows }
	left_portrait = {
		character = scope:child
		animation = disapproval
	}
	right_portrait = {
		character = root
		animation = personality_rational
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = cynical
					has_trait = trusting
				}
				OR = {
					has_trait = temperate
					has_trait = gluttonous
				}
			}
		}
	}

	option = {
		name = child_personality.107.confirm_just
		custom_tooltip = child_personality.keeps_just_tt
	}

	option = {
		name = child_personality.107.cynical_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = cynical
					has_trait = trusting
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = just
			add_trait_force_tooltip = cynical
		}
	}

	option = {
		name = child_personality.107.temperate_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = temperate
					has_trait = gluttonous
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = just
			add_trait_force_tooltip = temperate
		}
	}
}

#Child has become cynical
child_personality.1072 = {
	type = character_event
	title = child_personality.1072.t
	desc = {
		desc = child_personality.107.desc
		desc = child_personality.107.cynical
	}
	theme = education
	override_background = { reference = gallows }
	left_portrait = {
		character = scope:child
		animation = personality_cynical
	}
	right_portrait = {
		character = root
		animation = personality_rational
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = just
					has_trait = arbitrary
				}
				OR = {
					has_trait = temperate
					has_trait = gluttonous
				}
			}
		}
	}

	option = {
		name = child_personality.107.confirm_cynical
		custom_tooltip = child_personality.keeps_cynical_tt
	}

	option = {
		name = child_personality.107.just_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = just
					has_trait = arbitrary
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = cynical
			add_trait_force_tooltip = just
		}
	}

	option = {
		name = child_personality.107.temperate_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = temperate
					has_trait = gluttonous
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = cynical
			add_trait_force_tooltip = temperate
		}
	}
}

#Child has become temperate
child_personality.1073 = {
	type = character_event
	title = child_personality.1073.t
	desc = {
		desc = child_personality.107.desc
		desc = child_personality.107.temperate
	}
	theme = education
	override_background = { reference = gallows }
	left_portrait = {
		character = scope:child
		animation = personality_compassionate
	}
	right_portrait = {
		character = root
		animation = personality_rational
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = just
					has_trait = arbitrary
				}
				OR = {
					has_trait = cynical
					has_trait = trusting
				}
			}
		}
	}

	option = {
		name = child_personality.107.confirm_temperate
		custom_tooltip = child_personality.keeps_temperate_tt
	}

	option = {
		name = child_personality.107.just_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = just
					has_trait = arbitrary
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = temperate
			add_trait_force_tooltip = just
		}
	}

	option = {
		name = child_personality.107.cynical_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = cynical
					has_trait = trusting
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = temperate
			add_trait_force_tooltip = cynical
		}
	}
}





#Responses to Greedy, Gregarious or Lustful
#0008

#Child has become greedy
child_personality.1081 = {
	type = character_event
	title = child_personality.1081.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.108.desc
		desc = child_personality.108.greedy
	}
	theme = education
	override_background = { reference = feast }
	left_portrait = {
		character = scope:child
		animation = personality_greedy
	}
	right_portrait = {
		character = root
		animation = happiness
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = gregarious
					has_trait = shy
				}
				OR = {
					has_trait = lustful
					has_trait = chaste
					has_sexuality = asexual
				}
			}
		}
	}

	option = {
		name = child_personality.108.confirm_greedy
		custom_tooltip = child_personality.keeps_greedy_tt
	}

	option = {
		name = child_personality.108.gregarious_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = gregarious
					has_trait = shy
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = greedy
			add_trait_force_tooltip = gregarious
		}
	}

	option = {
		name = child_personality.108.lustful_change
		trigger = {
			scope:child = {
				NOR = {
					has_sexuality = asexual
					has_trait = lustful
					has_trait = chaste
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = greedy
			add_trait_force_tooltip = lustful
		}
	}
}

#Child has become gregarious
child_personality.1082 = {
	type = character_event
	title = child_personality.1082.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.108.desc
		desc = child_personality.108.gregarious
	}
	theme = education
	override_background = { reference = feast }
	left_portrait = {
		character = scope:child
		animation = personality_compassionate
	}
	right_portrait = {
		character = root
		animation = happiness
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = greedy
					has_trait = temperate
				}
				OR = {
					has_trait = lustful
					has_trait = chaste
					has_sexuality = asexual
				}
			}
		}
	}

	option = {
		name = child_personality.108.confirm_gregarious
		custom_tooltip = child_personality.keeps_gregarious_tt
	}

	option = {
		trigger = {
			scope:child = {
				NOR = {
					has_trait = greedy
					has_trait = temperate
				}
			}
		}
		name = child_personality.108.greedy_change
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = gregarious
			add_trait_force_tooltip = greedy
		}
	}

	option = {
		name = child_personality.108.lustful_change
		trigger = {
			scope:child = {
				NOR = {
					has_sexuality = asexual
					has_trait = lustful
					has_trait = chaste
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = gregarious
			add_trait_force_tooltip = lustful
		}
	}
}

#Child has become lustful
child_personality.1083 = {
	type = character_event
	title = child_personality.1083.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.108.desc
		desc = child_personality.108.lustful
	}
	theme = education
	override_background = { reference = feast }
	left_portrait = {
		character = scope:child
		animation = personality_irrational
	}
	right_portrait = {
		character = root
		animation = happiness
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = greedy
					has_trait = generous
				}
				OR = {
					has_trait = gregarious
					has_trait = shy
				}
			}
		}
	}

	option = {
		name = child_personality.108.confirm_lustful
		custom_tooltip = child_personality.keeps_lustful_tt
	}

	option = {
		name = child_personality.108.greedy_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = greedy
					has_trait = generous
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = lustful
			add_trait_force_tooltip = greedy
		}
	}

	option = {
		name = child_personality.108.gregarious_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = gregarious
					has_trait = shy
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = lustful
			add_trait_force_tooltip = gregarious
		}
	}
}





#Responses to Brave, Calm or Zealous
#0009

#Child has become brave
child_personality.1091 = {
	type = character_event
	title = child_personality.1091.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:child_preacher
				}
				desc = child_personality.109.desc
			}
			desc = child_personality.109.desc_fallback
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:child_preacher
				}
				desc = child_personality.109.brave
			}
			desc = child_personality.109.brave_fallback
		}
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_bold
	}
	right_portrait = {
		character = scope:child_preacher
		animation = personality_coward
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = calm
					has_trait = wrathful
				}
				OR = {
					has_trait = zealous
					has_trait = cynical
				}
			}
		}
	}

	option = {
		name = child_personality.109.confirm_brave
		custom_tooltip = child_personality.keeps_brave_tt
	}

	option = {
		name = child_personality.109.calm_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = calm
					has_trait = wrathful
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = brave
			add_trait_force_tooltip = calm
		}
	}

	option = {
		name = child_personality.109.zealous_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = zealous
					has_trait = cynical
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = brave
			add_trait_force_tooltip = zealous
		}
	}
}

#Child has become calm
child_personality.1092 = {
	type = character_event
	title = child_personality.1092.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:child_preacher
				}
				desc = child_personality.109.desc
			}
			desc = child_personality.109.desc_fallback
		}
		desc = child_personality.109.calm
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_compassionate
	}
	right_portrait = {
		character = scope:child_preacher
		animation = personality_coward
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = brave
					has_trait = craven
				}
				OR = {
					has_trait = zealous
					has_trait = cynical
				}
			}
		}
	}

	option = {
		name = child_personality.109.confirm_calm
		custom_tooltip = child_personality.keeps_calm_tt
	}

	option = {
		name = child_personality.109.brave_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = brave
					has_trait = craven
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = calm
			add_trait_force_tooltip = brave
		}
	}

	option = {
		name = child_personality.109.zealous_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = zealous
					has_trait = cynical
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = calm
			add_trait_force_tooltip = zealous
		}
	}
}

#Child has become zealous
child_personality.1093 = {
	type = character_event
	title = child_personality.1093.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:child_preacher
				}
				desc = child_personality.109.desc
			}
			desc = child_personality.109.desc_fallback
		}
		desc = child_personality.109.zealous
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = rage
	}
	right_portrait = {
		character = scope:child_preacher
		animation = personality_coward
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = brave
					has_trait = craven
				}
				OR = {
					has_trait = calm
					has_trait = wrathful
				}
			}
		}
	}

	option = {
		name = child_personality.109.confirm_zealous
		custom_tooltip = child_personality.keeps_zealous_tt
	}

	option = {
		name = child_personality.109.brave_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = brave
					has_trait = craven
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = zealous
			add_trait_force_tooltip = brave
		}
	}

	option = {
		name = child_personality.109.calm_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = calm
					has_trait = wrathful
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = zealous
			add_trait_force_tooltip = calm
		}
	}
}





#Responses to Ambitious, Sadistic or Paranoid
#0010

#Child has become ambitious
child_personality.1101 = {
	type = character_event
	title = child_personality.1101.t
	desc = {
		desc = child_personality.110.desc
		desc = child_personality.110.ambitious
	}
	theme = education
	override_background = {
		reference = terrain
	}
	left_portrait = {
		character = scope:child
		animation = personality_bold
	}
	right_portrait = {
		character = root
		animation = personality_rational
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = sadistic
					has_trait = compassionate
					has_trait = callous
				}
				OR = {
					has_trait = paranoid
					has_trait = trusting
				}
			}
		}
	}

	option = {
		name = child_personality.110.confirm_ambitious
		custom_tooltip = child_personality.keeps_ambitious_tt
	}

	option = {
		name = child_personality.110.sadistic_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = sadistic
					has_trait = compassionate
					has_trait = callous
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = ambitious
			add_trait_force_tooltip = sadistic
		}
	}

	option = {
		name = child_personality.110.paranoid_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = paranoid
					has_trait = trusting
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = ambitious
			add_trait_force_tooltip = paranoid
		}
	}
}

#Child has become sadistic
child_personality.1102 = {
	type = character_event
	title = child_personality.1102.t
	desc = {
		desc = child_personality.110.desc
		desc = child_personality.110.sadistic
	}
	theme = education
	override_background = {
		reference = terrain
	}
	
	left_portrait = {
		character = scope:child
		animation = happiness
	}
	right_portrait = {
		character = root
		animation = worry
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = ambitious
					has_trait = content
				}
				OR = {
					has_trait = paranoid
					has_trait = trusting
				}
			}
		}
	}

	option = {
		name = child_personality.110.confirm_sadistic
		custom_tooltip = child_personality.keeps_sadistic_tt
	}

	option = {
		name = child_personality.110.ambitious_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = ambitious
					has_trait = content
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = sadistic
			add_trait_force_tooltip = ambitious
		}
	}

	option = {
		name = child_personality.110.paranoid_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = paranoid
					has_trait = trusting
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = sadistic
			add_trait_force_tooltip = paranoid
		}
	}
}

#Child has become paranoid
child_personality.1103 = {
	type = character_event
	title = child_personality.1103.t
	desc = {
		desc = child_personality.110.desc
		desc = child_personality.110.paranoid
	}
	theme = education
	override_background = {
		reference = terrain
	}
	
	left_portrait = {
		character = scope:child
		animation = paranoia
	}
	right_portrait = {
		character = root
		animation = worry
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = ambitious
					has_trait = content
				}
				OR = {
					has_trait = sadistic
					has_trait = compassionate
					has_trait = callous
				}
			}
		}
	}

	option = {
		name = child_personality.110.confirm_paranoid
		custom_tooltip = child_personality.keeps_paranoid_tt
	}

	option = {
		name = child_personality.110.ambitious_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = ambitious
					has_trait = content
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = paranoid
			add_trait_force_tooltip = ambitious
		}
	}

	option = {
		name = child_personality.110.sadistic_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = sadistic
					has_trait = compassionate
					has_trait = callous
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = paranoid
			add_trait_force_tooltip = sadistic
		}
	}
}





#Responses to Content, Fickle or Trusting
#0011

#Child has become content
child_personality.1111 = {
	type = character_event
	title = child_personality.1111.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.111.desc
		desc = child_personality.111.content
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_content
	}
	right_portrait = {
		character = root
		animation = stress
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = fickle
					has_trait = stubborn
				}
				OR = {
					has_trait = trusting
					has_trait = paranoid
				}
			}
		}
	}

	option = {
		name = child_personality.111.confirm_content
		custom_tooltip = child_personality.keeps_content_tt
	}

	option = {
		name = child_personality.111.fickle_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = fickle
					has_trait = stubborn
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = content
			add_trait_force_tooltip = fickle
		}
	}

	option = {
		name = child_personality.111.trusting_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = trusting
					has_trait = paranoid
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = content
			add_trait_force_tooltip = trusting
		}
	}
}

#Child has become fickle
child_personality.1112 = {
	type = character_event
	title = child_personality.1112.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.111.desc
		desc = child_personality.111.fickle
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_irrational
	}
	right_portrait = {
		character = root
		animation = stress
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = content
					has_trait = ambitious
				}
				OR = {
					has_trait = trusting
					has_trait = paranoid
				}
			}
		}
	}

	option = {
		name = child_personality.111.confirm_fickle
		custom_tooltip = child_personality.keeps_fickle_tt
	}

	option = {
		name = child_personality.111.content_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = content
					has_trait = ambitious
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = fickle
			add_trait_force_tooltip = content
		}
	}

	option = {
		name = child_personality.111.trusting_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = trusting
					has_trait = paranoid
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = fickle
			add_trait_force_tooltip = trusting
		}
	}
}

#Child has become trusting
child_personality.1113 = {
	type = character_event
	title = child_personality.1113.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.111.desc
		desc = child_personality.111.trusting
	}
	theme = education
	left_portrait = {
		character = scope:child
		animation = personality_content
	}
	right_portrait = {
		character = root
		animation = happiness
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = content
					has_trait = ambitious
				}
				OR = {
					has_trait = fickle
					has_trait = stubborn
				}
			}
		}
	}

	option = {
		name = child_personality.111.confirm_trusting
		custom_tooltip = child_personality.keeps_trusting_tt
	}

	option = {
		name = child_personality.111.content_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = content
					has_trait = ambitious
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = trusting
			add_trait_force_tooltip = content
		}
	}

	option = {
		name = child_personality.111.fickle_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = fickle
					has_trait = stubborn
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = trusting
			add_trait_force_tooltip = fickle
		}
	}
}





#Responses to Impatient, Shy or Gluttonous
#0012

#Child has become impatient
child_personality.1121 = {
	type = character_event
	title = child_personality.1121.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.112.desc
		desc = child_personality.112.impatient
	}
	theme = education
	override_background = { reference = feast }
	left_portrait = {
		character = scope:child
		animation = personality_callous
	}
	right_portrait = {
		character = root
		animation = disapproval
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = shy
					has_trait = gregarious
				}
				OR = {
					has_trait = gluttonous
					has_trait = temperate
				}
			}
		}
	}

	option = {
		name = child_personality.112.confirm_impatient
		custom_tooltip = child_personality.keeps_impatient_tt
	}

	option = {
		name = child_personality.112.shy_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = shy
					has_trait = gregarious
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = impatient
			add_trait_force_tooltip = shy
		}
	}

	option = {
		name = child_personality.112.gluttonous_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = gluttonous
					has_trait = temperate
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = impatient
			add_trait_force_tooltip = gluttonous
		}
	}
}

#Child has become shy
child_personality.1122 = {
	type = character_event
	title = child_personality.1122.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.112.desc
		desc = child_personality.112.shy
	}
	theme = education
	
	override_background = { reference = feast }
	left_portrait = {
		character = scope:child
		animation = worry
	}
	right_portrait = {
		character = root
		animation = disapproval
	}

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = impatient
					has_trait = patient
				}
				OR = {
					has_trait = gluttonous
					has_trait = temperate
				}
			}
		}
	}

	option = {
		name = child_personality.112.confirm_shy
		custom_tooltip = child_personality.keeps_shy_tt
	}

	option = {
		name = child_personality.112.impatient_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = impatient
					has_trait = patient
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = shy
			add_trait_force_tooltip = impatient
		}
	}

	option = {
		name = child_personality.112.gluttonous_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = gluttonous
					has_trait = temperate
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = shy
			add_trait_force_tooltip = gluttonous
		}
	}
}

#Child has become gluttonous
child_personality.1123 = {
	type = character_event
	title = child_personality.1123.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.112.desc
		desc = child_personality.112.gluttonous
	}
	theme = education
	
	override_background = { reference = feast }
	left_portrait = {
		character = scope:child
		animation = personality_greedy
	}
	right_portrait = {
		character = root
		animation = disapproval
	}
	

	trigger = {
		scope:child = {
			NAND = {
				OR = {
					has_trait = impatient
					has_trait = patient
				}
				OR = {
					has_trait = shy
					has_trait = gregarious
				}
			}
		}
	}

	option = {
		name = child_personality.112.confirm_gluttonous
		custom_tooltip = child_personality.keeps_gluttonous_tt
	}

	option = {
		name = child_personality.112.impatient_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = impatient
					has_trait = patient
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = gluttonous
			add_trait_force_tooltip = impatient
		}
	}

	option = {
		name = child_personality.112.shy_change
		trigger = {
			scope:child = {
				NOR = {
					has_trait = shy
					has_trait = gregarious
				}
			}
		}
		ai_chance = {
			base = 0
		}
		stress_impact = {
			base = child_trait_change_stress_penalty
		}
		scope:child = {
			remove_trait = gluttonous
			add_trait_force_tooltip = shy
		}
	}
}













######
# OTHER EVENTS
# 2000-2999
######

#Bully: Victim is good at hiding
child_personality.2001 = {
	type = character_event
	title = child_personality.2001.t
	desc = {
		desc = child_personality.2001.desc
		desc = child_personality.2001.craven
	}
	theme = unfriendly
	left_portrait = {
		character = scope:child
		animation = personality_coward
	}

	option = {
		name = child_personality.2001.a
		if = {
			limit = {
				NOT = {
					any_relation = { type = victim this = scope:child }
				}
			}
			set_relation_victim = scope:child
		}
	}
}


#Bully: Victim is lazy
child_personality.2002 = {
	type = character_event
	title = child_personality.2002.t
	desc = {
		desc = child_personality.2001.desc
		desc = child_personality.2002.lazy
	}
	theme = unfriendly
	left_portrait = scope:child

	option = {
		name = child_personality.2002.a
		if = {
			limit = {
				NOT = {
					any_relation = { type = victim this = scope:child }
				}
			}
			set_relation_victim = scope:child
		}
	}
}


#Bully: Victim takes outsized revenge
child_personality.2003 = {
	type = character_event
	title = child_personality.2003.t
	desc = {
		desc = child_personality.2001.desc
		desc = child_personality.2003.arbitrary
	}
	theme = unfriendly
	left_portrait = {
		character = scope:child
		animation = anger
	}

	option = {
		name = child_personality.2003.a
		if = {
			limit = {
				NOT = { has_relation_bully = scope:child }
			}
			set_relation_bully = scope:child
		}
		if = {
			limit = {
				has_relation_friend = scope:child
			}
			remove_relation_friend = scope:child
		}
		if = {
			limit = {
				NOT = { has_relation_victim = scope:child }
			}
			set_relation_victim = scope:child
		}
	}
}


#You become friends with child from playing
child_personality.2004 = {
	type = character_event
	title = child_personality.2004.t
	desc = child_personality.2004.desc
	theme = friendly
	right_portrait = {
		character = scope:child
		animation = happiness
	}

	option = {
		name = child_personality.2004.a
		if = {
			limit = {
				can_set_relation_friend_trigger = { CHARACTER = scope:child }
				NOT = {
					scope:child = root
				}
			}
			set_relation_friend = { reason = friend_playing_children target = scope:child }
		}
	}
}


#Someone with a crush on you stays insistent after rejection
child_personality.2005 = {
	type = character_event
	title = child_personality.2005.t
	desc = child_personality.2005.desc
	theme = unfriendly
	left_portrait = scope:child

	option = {
		name = child_personality.2005.a #Oh give it up already
		add_opinion = {
			target = scope:child
			modifier = bothersome_crush_on_me_opinion
		}
	}

	option = {
		name = child_personality.2005.b #That's cute
		add_opinion = {
			target = scope:child
			modifier = charming_crush_on_me_opinion
		}
	}

	option = {
		name = child_personality.2005.c #Who exactly?
	}
}


#A Child preacher is befriended by child
child_personality.2006 = {
	type = character_event
	title = child_personality.2006.t
	desc = {
		desc = child_personality.2006.opening
		first_valid = {
			triggered_desc = {
				trigger = { has_relation_bully = scope:child }
				desc = child_personality.2006.bully
			}
			triggered_desc = {
				trigger = { has_relation_victim = scope:child }
				desc = child_personality.2006.victim
			}
			desc = child_personality.2006.desc
		}
	}
	theme = friendly
	left_portrait = {
		character = scope:child
		animation = personality_bold
	}

	option = {
		name = child_personality.2006.a
		if = {
			limit = {
				can_set_relation_friend_trigger = { CHARACTER = scope:child }
			}
			if = {
				limit = {
					has_relation_victim = scope:child
				}
				remove_relation_victim = scope:child
			}
			if = {
				limit = {
					has_relation_bully = scope:child
				}
				remove_relation_bully = scope:child
			}
			set_relation_friend = { reason = friend_saved_as_children target = scope:child }
		}
	}
}


#Bully gets beaten up by child while mocking child_preacher
child_personality.2007 = {
	type = character_event
	title = child_personality.2007.t
	desc = child_personality.2007.desc
	theme = education
	left_portrait = {
		character = scope:child
		animation = rage
	}
	right_portrait = {
		character = scope:child_preacher
		animation = personality_coward
	}

	option = {
		name = child_personality.2007.a
		increase_wounds_effect = { REASON = fight }
	}
}




######
# PERSONALITY ASSIGNMENT EVENTS
# 3000-3999
######

#Randomizes childhood personality
child_personality.3000 = {
	type = character_event
	hidden = yes

	trigger = { 
		age = 3 
		any_character_trait = {
			has_trait_category = childhood
			count = 0
		}
	}
	
	immediate = {
		#Finds a character for descs
		if = {
			limit = { any_relation = { type = guardian always = yes } }
			random_relation = { type = guardian save_scope_as = guardian }
		}

		else_if = {
			limit = { any_parent = { is_alive = yes } }
			random_parent = { save_scope_as = guardian }
		}
		
		else_if = {
			limit = {
				exists = host
			}
			host = { random_courtier = { save_scope_as = guardian } }
		}

		random_list = {
			20 = { # Curious
				modifier = {
					factor = 1.5
					
					OR = {
						AND = {
							is_landed = no
							exists = liege
							liege = { has_government = republic_government }
						}
						AND = {
							is_landed = yes
							has_government = republic_government
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_trait = fickle
							has_trait = arbitrary
							has_trait = cynical
							has_trait = diligent
							has_trait = ambitious
							has_trait = greedy
							has_trait = shy
							has_trait = eccentric
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_education_diplomacy_trigger = yes
							has_education_learning_trigger = yes
						}
					}
				}
				modifier = {
					factor = 0.5
					
					any_parent = {
						has_education_martial_trigger = yes
					}
				}
				modifier = {
					factor = 1.5
					
					any_sibling = {
						has_trait = curious
					}
				}
				modifier = {	#court.6050
					factor = 2
					OR = {
						any_parent = { has_character_flag = supported_indecent_books }
						warden ?= { has_character_flag = supported_indecent_books }
						any_relation = {
							type = guardian
							exists = this
							has_character_flag = supported_indecent_books
						}
						AND = {
							liege ?= { has_character_flag = supported_indecent_books }
							location = liege.location
						}
					}
				}
				
				trigger_event = child_personality.3001
			}
			20 = { # Rowdy
				modifier = {
					factor = 1.5
					
					OR = {
						AND = {
							is_landed = no
							exists = liege
							liege = { has_government = tribal_government }
						}
						AND = {
							is_landed = yes
							has_government = tribal_government
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_trait = brave
							has_trait = wrathful
							has_trait = impatient
							has_trait = gluttonous
							has_trait = sadistic
							has_trait = honest
							has_trait = trusting
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_education_martial_trigger = yes
							has_education_intrigue_trigger = yes
						}
					}
				}
				modifier = {
					factor = 0.5
					
					any_parent = {
						has_education_learning_trigger = yes
					}
				}
				modifier = {
					factor = 1.5
					
					any_sibling = {
						has_trait = rowdy
					}
				}
				modifier = {
					factor = 3
					culture = {
						has_cultural_parameter = rowdy_trait_more_common
					}
				}
				modifier = {
					factor = 0.33
					culture = {
						has_cultural_parameter = rowdy_trait_less_common
					}
				}
				
				trigger_event = child_personality.3003
			}
			20 = { # Bossy
				modifier = {
					factor = 1.5
					
					OR = {
						AND = {
							is_landed = no
							exists = liege
							liege = { has_government = feudal_government }
						}
						AND = {
							is_landed = yes
							has_government = feudal_government
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_trait = zealous
							has_trait = stubborn
							has_trait = vengeful
							has_trait = deceitful
							has_trait = arrogant
							has_trait = paranoid
							has_trait = callous
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_education_martial_trigger = yes
							has_education_stewardship_trigger = yes
						}
					}
				}
				modifier = {
					factor = 0.5
					
					any_parent = {
						has_education_diplomacy_trigger = yes
					}
				}
				modifier = {
					factor = 1.5
					
					any_sibling = {
						has_trait = bossy
					}
				}
				
				trigger_event = child_personality.3005
			}
			20 = { # Charming
				modifier = {
					factor = 1.5
					
					OR = {
						AND = {
							is_landed = no
							exists = liege
							liege = { has_government = clan_government }
						}
						AND = {
							is_landed = yes
							has_government = clan_government
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_trait = forgiving
							has_trait = generous
							has_trait = gregarious
							has_trait = compassionate
							has_trait = craven
							has_trait = lustful
							has_trait = lazy
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_education_diplomacy_trigger = yes
							has_education_intrigue_trigger = yes
						}
					}
				}
				modifier = {
					factor = 0.5
					
					any_parent = {
						has_education_stewardship_trigger = yes
					}
				}
				modifier = {
					factor = 1.5
					
					any_sibling = {
						has_trait = charming
					}
				}
				modifier = {
					factor = 3
					culture = {
						has_cultural_parameter = charming_trait_more_common
					}
				}
				
				trigger_event = child_personality.3007
			}
			20 = { # Pensive
				modifier = {
					factor = 1.5
					
					OR = {
						AND = {
							is_landed = no
							exists = liege
							liege = { has_government = theocracy_government }
						}
						AND = {
							is_landed = yes
							has_government = theocracy_government
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_trait = calm
							has_trait = chaste
							has_trait = content
							has_trait = humble
							has_trait = just
							has_trait = patient
							has_trait = temperate
							has_trait = eccentric
						}
					}
				}
				modifier = {
					factor = 1.5
					
					any_parent = {
						OR = {
							has_education_stewardship_trigger = yes
							has_education_learning_trigger = yes
						}
					}
				}
				modifier = {
					factor = 0.5
					
					any_parent = {
						has_education_intrigue_trigger = yes
					}
				}
				modifier = {
					factor = 1.5
					
					any_sibling = {
						has_trait = pensive
					}
				}
				modifier = {
					factor = 3
					culture = {
						has_cultural_parameter = pensive_trait_more_common
					}
				}
				modifier = {
					factor = 0.33
					culture = {
						has_cultural_parameter = pensive_trait_less_common
					}
				}
				modifier = {	#court.6050
					factor = 2
					OR = {
						any_parent = { has_character_flag = burned_indecent_books }
						warden ?= { has_character_flag = burned_indecent_books }
						any_relation = {
							type = guardian
							exists = this
							has_character_flag = burned_indecent_books
						}
						AND = {
							liege ?= { has_character_flag = burned_indecent_books }
							location = liege.location
						}
					}
				}
				
				trigger_event = child_personality.3009
			}
		}
	}
}

#Assign childhood personality Curious
child_personality.3001 = {
	type = character_event
	title = child_personality.3001.t
	desc = child_personality.3001.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_irrational
	}

	immediate = { save_scope_as = personality_child }
	
	option = {
		name = child_personality.3001.a
		add_trait = curious
	}

	after = {
		hidden_effect = {
			childhood_groomed_to_rule_skill_gain_effect = yes
			send_event_about_player_heir_childhood_personality_effect = { ID = 3002 }
		}
	}
}

#Notification about player heir becoming Curious
child_personality.3002 = {
	type = character_event
	title = child_personality.3001.t
	desc = child_personality.3002.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_irrational
	}
	
	option = {
		name = child_personality.3002.a
		
		show_as_tooltip = { scope:personality_child = { add_trait_force_tooltip = curious } }
	}
}


#Assign childhood trait rowdy
child_personality.3003 = {
	type = character_event
	title = child_personality.3003.t
	desc = child_personality.3003.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_bold
	}

	immediate = {
		save_scope_as = personality_child
		get_guardian_scope_effect = yes
	}
	
	option = {
		name = child_personality.3003.a
		add_trait = rowdy
	}

	after = {
		hidden_effect = {
			childhood_groomed_to_rule_skill_gain_effect = yes
			send_event_about_player_heir_childhood_personality_effect = { ID = 3004 }
		}
	}
}

#Notification about player heir becoming rowdy
child_personality.3004 = {
	type = character_event
	title = child_personality.3004.t
	desc = child_personality.3004.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_bold
	}
	
	option = {
		name = child_personality.3004.a
		
		show_as_tooltip = { scope:personality_child = { add_trait_force_tooltip = rowdy } }
	}
}


#Assign childhood trait bossy
child_personality.3005 = {
	type = character_event
	title = child_personality.3005.t
	desc = child_personality.3005.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_callous
	}

	immediate = {
		save_scope_as = personality_child
		get_guardian_scope_effect = yes
	}
	
	option = {
		name = child_personality.3005.a
		add_trait = bossy
	}

	after = {
		hidden_effect = {
			childhood_groomed_to_rule_skill_gain_effect = yes
			send_event_about_player_heir_childhood_personality_effect = { ID = 3006 }
		}
	}
}

#Notification about player heir becoming bossy
child_personality.3006 = {
	type = character_event
	title = child_personality.3005.t
	desc = child_personality.3006.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_callous
	}
	
	option = {
		name = child_personality.3006.a
		
		show_as_tooltip = { scope:personality_child = { add_trait_force_tooltip = bossy } }
	}
}

#Assign childhood trait Charming
child_personality.3007 = {
	type = character_event
	title = child_personality.3007.t
	desc = child_personality.3007.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_compassionate
	}

	immediate = {
		save_scope_as = personality_child
		get_guardian_scope_effect = yes
	}
	
	option = {
		name = child_personality.3007.a
		add_trait = charming
	}

	after = {
		hidden_effect = {
			childhood_groomed_to_rule_skill_gain_effect = yes
			send_event_about_player_heir_childhood_personality_effect = { ID = 3008 }
		}
	}
}

#Notification about player heir becoming charming
child_personality.3008 = {
	type = character_event
	title = child_personality.3008.t
	desc = child_personality.3008.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_compassionate
	}
	
	option = {
		name = child_personality.3008.a
		
		show_as_tooltip = { scope:personality_child = { add_trait_force_tooltip = charming } }
	}
}

#Assign childhood trait Pensive
child_personality.3009 = {
	type = character_event
	title = child_personality.3009.t
	desc = child_personality.3009.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_cynical
	}

	immediate = {
		save_scope_as = personality_child
		get_guardian_scope_effect = yes
	}
	
	option = {
		name = child_personality.3009.a
		add_trait = pensive
	}

	after = {
		hidden_effect = {
			childhood_groomed_to_rule_skill_gain_effect = yes
			send_event_about_player_heir_childhood_personality_effect = { ID = 3010 }
		}
	}
}

#Notification about player heir becoming Pensive
child_personality.3010 = {
	type = character_event
	title = child_personality.3009.t
	desc = child_personality.3010.desc
	theme = family
	left_portrait = {
		character = scope:personality_child
		animation = personality_cynical
	}
	
	option = {
		name = child_personality.3010.a
		
		show_as_tooltip = { scope:personality_child = { add_trait_force_tooltip = pensive } }
	}
}



######
# SEXUALITY ASSIGNMENT EVENTS
# by Linnéa Thimrén
# 4000-4999
######
child_personality.4000 = {
	hidden = yes

	trigger = {
		#To safety check that you don't already have a sexuality
		has_sexuality = none
	}

	immediate = {
		random_list = {
			80 = { #A player can have a say
				trigger = {
					is_ai = no
				}
				trigger_event = {
					id = child_personality.4011
					days = { 3 730 }
				}
			}
			20 = {
				random_list = {
					0 = { #Heterosexual
						modifier = {
							add = heterosexuality_chance
						}
						trigger_event = {
							id = child_personality.4015
							days = { 3 730 }
						}
					}
					0 = { #Homosexual
						modifier = {
							add = homosexuality_chance
						}
						trigger_event = {
							id = child_personality.4012
							days = { 3 730 }
						}
					}
					0 = { #Bisexual
						modifier = {
							add = bisexuality_chance
						}
						trigger_event = {
							id = child_personality.4013
							days = { 3 730 }
						}
					}
					0 = { #Asexual
						modifier = {
							add = asexuality_chance
						}
						modifier = {
							has_trait = lustful
							factor = 0.5
						}
						trigger_event = {
							id = child_personality.4014
							days = { 3 730 }
						}
					}
				}
			}
		}
	}
}


#A player can have a say
# by Linnéa Thimrén

#This is also used as a backup event to assign a sexuality for characters turning into adults that haven't gotten a sexuality due to being created too late in life etc.
child_personality.4011 = {
	type = character_event
	title = child_personality.4011.t
	desc = {
		desc = child_personality.4011.desc_opening
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:desc_animal
				}
				desc = child_personality.4011.desc_1
			}
			triggered_desc = {
				trigger = {
					exists = scope:desc_lustful
				}
				desc = child_personality.4011.desc_2
			}
			triggered_desc = {
				trigger = {
					exists = scope:desc_confusion
				}
				desc = child_personality.4011.desc_3
			}
		}
	}
	theme = love
	left_portrait = {
		character = root
		animation = flirtation
	}

	trigger = {
		#To safety check that you don't already have a sexuality
		has_sexuality = none	
	}

	immediate = {
		if = {
			limit = {
				exists = location
			}
			select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling
		}
		hidden_effect = { #To give the most "fitting" desc
			random_list = {
				10 = {
					trigger = {
						exists = var:animal_type
					}
					save_scope_value_as = {
						name = desc_animal
						value = yes
					}
				}
				10 = {
					modifier = {
						add = 500
						has_trait = lustful
					}
					save_scope_value_as = {
						name = desc_lustful
						value = yes
					}
				}
				10 = {
					save_scope_value_as = {
						name = desc_confusion
						value = yes
					}
				}
			}
		}
	}

	#Heterosexual
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { is_female = yes }
						desc = child_personality.4011.a #Boy
					}
					desc = child_personality.4011.b #Girl
				}
			}
		}
		
		set_sexuality = heterosexual
		
		ai_chance = {
			base = 0
			modifier = { add = heterosexuality_chance }
		}
	}

	#Homosexual
	option = { #Girl
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { is_female = yes }
						desc = child_personality.4011.b #Girl
					}
					desc = child_personality.4011.a #Boy
				}
			}
		}
		set_sexuality = homosexual
		
		ai_chance = {
			base = 0
			modifier = { add = homosexuality_chance }
		}
	}

	option = { #Either
		name = child_personality.4011.c
		set_sexuality = bisexual
		ai_chance = {
			base = 0
			modifier = { add = bisexuality_chance }
		}
	}

	option = { #Neither
		name = child_personality.4011.d
		set_sexuality = asexual
		ai_chance = {
			base = 0
			modifier = { add = asexuality_chance }
			modifier = {
				has_trait = lustful
				factor = 0.5
			}
		}
	}

	after = {
		remove_variable = animal_type
	}
}

#Child realizes they are homosexual
#by Linnéa Thimrén
child_personality.4012 = {
	type = character_event
	title = child_personality.4011.t
	desc = child_personality.4012.desc
	theme = love
	left_portrait = {
		character = root
		animation = admiration
	}

	trigger = {
		#To safety check that you don't already have a sexuality
		has_sexuality = none
	}

	option = {
		name = child_personality.4012.a
		set_sexuality = homosexual
	}
}

#Child realizes they are bisexual
#by Linnéa Thimrén
child_personality.4013 = {
	type = character_event
	title = child_personality.4011.t
	desc = child_personality.4013.desc
	theme = love
	left_portrait = {
		character = root
		animation = admiration
	}

	trigger = {
		#To safety check that you don't already have a sexuality
		has_sexuality = none
	}

	option = {
		name = child_personality.4013.a
		set_sexuality = bisexual
	}
}

#Child realizes they are asexual
#by Linnéa Thimrén
child_personality.4014 = {
	type = character_event
	title = child_personality.4011.t
	desc = child_personality.4014.desc
	theme = love
	left_portrait = {
		character = root
		animation = personality_callous
	}

	trigger = {
		#To safety check that you don't already have a sexuality
		has_sexuality = none
	}

	immediate = {
		dummy_opposite_gender_effect = { TARGET = root }
	}

	option = {
		name = child_personality.4014.a
		set_sexuality = asexual
	}
}

#Child realizes they are heterosexual
#by Linnéa Thimrén
child_personality.4015 = {
	type = character_event
	title = child_personality.4011.t
	desc = child_personality.4015.desc
	theme = love
	left_portrait = {
		character = root
		animation = admiration
	}
	right_portrait = {
		character = scope:crush
		animation = idle
	}

	trigger = {
		#To safety check that you don't already have a sexuality
		has_sexuality = none
	}

	immediate = {
		dummy_opposite_gender_effect = { TARGET = root }
		save_scope_as = crush_holder
		hidden_effect = {
			set_sexuality = heterosexual
		}
		
		if = { # Generate a crush, for fun
			limit = {
				is_ai = no # Avoid character bloat
			}
			hidden_effect = {
				create_character = {
					location = root.capital_province
					template = servant_character
					age = root.age
					gender_female_chance = root_attraction_based_female_chance
					faith = root.capital_province.county.faith
					culture = root.capital_province.county.culture
					dynasty = none
					save_scope_as = crush
				}
				add_courtier = scope:crush
				scope:crush = {
					add_character_flag = peasant_outfit
					set_sexuality = heterosexual
					random_list = {
						0 = { #Heterosexual
							modifier = {
								add = heterosexuality_chance
							}
							set_sexuality = heterosexual
						}
						0 = { #Bisexual
							modifier = {
								add = bisexuality_chance
							}
							set_sexuality = bisexual
						}
					}
				}
			}
		}
	}

	option = {
		name = child_personality.4015.a
		show_as_tooltip = {
			set_sexuality = heterosexual
		}
	}

	option = {
		trigger = {
			exists = scope:crush
		}
		name = child_personality.4015.b
		show_as_tooltip = {
			set_sexuality = heterosexual
		}
		set_relation_crush = scope:crush
		scope:crush = {
			trigger_event = childhood.0012
		}
	}
}


##############################
# REINCARNATION, by Mathilda Bjarnehed
##############################

scripted_trigger reincarnation_trait_valid_trigger = {
	scope:ancestor = { has_trait = $TRAIT$ }
}

scripted_effect reincarnation_pick_trait_effect = {
	add_trait = $TRAIT$
	save_scope_value_as = { name = inherited_trait value = flag:$TRAIT$ }
	if = {
		limit = { faith = { trait_is_sin = $TRAIT$ } }
		save_scope_value_as = { name = inherited_trait_is_sinful value = yes }
	}
}

child_personality.9900 = { #by Mathilda Bjarnehed
	type = character_event
	title = child_personality.9900.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:inherited_trait_is_sinful }
				desc = child_personality.9900.start.sinful.desc
			}
			desc = child_personality.9900.start.desc
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = mother
					mother = {
						is_alive = yes
						OR = {
							is_child_of = scope:ancestor
							is_grandchild_of = scope:ancestor
						}
					}
				}
				desc = child_personality.9900.mother.desc
			}
			triggered_desc = {
				trigger = {
					exists = father
					father = {
						is_alive = yes
						OR = {
							is_child_of = scope:ancestor
							is_grandchild_of = scope:ancestor
						}
					}
				}
				desc = child_personality.9900.father.desc
			}
			triggered_desc = {
				trigger = {
					exists = mother
					mother = {
						is_alive = yes
					}
				}
				desc = child_personality.9900.mother.desc
			}
			triggered_desc = {
				trigger = {
					exists = father
					father = {
						is_alive = yes
					}
				}
				desc = child_personality.9900.father.desc
			}
			desc = child_personality.9900.nurse.desc
		}
		first_valid = {
			# Normal (non-Sinful) Variants
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:temperate
					NOT = { faith = { trait_is_sin = temperate } }
				}
				desc = child_personality.9900.temperate.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:greedy
					NOT = { faith = { trait_is_sin = greedy } }
				}
				desc = child_personality.9900.greedy.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:generous
					NOT = { faith = { trait_is_sin = generous } }
				}
				desc = child_personality.9900.generous.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:diligent
					NOT = { faith = { trait_is_sin = diligent } }
				}
				desc = child_personality.9900.diligent.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:calm
					NOT = { faith = { trait_is_sin = calm } }
				}
				desc = child_personality.9900.calm.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:arrogant
					NOT = { faith = { trait_is_sin = arrogant } }
				}
				desc = child_personality.9900.arrogant.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:humble
					NOT = { faith = { trait_is_sin = humble } }
				}
				desc = child_personality.9900.humble.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:deceitful
					NOT = { faith = { trait_is_sin = deceitful } }
				}
				desc = child_personality.9900.deceitful.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:honest
					NOT = { faith = { trait_is_sin = honest } }
				}
				desc = child_personality.9900.honest.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:brave
					NOT = { faith = { trait_is_sin = brave } }
				}
				desc = child_personality.9900.brave.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:gregarious
					NOT = { faith = { trait_is_sin = gregarious } }
				}
				desc = child_personality.9900.gregarious.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:ambitious
					NOT = { faith = { trait_is_sin = ambitious } }
				}
				desc = child_personality.9900.ambitious.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:just
					NOT = { faith = { trait_is_sin = just } }
				}
				desc = child_personality.9900.just.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:zealous
					NOT = { faith = { trait_is_sin = zealous } }
				}
				desc = child_personality.9900.zealous.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:compassionate
					NOT = { faith = { trait_is_sin = compassionate } }
				}
				desc = child_personality.9900.compassionate.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:stubborn
					NOT = { faith = { trait_is_sin = stubborn } }
				}
				desc = child_personality.9900.stubborn.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:forgiving
					NOT = { faith = { trait_is_sin = forgiving } }
				}
				desc = child_personality.9900.forgiving.desc
			}
			triggered_desc = {
				trigger = {	scope:inherited_trait = flag:lunatic_1 }
				desc = child_personality.9900.lunatic.desc
			}
			triggered_desc = {
				trigger = {	scope:inherited_trait = flag:dull }
				desc = child_personality.9900.dull.desc
			}
			triggered_desc = {
				trigger = {	scope:inherited_trait = flag:shrewd	}
				desc = child_personality.9900.shrewd.desc
			}
			triggered_desc = {
				trigger = {	scope:inherited_trait = flag:strong	}
				desc = child_personality.9900.strong.desc
			}

			# Sinful variants
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:temperate
					faith = { trait_is_sin = temperate }
				}
				desc = child_personality.9900.sinful.temperate.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:greedy
					faith = { trait_is_sin = greedy }
				}
				desc = child_personality.9900.sinful.greedy.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:generous
					faith = { trait_is_sin = generous }
				}
				desc = child_personality.9900.sinful.generous.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:diligent
					faith = { trait_is_sin = diligent }
				}
				desc = child_personality.9900.sinful.diligent.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:calm
					faith = { trait_is_sin = calm }
				}
				desc = child_personality.9900.sinful.calm.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:arrogant
					faith = { trait_is_sin = arrogant }
				}
				desc = child_personality.9900.sinful.arrogant.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:humble
					faith = { trait_is_sin = humble }
				}
				desc = child_personality.9900.sinful.humble.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:deceitful
					faith = { trait_is_sin = deceitful }
				}
				desc = child_personality.9900.sinful.deceitful.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:honest
					faith = { trait_is_sin = honest }
				}
				desc = child_personality.9900.sinful.honest.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:brave
					faith = { trait_is_sin = brave }
				}
				desc = child_personality.9900.sinful.brave.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:gregarious
					faith = { trait_is_sin = gregarious }
				}
				desc = child_personality.9900.sinful.gregarious.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:ambitious
					faith = { trait_is_sin = ambitious }
				}
				desc = child_personality.9900.sinful.ambitious.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:just
					faith = { trait_is_sin = just }
				}
				desc = child_personality.9900.sinful.just.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:zealous
					faith = { trait_is_sin = zealous }
				}
				desc = child_personality.9900.sinful.zealous.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:compassionate
					faith = { trait_is_sin = compassionate }
				}
				desc = child_personality.9900.sinful.compassionate.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:stubborn
					faith = { trait_is_sin = stubborn }
				}
				desc = child_personality.9900.sinful.stubborn.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:forgiving
					faith = { trait_is_sin = forgiving }
				}
				desc = child_personality.9900.sinful.forgiving.desc
			}
		}
		desc = child_personality.9900.end.desc
		triggered_desc = {
			trigger = { exists = scope:inherited_trait_is_sinful }
			desc = child_personality.9900.sinful.postscript.desc
		}
	}
	theme = faith
	left_portrait = root
	right_portrait = scope:ancestor
	
	trigger = {
		age = 9
		exists = var:reincarnation_of
		var:reincarnation_of = { can_reincarnate_trigger = yes }
		can_become_reincarnation_trigger = yes
	}

	immediate = {
		play_music_cue = "mx_cue_faith_conversion"
		save_scope_as = child

		#Resave the variable as permanent
		var:reincarnation_of = {
			save_scope_as = ancestor
		}
		set_variable = {
			name = reincarnation_of
			value = scope:ancestor
		}

		#What trait are we inheriting? (list must match can_reincarnate_trigger)
		random_list = {
			10 = { #temperate
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = temperate } }
				modifier = { factor = 0.25 faith = { trait_is_sin = temperate } }
				reincarnation_pick_trait_effect = { TRAIT = temperate }
			}
			10 = { #greedy
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = greedy } }
				modifier = { factor = 0.25 faith = { trait_is_sin = greedy } }
				reincarnation_pick_trait_effect = { TRAIT = greedy }
			}
			10 = { #generous
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = generous } }
				modifier = { factor = 0.25 faith = { trait_is_sin = generous } }
				reincarnation_pick_trait_effect = { TRAIT = generous }
			}
			10 = { #diligent
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = diligent } }
				modifier = { factor = 0.25 faith = { trait_is_sin = diligent } }
				reincarnation_pick_trait_effect = { TRAIT = diligent }
			}
			10 = { #calm
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = calm } }
				modifier = { factor = 0.25 faith = { trait_is_sin = calm } }
				reincarnation_pick_trait_effect = { TRAIT = calm }
			}
			10 = { #arrogant
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = arrogant } }
				modifier = { factor = 0.25 faith = { trait_is_sin = arrogant } }
				reincarnation_pick_trait_effect = { TRAIT = arrogant }
			}
			10 = { #humble
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = humble } }
				modifier = { factor = 0.25 faith = { trait_is_sin = humble } }
				reincarnation_pick_trait_effect = { TRAIT = humble }
			}
			10 = { #deceitful
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = deceitful } }
				modifier = { factor = 0.25 faith = { trait_is_sin = deceitful } }
				reincarnation_pick_trait_effect = { TRAIT = deceitful }
			}
			10 = { #honest
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = honest } }
				modifier = { factor = 0.25 faith = { trait_is_sin = honest } }
				reincarnation_pick_trait_effect = { TRAIT = honest }
			}
			10 = { #brave
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = brave } }
				modifier = { factor = 0.25 faith = { trait_is_sin = brave } }
				reincarnation_pick_trait_effect = { TRAIT = brave }
			}
			10 = { #gregarious
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = gregarious } }
				modifier = { factor = 0.25 faith = { trait_is_sin = gregarious } }
				reincarnation_pick_trait_effect = { TRAIT = gregarious }
			}
			10 = { #ambitious
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = ambitious } }
				modifier = { factor = 0.25 faith = { trait_is_sin = ambitious } }
				reincarnation_pick_trait_effect = { TRAIT = ambitious }
			}
			10 = { #just
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = just } }
				modifier = { factor = 0.25 faith = { trait_is_sin = just } }
				reincarnation_pick_trait_effect = { TRAIT = just }
			}
			10 = { #zealous
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = zealous } }
				modifier = { factor = 0.25 faith = { trait_is_sin = zealous } }
				reincarnation_pick_trait_effect = { TRAIT = zealous }
			}
			10 = { #compassionate
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = compassionate } }
				modifier = { factor = 0.25 faith = { trait_is_sin = compassionate } }
				reincarnation_pick_trait_effect = { TRAIT = compassionate }
			}
			10 = { #stubborn
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = stubborn } }
				modifier = { factor = 0.25 faith = { trait_is_sin = stubborn } }
				reincarnation_pick_trait_effect = { TRAIT = stubborn }
			}
			10 = { #forgiving
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = forgiving } }
				modifier = { factor = 0.25 faith = { trait_is_sin = forgiving } }
				reincarnation_pick_trait_effect = { TRAIT = forgiving }
			}
			50 = { #lunatic
				trigger = { reincarnation_trait_valid_trigger = { TRAIT = lunatic_1 } }
				reincarnation_pick_trait_effect = { TRAIT = lunatic_1 }
			}
			25 = { #dull
				trigger = {
					scope:ancestor = {
						OR = {
							has_trait = dull
							has_trait = intellect_bad
						}
					}
				}
				reincarnation_pick_trait_effect = { TRAIT = dull }
			}
			50 = { #shrewd
				trigger = {
					scope:ancestor = {
						OR = {
							has_trait = shrewd
							has_trait = intellect_good
						}
					}
				}
				reincarnation_pick_trait_effect = { TRAIT = shrewd }
			}
			50 = { #strong
				trigger = {
					scope:ancestor = {
						OR = {
							has_trait = strong
							has_trait = physique_good
						}
					}
				}
				reincarnation_pick_trait_effect = { TRAIT = strong }
			}
		}
	}

	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { scope:inherited_trait = flag:dull }
						desc = child_personality.9900.a.dull
					}
					triggered_desc = {
						trigger = { exists = scope:inherited_trait_is_sinful }
						desc = child_personality.9900.a.sinful
					}
					desc = child_personality.9900.a
				}
			}
		}
		
		add_trait = reincarnation

		if = {
			limit = {
				exists = dynasty
				dynasty.dynast = { faith = root.faith }
			}
			dynasty = {
				add_dynasty_prestige = minor_dynasty_prestige_gain
			}
		}

		#Notifications
		every_close_family_member = {
			limit = {
				is_ruler = yes
				OR = {
					is_parent_of = root
					is_grandparent_of = root
					is_great_grandparent_of = root
					is_sibling_of = root
				}

			}
			trigger_event = child_personality.9901		
		}
		every_relation = {
			type = guardian
			limit = {
				is_ruler = yes
				NOR = {
					is_parent_of = root
					is_grandparent_of = root
					is_great_grandparent_of = root
					is_sibling_of = root
				}
			}
			trigger_event = child_personality.9901	
		}
	}
}

#Notification
child_personality.9901 = { #by Mathilda Bjarnehed
	type = character_event
	title = child_personality.9901.t
	desc = {
		desc = child_personality.9901.start.desc
		first_valid = {
			# Normal (non-Sinful) Variants
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:temperate
					NOT = { faith = { trait_is_sin = temperate } }
				}
				desc = child_personality.9900.temperate.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:greedy
					NOT = { faith = { trait_is_sin = greedy } }
				}
				desc = child_personality.9900.greedy.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:generous
					NOT = { faith = { trait_is_sin = generous } }
				}
				desc = child_personality.9900.generous.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:diligent
					NOT = { faith = { trait_is_sin = diligent } }
				}
				desc = child_personality.9900.diligent.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:calm
					NOT = { faith = { trait_is_sin = calm } }
				}
				desc = child_personality.9900.calm.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:arrogant
					NOT = { faith = { trait_is_sin = arrogant } }
				}
				desc = child_personality.9900.arrogant.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:humble
					NOT = { faith = { trait_is_sin = humble } }
				}
				desc = child_personality.9900.humble.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:deceitful
					NOT = { faith = { trait_is_sin = deceitful } }
				}
				desc = child_personality.9900.deceitful.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:honest
					NOT = { faith = { trait_is_sin = honest } }
				}
				desc = child_personality.9900.honest.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:brave
					NOT = { faith = { trait_is_sin = brave } }
				}
				desc = child_personality.9900.brave.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:gregarious
					NOT = { faith = { trait_is_sin = gregarious } }
				}
				desc = child_personality.9900.gregarious.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:ambitious
					NOT = { faith = { trait_is_sin = ambitious } }
				}
				desc = child_personality.9900.ambitious.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:just
					NOT = { faith = { trait_is_sin = just } }
				}
				desc = child_personality.9900.just.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:zealous
					NOT = { faith = { trait_is_sin = zealous } }
				}
				desc = child_personality.9900.zealous.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:compassionate
					NOT = { faith = { trait_is_sin = compassionate } }
				}
				desc = child_personality.9900.compassionate.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:stubborn
					NOT = { faith = { trait_is_sin = stubborn } }
				}
				desc = child_personality.9900.stubborn.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:forgiving
					NOT = { faith = { trait_is_sin = forgiving } }
				}
				desc = child_personality.9900.forgiving.desc
			}
			triggered_desc = {
				trigger = {	scope:inherited_trait = flag:lunatic_1 }
				desc = child_personality.9900.lunatic.desc
			}
			triggered_desc = {
				trigger = {	scope:inherited_trait = flag:dull }
				desc = child_personality.9900.dull.desc
			}
			triggered_desc = {
				trigger = {	scope:inherited_trait = flag:shrewd	}
				desc = child_personality.9900.shrewd.desc
			}
			triggered_desc = {
				trigger = {	scope:inherited_trait = flag:strong	}
				desc = child_personality.9900.strong.desc
			}

			# Sinful variants
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:temperate
					faith = { trait_is_sin = temperate }
				}
				desc = child_personality.9900.sinful.temperate.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:greedy
					faith = { trait_is_sin = greedy }
				}
				desc = child_personality.9900.sinful.greedy.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:generous
					faith = { trait_is_sin = generous }
				}
				desc = child_personality.9900.sinful.generous.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:diligent
					faith = { trait_is_sin = diligent }
				}
				desc = child_personality.9900.sinful.diligent.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:calm
					faith = { trait_is_sin = calm }
				}
				desc = child_personality.9900.sinful.calm.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:arrogant
					faith = { trait_is_sin = arrogant }
				}
				desc = child_personality.9900.sinful.arrogant.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:humble
					faith = { trait_is_sin = humble }
				}
				desc = child_personality.9900.sinful.humble.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:deceitful
					faith = { trait_is_sin = deceitful }
				}
				desc = child_personality.9900.sinful.deceitful.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:honest
					faith = { trait_is_sin = honest }
				}
				desc = child_personality.9900.sinful.honest.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:brave
					faith = { trait_is_sin = brave }
				}
				desc = child_personality.9900.sinful.brave.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:gregarious
					faith = { trait_is_sin = gregarious }
				}
				desc = child_personality.9900.sinful.gregarious.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:ambitious
					faith = { trait_is_sin = ambitious }
				}
				desc = child_personality.9900.sinful.ambitious.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:just
					faith = { trait_is_sin = just }
				}
				desc = child_personality.9900.sinful.just.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:zealous
					faith = { trait_is_sin = zealous }
				}
				desc = child_personality.9900.sinful.zealous.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:compassionate
					faith = { trait_is_sin = compassionate }
				}
				desc = child_personality.9900.sinful.compassionate.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:stubborn
					faith = { trait_is_sin = stubborn }
				}
				desc = child_personality.9900.sinful.stubborn.desc
			}
			triggered_desc = {
				trigger = {
					scope:inherited_trait = flag:forgiving
					faith = { trait_is_sin = forgiving }
				}
				desc = child_personality.9900.sinful.forgiving.desc
			}
		}
		desc = child_personality.9901.end.desc
	}
	theme = faith
	left_portrait = scope:child
	right_portrait = scope:ancestor

	immediate = {
		play_music_cue = "mx_cue_faith_conversion"
		scope:child = {
			add_trait_force_tooltip = reincarnation

			if = {
				limit = { scope:inherited_trait = flag:temperate }
				add_trait_force_tooltip = temperate
			}
			else_if = {
				limit = { scope:inherited_trait = flag:greedy }
				add_trait_force_tooltip = greedy
			}
			else_if = {
				limit = { scope:inherited_trait = flag:generous }
				add_trait_force_tooltip = generous
			}
			else_if = {
				limit = { scope:inherited_trait = flag:diligent }
				add_trait_force_tooltip = diligent
			}
			else_if = {
				limit = { scope:inherited_trait = flag:calm }
				add_trait_force_tooltip = calm
			}
			else_if = {
				limit = { scope:inherited_trait = flag:arrogant }
				add_trait_force_tooltip = arrogant
			}
			else_if = {
				limit = { scope:inherited_trait = flag:humble }
				add_trait_force_tooltip = humble
			}
			else_if = {
				limit = { scope:inherited_trait = flag:deceitful }
				add_trait_force_tooltip = deceitful
			}
			else_if = {
				limit = { scope:inherited_trait = flag:honest }
				add_trait_force_tooltip = honest
			}
			else_if = {
				limit = { scope:inherited_trait = flag:brave }
				add_trait_force_tooltip = brave
			}
			else_if = {
				limit = { scope:inherited_trait = flag:gregarious }
				add_trait_force_tooltip = gregarious
			}
			else_if = {
				limit = { scope:inherited_trait = flag:ambitious }
				add_trait_force_tooltip = ambitious
			}
			else_if = {
				limit = { scope:inherited_trait = flag:just }
				add_trait_force_tooltip = just
			}
			else_if = {
				limit = { scope:inherited_trait = flag:zealous }
				add_trait_force_tooltip = zealous
			}
			else_if = {
				limit = { scope:inherited_trait = flag:compassionate }
				add_trait_force_tooltip = compassionate
			}
			else_if = {
				limit = { scope:inherited_trait = flag:stubborn }
				add_trait_force_tooltip = stubborn
			}
			else_if = {
				limit = { scope:inherited_trait = flag:forgiving }
				add_trait_force_tooltip = forgiving
			}
			else_if = {
				limit = { scope:inherited_trait = flag:lunatic_1 }
				add_trait_force_tooltip = lunatic_1
			}
			else_if = {
				limit = { scope:inherited_trait = flag:dull }
				add_trait_force_tooltip = dull
			}
			else_if = {
				limit = { scope:inherited_trait = flag:shrewd }
				add_trait_force_tooltip = shrewd
			}
			else_if = {
				limit = { scope:inherited_trait = flag:strong }
				add_trait_force_tooltip = strong
			}
		}
	}

	option = {
		name = child_personality.9901.a

			show_as_tooltip = {
				scope:child = {
					if = {
					limit = {
						exists = dynasty
						exists = root.dynasty
						dynasty = root.dynasty
						dynasty.dynast = { faith = root.faith }
					}
					dynasty = {
						add_dynasty_prestige = minor_dynasty_prestige_gain
					}
				}
				}
			}
	}
}	
