﻿#Events for children developing personality traits

namespace = child_personality

#####
# CHILD EVENTS
# vol. 2
#####

# Safety net - Charming
child_personality.7000 = {
	type = character_event
	title = child_personality.700.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:guardian
				}
				desc = child_personality.700.guardian
			}
			desc = child_personality.700.no_guardian
		}
		desc = child_personality.7000.desc
	}
	theme = education
	left_portrait = {
		character = root
		animation = personality_rational
	}


	trigger = {
		age >= 15
		NOT = {
			has_character_flag = cp_700
		}
		number_of_personality_traits < 3
		has_trait = charming
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = {
					type = guardian
					exists = yes
				}		
			}
			random_relation = {
				type = guardian
				save_scope_as = guardian
			}
		}
		add_character_flag = { flag = cp_700 }
	}

	option = {
		name = child_personality.7000.a
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = gregarious
				has_trait = shy
			}
		}
		add_trait = gregarious
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}

	option = {
		name = child_personality.7000.b
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = honest
				has_trait = deceitful
			}
		}
		add_trait = deceitful
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7000.c
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = compassionate
				has_trait = sadistic
				has_trait = callous
			}
		}
		add_trait = compassionate
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7000.d
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = gregarious
				has_trait = shy
				has_trait = honest
				has_trait = deceitful
			}
		}
		add_trait = gregarious
		add_trait = deceitful
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7000.e
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = gregarious
				has_trait = shy
				has_trait = compassionate
				has_trait = callous
				has_trait = sadistic
			}
		}
		add_trait = gregarious
		add_trait = compassionate
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7000.f
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = compassionate
				has_trait = callous
				has_trait = sadistic
				has_trait = honest
				has_trait = deceitful
			}
		}
		add_trait = deceitful
		add_trait = compassionate
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7000.g
		trigger = {
			number_of_personality_traits = 0
		}
		add_trait = deceitful
		add_trait = compassionate
		add_trait = gregarious
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
}

# Safety net - Rowdy
child_personality.7010 = {
	type = character_event
	title = child_personality.700.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:guardian
				}
				desc = child_personality.700.guardian
			}
			desc = child_personality.700.no_guardian
		}
		desc = child_personality.7010.desc
	}
	theme = education
	left_portrait = {
		character = root
		animation = personality_rational
	}


	trigger = {
		age >= 15
		NOT = {
			has_character_flag = cp_700
		}
		number_of_personality_traits < 3
		has_trait = rowdy
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = {
					type = guardian
					exists = yes
				}		
			}
			random_relation = {
				type = guardian
				save_scope_as = guardian
			}
		}
		add_character_flag = { flag = cp_700 }
	}

	option = {
		name = child_personality.7010.a
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = brave
				has_trait = craven
			}
		}
		add_trait = brave
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}

	option = {
		name = child_personality.7010.b
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = impatient
				has_trait = patient
			}
		}
		add_trait = impatient
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7010.c
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = just
				has_trait = arbitrary
			}
		}
		add_trait = arbitrary
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7010.d
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = patient
				has_trait = impatient
				has_trait = brave
				has_trait = craven
			}
		}
		add_trait = brave
		add_trait = impatient
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7010.e
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = just
				has_trait = arbitrary
				has_trait = brave
				has_trait = craven
			}
		}
		add_trait = brave
		add_trait = arbitrary
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7010.f
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = patient
				has_trait = impatient
				has_trait = just
				has_trait = arbitrary
			}
		}
		add_trait = impatient
		add_trait = arbitrary
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7010.g
		trigger = {
			number_of_personality_traits = 0
		}
		add_trait = impatient
		add_trait = arbitrary
		add_trait = brave
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
}

# Safety net - Bossy
child_personality.7020 = {
	type = character_event
	title = child_personality.700.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:guardian
				}
				desc = child_personality.700.guardian
			}
			desc = child_personality.700.no_guardian
		}
		desc = child_personality.7020.desc
	}
	theme = education
	left_portrait = {
		character = root
		animation = personality_rational
	}


	trigger = {
		age >= 15
		NOT = {
			has_character_flag = cp_700
		}
		has_trait = bossy
		number_of_personality_traits < 3
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = {
					type = guardian
					exists = yes
				}		
			}
			random_relation = {
				type = guardian
				save_scope_as = guardian
			}
		}
		add_character_flag = { flag = cp_700 }
	}

	option = {
		name = child_personality.7020.a
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = just
				has_trait = arbitrary
			}
		}
		add_trait = just
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}

	option = {
		name = child_personality.7020.b
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = fickle
				has_trait = stubborn
			}
		}
		add_trait = stubborn
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7020.c
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = arrogant
				has_trait = humble
			}
		}
		add_trait = arrogant
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7020.d
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = stubborn
				has_trait = fickle
				has_trait = arbitrary
				has_trait = just
			}
		}
		add_trait = just
		add_trait = stubborn
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7020.e
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = arrogant
				has_trait = humble
				has_trait = arbitrary
				has_trait = just
			}
		}
		add_trait = just
		add_trait = arrogant
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7020.f
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = arrogant
				has_trait = humble
				has_trait = stubborn
				has_trait = fickle
			}
		}
		add_trait = stubborn
		add_trait = arrogant
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7020.g
		trigger = {
			number_of_personality_traits = 0
		}
		add_trait = stubborn
		add_trait = arrogant
		add_trait = just
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
}

# Safety net - Pensive
child_personality.7030 = {
	type = character_event
	title = child_personality.700.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:guardian
				}
				desc = child_personality.700.guardian
			}
			desc = child_personality.700.no_guardian
		}
		desc = child_personality.7030.desc
	}
	theme = education
	left_portrait = {
		character = root
		animation = personality_rational
	}


	trigger = {
		age >= 15
		NOT = {
			has_character_flag = cp_700
		}
		has_trait = pensive
		number_of_personality_traits < 3
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = {
					type = guardian
					exists = yes
				}		
			}
			random_relation = {
				type = guardian
				save_scope_as = guardian
			}
		}
		add_character_flag = { flag = cp_700 }
	}

	option = {
		name = child_personality.7030.a
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = calm
				has_trait = wrathful
			}
		}
		add_trait = calm
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}

	option = {
		name = child_personality.7030.b
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = chaste
				has_trait = lustful
			}
		}
		add_trait = chaste
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7030.c
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = zealous
				has_trait = cynical
			}
		}
		random_list = {
			50 = { add_trait = cynical }
			50 = { add_trait = zealous }
		}
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7030.d
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = lustful
				has_trait = chaste
				has_trait = calm
				has_trait = wrathful
			}
		}
		add_trait = calm
		add_trait = chaste
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7030.e
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = calm
				has_trait = wrathful
				has_trait = zealous
				has_trait = cynical
			}
		}
		add_trait = calm
		random_list = {
			50 = { add_trait = cynical }
			50 = { add_trait = zealous }
		}
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7030.f
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = zealous
				has_trait = cynical
				has_trait = chaste
				has_trait = lustful
			}
		}
		add_trait = chaste
		random_list = {
			50 = { add_trait = cynical }
			50 = { add_trait = zealous }
		}
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7030.g
		trigger = {
			number_of_personality_traits = 0
		}
		add_trait = calm
		add_trait = chaste
		random_list = {
			50 = { add_trait = cynical }
			50 = { add_trait = zealous }
		}
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
}

# Safety net - Curious
child_personality.7040 = {
	type = character_event
	title = child_personality.700.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:guardian
				}
				desc = child_personality.700.guardian
			}
			desc = child_personality.700.no_guardian
		}
		desc = child_personality.7040.desc
	}
	theme = education
	left_portrait = {
		character = root
		animation = personality_rational
	}


	trigger = {
		age >= 15
		NOT = {
			has_character_flag = cp_700
		}
		has_trait = curious
		number_of_personality_traits < 3
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_relation = {
					type = guardian
					exists = yes
				}		
			}
			random_relation = {
				type = guardian
				save_scope_as = guardian
			}
		}
		add_character_flag = { flag = cp_700 }
	}

	option = {
		name = child_personality.7040.a
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = diligent
				has_trait = lazy
			}
		}
		add_trait = diligent
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}

	option = {
		name = child_personality.7040.b
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = trusting
				has_trait = paranoid
			}
		}
		add_trait = trusting
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7040.c
		trigger = {
			number_of_personality_traits > 1
			NOR = {
				has_trait = stubborn
				has_trait = fickle
			}
		}
		add_trait = fickle
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7040.d
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = diligent
				has_trait = lazy
				has_trait = paranoid
				has_trait = trusting
			}
		}
		add_trait = diligent
		add_trait = trusting
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7040.e
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = stubborn
				has_trait = fickle
				has_trait = diligent
				has_trait = lazy
			}
		}
		add_trait = diligent
		add_trait = fickle
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7040.f
		trigger = {
			number_of_personality_traits = 1
			NOR = {
				has_trait = stubborn
				has_trait = fickle
				has_trait = paranoid
				has_trait = trusting
			}
		}
		add_trait = trusting
		add_trait = fickle
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
	
	option = {
		name = child_personality.7040.g
		trigger = {
			number_of_personality_traits = 0
		}
		add_trait = diligent
		add_trait = trusting
		add_trait = fickle
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				is_ai = yes
			}
			random_relation = {
				type = guardian
				trigger_event = child_personality.7100
			}
		}	
	}
}

#Safety net Output
child_personality.7100 = {
	type = character_event
	title = child_personality.7100.t
	desc = {
		desc = my_ward_or_child
		desc = child_personality.7100.start
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:child = {
						has_trait = charming
					}
				}
				desc = child_personality.7100.charming
			}
			triggered_desc = {
				trigger = {
					scope:child = {
						has_trait = rowdy
					}
				}
				desc = child_personality.7100.rowdy
			}
			triggered_desc = {
				trigger = {
					scope:child = {
						has_trait = bossy
					}
				}
				desc = child_personality.7100.bossy
			}
			triggered_desc = {
				trigger = {
					scope:child = {
						has_trait = pensive
					}
				}
				desc = child_personality.7100.pensive
			}
			desc = child_personality.7100.curious
		}
		desc = child_personality.7100.fin
	}
	theme = education
	left_portrait = {
		character = root
		animation = personality_rational
	}
	
	right_portrait = {
		character = scope:child
		animation = personality_content
	}
	
	option = {
		name = child_personality.7100.a
	}
}