frontier_hero_template = {
	age = { 18 30 }
	dynasty = none
	trait = education_martial_4
	trait = brave
	random_traits_list = {
		count = 1
		lustful = {}
		chaste = {}
		wrathful = {}
		arrogant = {}
		impatient = {}
		humble = {}
		calm = {}
		patient = {}
		impatient  = {}
	}
	random_traits_list = {
		count = 1
		honest = {}
		ambitious = {}
		cynical = {}
		zealous = {}
		compassionate = {}
		stubborn = {}
		generous = {}
	}
	random_traits_list = {
		count = { 0 1 }
		athletic = {}
		strong = {}
		giant = {}
		physique_good_1 = {}
		physique_good_2 = {}
		physique_good_3 = {}
	}
	random_traits = no
	faith = root.faith
	culture = root.culture
	martial  = {
		min_template_high_skill
		max_template_high_skill
	}
	prowess = extremely_high_skill_rating
	after_creation = {
		if = {
			limit = { has_dlc_feature = tours_and_tournaments }
			add_trait = tourney_participant
			add_random_tourney_participant_level_effect = yes
		}
	}
}

errant_soldier_character = {
	age = { 18 41 }
	random_traits_list = { # Poorly educated commoner
		count = 1
		education_martial_1 = {}
		education_intrigue_1 = {}
		education_diplomacy_1 = {}
		education_learning_1 = {}
		education_stewardship_1 = {}
	}
	random_traits_list = {
		count = 1
		lifestyle_blademaster = {}
		lifestyle_hunter = {}
		tourney_participant = {}
	}
	random_traits_list = {
		count = 1
		strong = {}
		physique_good_1 = {}
		brave = {}
		sadistic = {}
	}
	random_traits_list = {
		count = 1
		lustful = {}
		chaste = {}
		wrathful = {}
		arrogant = {}
		impatient = {}
		patient = {}
		impatient  = {}
		ambitious = {}
		cynical = {}
		zealous = {}
		stubborn = {}
		honest = {}
		gregarious = {}
		trusting = {}
		compassionate = {}
		generous = {}
		humble = {}
		calm = {}
	}
	random_traits = no
	faith = root.faith
	culture = root.culture
	dynasty = none
	gender_female_chance = root_soldier_female_chance
	martial = {
		min_template_average_skill
		max_template_average_skill
	}
	prowess = {
		min_template_average_skill
		max_template_average_skill
	}
	after_creation = {
		if = {
			limit = { has_trait = lifestyle_blademaster }
			add_trait_xp = {
				trait = lifestyle_blademaster
	            value = {
	                integer_range = {
	                    min = small_lifestyle_random_xp_low
	                    max = small_lifestyle_random_xp_high
	                }
	            }
			}
		}
		if = {
			limit = { has_trait = lifestyle_hunter }
			add_trait_xp = {
				trait = lifestyle_hunter
				track = hunter
	            value = {
	                integer_range = {
	                    min = small_lifestyle_random_xp_low
	                    max = small_lifestyle_random_xp_high
	                }
	            }
			}
		}
		add_random_tourney_participant_level_effect = yes
	}
}

cinderella_character = {
	age = { 16 21 }
	random_traits_list = { # Excellent education
		count = 1
		education_martial_4 = {}
		education_diplomacy_4 = {}
		education_intrigue_4 = {}
		education_learning_4 = {}
		education_stewardship_4 = {}
	}
	random_traits_list = {
		count = 2
		intellect_good_3 = {}
		strong = {}
		physique_good_1 = {}
		fecund = {}
		shrewd = {}
	}
	random_traits_list = {
		count = 2
		content = {}
		trusting = {}
		compassionate = {}
		generous = {}
		humble = {}
		calm = {}
		honest = {}
		temperate = {}
	}
	trait = beauty_good_3
	random_traits = no
	dynasty = none
	culture = root.culture
	faith = root.faith
}

inspired_template = {
	age = { 20 40 }
	dynasty = none
	random_traits_list = {
		count = 1
		education_stewardship_1 = { weight = { base = 20 } }
		education_stewardship_2 = { weight = { base = 4 } }
		education_stewardship_3 = { weight = { base = 1 } }
		education_learning_1 = { weight = { base = 20 } }
		education_learning_2 = { weight = { base = 4 } }
		education_learning_3 = { weight = { base = 1 } }
		education_diplomacy_1 = { weight = { base = 20 } }
		education_diplomacy_2 = { weight = { base = 4 } }
		education_diplomacy_3 = { weight = { base = 1 } }
		education_martial_1 = { weight = { base = 20 } }
		education_martial_2 = { weight = { base = 4 } }
		education_martial_3 = { weight = { base = 1 } }
	}
	random_traits_list = {
		count = 3
		gregarious = {}
		ambitious = {}
		diligent = {}
		zealous = {}
		greedy = {}
		brave = {}
	}
	random_traits = no
	martial = {
		min_template_decent_skill
		max_template_decent_skill
	}
	stewardship = {
		min_template_decent_skill
		max_template_decent_skill
	}
	diplomacy = {
		min_template_decent_skill
		max_template_decent_skill
	}
	intrigue = {
		min_template_decent_skill
		max_template_decent_skill
	}
	learning = {
		min_template_decent_skill
		max_template_decent_skill
	}	
}

local_artisan_template = {
	age = { 20 40 }
	faith = root.faith
	culture = root.culture
	dynasty = none
	random_traits_list = {
		count = 1
		education_stewardship_1 = { weight = { base = 30 } }
		education_stewardship_2 = { weight = { base = 3 } }
		education_diplomacy_1 = { weight = { base = 30 } }
		education_diplomacy_2 = { weight = { base = 3 } }
		education_martial_1 = { weight = { base = 30 } }
		education_martial_2 = { weight = { base = 3 } }
	}
	random_traits_list = {
		count = 3
		trusting = {}
		diligent = {}
		zealous = {}
		content = {}
		honest = {}
		shy = {}
	}
	random_traits = no
	martial = {
		min_template_low_skill
		max_template_low_skill
	}
	stewardship = {
		min_template_low_skill
		max_template_low_skill
	}
	diplomacy = {
		min_template_low_skill
		max_template_low_skill
	}
	intrigue = {
		min_template_low_skill
		max_template_low_skill
	}
	learning = {
		min_template_low_skill
		max_template_low_skill
	}	
}

# Exactly the same as the generic merchant template except the faith and culture scopes
foreign_merchant_template = {
	age = { 20 40 }
	random_traits_list = {
		count = 1
		education_stewardship_1 = {}
		education_stewardship_2 = {}
		education_stewardship_3 = {}
		education_stewardship_4 = {}
	}
	dynasty = none
	random_traits = yes
	faith = scope:merchant_county.faith
	culture = scope:merchant_county.culture
	gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
	stewardship = {
		min_template_decent_skill
		max_template_decent_skill
	}
	prowess = { 2 10 }
	martial = { 2 10 }
	diplomacy = { 5 13 }
	learning = { 5 13 }
}

demarch_template = {
	age = { 20 40 }
	dynasty = none
	trait = stubborn
	random_traits_list = {
		count = 1
		education_martial_2 = { weight = { base = 50 } }
		education_martial_3 = { weight = { base = 20 } }
		education_martial_4 = { weight = { base = 5 } }
	}
	random_traits_list = {
		count = 2
		just = {}
		ambitious = {}
		gregarious = {}
		impatient = {}
		wrathful = {}
		compassionate = {}
		callous = {}
		vengeful = {}
		greedy = {}
		zealous = {}
	}
	random_traits_list = {
		count = 1
		intellect_bad_2 = { weight = { base = 10 } }
		physique_good_1 = { weight = { base = 5 } }
		physique_good_2 = { weight = { base = 5 } }
		strong = { weight = { base = 5 } }
		giant = { weight = { base = 5 } }
		reckless = { weight = { base = 20 } }
		rough_terrain_expert = { weight = { base = 20 } }
		unyielding_defender = { weight = { base = 10 } }
		flexible_leader = { weight = { base = 10 } }
		forder = { weight = { base = 10 } }
	}
	random_traits = no
	martial = {
		min_template_decent_skill
		max_template_decent_skill
	}
	stewardship = {
		min_template_decent_skill
		max_template_decent_skill
	}
	diplomacy = {
		min_template_decent_skill
		max_template_decent_skill
	}
	intrigue = {
		min_template_decent_skill
		max_template_decent_skill
	}
	learning = {
		min_template_decent_skill
		max_template_decent_skill
	}
}

millenarian_template = {
	age = { 30 85 }
	dynasty = none
	trait = zealous
	trait = lifestyle_mystic
	random_traits_list = {
		count = 1
		education_learning_1 = { weight = { base = 80 } }
		education_learning_2 = { weight = { base = 50 } }
		education_learning_3 = { weight = { base = 20 } }
		education_learning_4 = { weight = { base = 5 } }
	}
	random_traits_list = {
		count = 1
		celibate = {}
		wrathful = {}
		temperate = {}
		reclusive = {}
		flagellant = {}
		inappetetic = {}
	}
	random_traits_list = {
		count = { 0 1 }
		lunatic_1 = {}
		lunatic_genetic = {}
		possessed_1 = {}
		possessed_genetic = {}
		devoted = {}
	}
	random_traits_list = {
		count = 2
		lustful = {
			trigger = {
				root.faith = { trait_is_virtue = lustful }
			}
		}
		chaste = {
			trigger = {
				root.faith = { trait_is_virtue = chaste }
			}
		}
		gluttonous = {
			trigger = {
				root.faith = { trait_is_virtue = gluttonous }
			}
		}
		greedy = {
			trigger = {
				root.faith = { trait_is_virtue = greedy }
			}
		}
		generous = {
			trigger = {
				root.faith = { trait_is_virtue = generous }
			}
		}
		calm = {
			trigger = {
				root.faith = { trait_is_virtue = calm }
			}
		}
		patient = {
			trigger = {
				root.faith = { trait_is_virtue = patient }
			}
		}
		impatient = {
			trigger = {
				root.faith = { trait_is_virtue = impatient }
			}
		}
		arrogant = {
			trigger = {
				root.faith = { trait_is_virtue = arrogant }
			}
		}
		humble = {
			trigger = {
				root.faith = { trait_is_virtue = humble }
			}
		}
		deceitful = {
			trigger = {
				root.faith = { trait_is_virtue = deceitful }
			}
		}
		honest = {
			trigger = {
				root.faith = { trait_is_virtue = honest }
			}
		}
		craven = {
			trigger = {
				root.faith = { trait_is_virtue = craven }
			}
		}
		brave = {
			trigger = {
				root.faith = { trait_is_virtue = brave }
			}
		}
		ambitious = {
			trigger = {
				root.faith = { trait_is_virtue = ambitious }
			}
		}
		content = {
			trigger = {
				root.faith = { trait_is_virtue = content }
			}
		}
		arbitrary = {
			trigger = {
				root.faith = { trait_is_virtue = arbitrary }
			}
		}
		just = {
			trigger = {
				root.faith = { trait_is_virtue = just }
			}
		}
		paranoid = {
			trigger = {
				root.faith = { trait_is_virtue = paranoid }
			}
		}
		trusting = {
			trigger = {
				root.faith = { trait_is_virtue = trusting }
			}
		}
		compassionate = {
			trigger = {
				root.faith = { trait_is_virtue = compassionate }
			}
		}
		callous = {
			trigger = {
				root.faith = { trait_is_virtue = callous }
			}
		}
		sadistic = {
			trigger = {
				root.faith = { trait_is_virtue = sadistic }
			}
		}
		stubborn = {
			trigger = {
				root.faith = { trait_is_virtue = stubborn }
			}
		}
		fickle = {
			trigger = {
				root.faith = { trait_is_virtue = fickle }
			}
		}
		vengeful = {
			trigger = {
				root.faith = { trait_is_virtue = vengeful }
			}
		}
		forgiving = {
			trigger = {
				root.faith = { trait_is_virtue = forgiving }
			}
		}
	}
	faith = root.faith
	culture = root.culture
	gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
	after_creation = {
		add_random_tiered_trait_xp_effect = {
			TRAIT = lifestyle_mystic
			LEVEL_1 = yes
			LEVEL_3 = yes
		}
	}
}

miracle_baby_template = {
	age = { 0 1 }

	random_traits_list = {
		count = { 0 1 }
		athletic = {}
		strong = {}
		physique_good_1 = {}
		physique_good_2 = {}
		physique_good_3 = {}
		intellect_good_1 = {}
		intellect_good_2 = {}
		intellect_good_3 = {}
	}
	random_traits = no
	faith = root.faith
	culture = root.culture
	gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
}

prince_ali_template = {
	age = { 16 25 }

	random_traits_list = {
		count = 1
		strong = {}
		physique_good_1 = {}
		physique_good_2 = {}
		physique_good_3 = {}
	}
	random_traits_list = {
		count = 1
		education_intrigue_3 = {}
		education_intrigue_4 = {}
		education_stewardship_3 = {}
		education_stewardship_4 = {}
	}
	random_traits_list = {
		count = 1
		seducer = {}
		honest = {}
		deceitful = {}
	}
	random_traits = yes

	martial = {
		min_template_decent_skill
		max_template_decent_skill
	}
	stewardship = {
		min_template_decent_skill
		max_template_decent_skill
	}
	diplomacy = {
		min_template_decent_skill
		max_template_decent_skill
	}
	intrigue = {
		min_template_decent_skill
		max_template_decent_skill
	}
	learning = {
		min_template_decent_skill
		max_template_decent_skill
	}
}

court_linguist_good_template = {
	age = { 18 35 }
	dynasty = none
	gender_female_chance = root_faith_dominant_gender_adjusted_female_chance

	random_traits_list = {
		count = 1
		education_learning_3 = {}
		education_learning_4 = {}
	}

	random_traits_list = { # A trait demonstrating their skill at language
		count = 1
		lifestyle_poet = {}
		scholar = {}
		gregarious = {}
		administrator = {}
		tourney_participant = {}
	}

	learning = {
		min_template_decent_skill
		max_template_decent_skill
	}
	random_traits = yes

	after_creation = {
		add_to_list = court_linguist_list
		add_character_flag = court_linguist_flag
		if = { # Learn the desired court language
			limit = {
				NOT = { knows_court_language_of = scope:target_court_language }
			}
			learn_court_language_of = scope:target_court_language
		}
		if = { # If the character does not speak the ruler's language, learn it
			limit = {
				NOT = { knows_language_of_culture = root.culture }
			}
			learn_language_of_culture = root.culture
		}
		random_list = {
			2 = {
				trigger = {
					#Foreign culture relative
					exists = scope:ling_cul_1_bonus
					NOT = { knows_language_of_culture = scope:ling_cul_1_bonus }
				}
				learn_language_of_culture = scope:ling_cul_1_bonus
			}
			2 = {
				trigger = {
					# Root culture relative
					exists = scope:ling_cul_3_bonus
					NOT = { knows_language_of_culture = scope:ling_cul_3_bonus }
				}
				learn_language_of_culture = scope:ling_cul_3_bonus
			}
		}
		add_random_tiered_trait_track_xp_effect = {
			TRAIT = tourney_participant
			TRACK = wit
			LEVEL_1 = yes
			LEVEL_3 = yes
		}
	}
}

court_linguist_medium_template = {

	age = { 18 35 }
	dynasty = none
	culture = scope:ling_cul_1
	faith = scope:ling_cul_1_ruler.faith
	gender_female_chance = root_faith_dominant_gender_adjusted_female_chance

	random_traits_list = {
		count = 1
		education_learning_2 = {}
		education_learning_3 = {}
		education_learning_4 = {}
	}

	random_traits_list = { # A trait demonstrating their skill at language
		count = { 0 1 }
		tourney_participant = {}
	}

	learning = {
		min_template_average_skill
		max_template_average_skill
	}
	random_traits = yes

	after_creation = {
		add_to_list = court_linguist_list
		add_character_flag = court_linguist_flag
		if = { # Learn the desired court language
			limit = {
				NOT = { knows_court_language_of = scope:target_court_language }
			}
			learn_court_language_of = scope:target_court_language
		}
		if = { # If the character does not speak the ruler's language, learn it
			limit = {
				NOT = { knows_language_of_culture = root.culture }
			}
			learn_language_of_culture = root.culture
		}
		add_random_tiered_trait_track_xp_effect = {
			TRAIT = tourney_participant
			TRACK = wit
			LEVEL_1 = yes
			LEVEL_3 = no
		}
	}
}

court_linguist_cheap_template = {

	age = { 18 55 }
	dynasty = none
	culture = scope:ling_cul_2
	faith = scope:ling_cul_2_ruler.faith
	gender_female_chance = root_faith_dominant_gender_adjusted_female_chance

	random_traits_list = {
		count = 1
		education_learning_1 = {}
		education_learning_2 = {}
		education_learning_3 = {}
	}

	learning = {
		min_template_low_skill
		max_template_low_skill
	}
	random_traits = yes

	after_creation = {
		add_to_list = court_linguist_list
		add_character_flag = court_linguist_flag
		assign_quirk_effect = yes
		if = { # Learn the desired court language
			limit = {
				NOT = { knows_court_language_of = scope:target_court_language }
			}
			learn_court_language_of = scope:target_court_language
		}
	}
}

hidden_scion_template = {
	# General
	## Age is randomised in the event itself.
	age = ep1_flavour_0001_scion_minimum_age_value
	faith = scope:scion_parent.faith
	culture = scope:scion_parent.capital_county.culture
	# Education
	random_traits_list = {
		count = 1
		education_learning_1 = {
			weight = { base = 100 }
		}
		education_diplomacy_1 = {
			weight = { base = 100 }
		}
	}
	# Personality
	## They're always trusting, due to scope:scion_parent's protection & extreme sheltering.
	trait = trusting
	## But otherwise can vary pretty wildly, save that they take after their parent.
	random_traits_list = {
		count = 2
		lustful = {
			trigger = {
				scope:scion_parent = { has_trait = lustful }
			}
		}
		chaste = {
			trigger = {
				scope:scion_parent = { has_trait = chaste }
			}
		}
		gluttonous = {
			trigger = {
				scope:scion_parent = { has_trait = gluttonous }
			}
		}
		temperate = {
			trigger = {
				scope:scion_parent = { has_trait = temperate }
			}
		}
		greedy = {
			trigger = {
				scope:scion_parent = { has_trait = greedy }
			}
		}
		generous = {
			trigger = {
				scope:scion_parent = { has_trait = generous }
			}
		}
		lazy = {
			trigger = {
				scope:scion_parent = { has_trait = lazy }
			}
		}
		diligent = {
			trigger = {
				scope:scion_parent = { has_trait = diligent }
			}
		}
		wrathful = {
			trigger = {
				scope:scion_parent = { has_trait = wrathful }
			}
		}
		calm = {
			trigger = {
				scope:scion_parent = { has_trait = calm }
			}
		}
		patient = {
			trigger = {
				scope:scion_parent = { has_trait = patient }
			}
		}
		impatient = {
			trigger = {
				scope:scion_parent = { has_trait = impatient }
			}
		}
		arrogant = {
			trigger = {
				scope:scion_parent = { has_trait = arrogant }
			}
		}
		humble = {
			trigger = {
				scope:scion_parent = { has_trait = humble }
			}
		}
		deceitful = {
			trigger = {
				scope:scion_parent = { has_trait = deceitful }
			}
		}
		honest = {
			trigger = {
				scope:scion_parent = { has_trait = honest }
			}
		}
		craven = {
			trigger = {
				scope:scion_parent = { has_trait = craven }
			}
		}
		brave = {
			trigger = {
				scope:scion_parent = { has_trait = brave }
			}
		}
		shy = {
			trigger = {
				scope:scion_parent = { has_trait = shy }
			}
		}
		gregarious = {
			trigger = {
				scope:scion_parent = { has_trait = gregarious }
			}
		}
		ambitious = {
			trigger = {
				scope:scion_parent = { has_trait = ambitious }
			}
		}
		content = {
			trigger = {
				scope:scion_parent = { has_trait = content }
			}
		}
		arbitrary = {
			trigger = {
				scope:scion_parent = { has_trait = arbitrary }
			}
		}
		just = {
			trigger = {
				scope:scion_parent = { has_trait = just }
			}
		}
		cynical = {
			trigger = {
				scope:scion_parent = { has_trait = cynical }
			}
		}
		zealous = {
			trigger = {
				scope:scion_parent = { has_trait = zealous }
			}
		}
		compassionate = {
			trigger = {
				scope:scion_parent = { has_trait = compassionate }
			}
		}
		callous = {
			trigger = {
				scope:scion_parent = { has_trait = callous }
			}
		}
		sadistic = {
			trigger = {
				scope:scion_parent = { has_trait = sadistic }
			}
		}
		stubborn = {
			trigger = {
				scope:scion_parent = { has_trait = stubborn }
			}
		}
		fickle = {
			trigger = {
				scope:scion_parent = { has_trait = fickle }
			}
		}
		vengeful = {
			trigger = {
				scope:scion_parent = { has_trait = vengeful }
			}
		}
		forgiving = {
			trigger = {
				scope:scion_parent = { has_trait = forgiving }
			}
		}
	}
	# Misc
	random_traits = no
	## Gender is set so that they're marriable by scope:prospective_spouse.
	gender_female_chance = {
		if = {
			limit = {
				scope:prospective_spouse = { is_female = yes }
			}
			add = 0
		}
		else = { add = 100 }
	}
	# Skills
	diplomacy = { min_template_low_skill max_template_decent_skill }
	martial = { min_template_low_skill max_template_decent_skill }
	stewardship = { min_template_low_skill max_template_decent_skill }
	intrigue = { min_template_low_skill max_template_decent_skill }
	learning = { min_template_low_skill max_template_decent_skill }
	prowess = { min_template_low_skill max_template_decent_skill }
}

local_dispute_template = {
	age = { 35 55 }
	dynasty = none
	gender_female_chance = root_faith_dominant_gender_female_chance

	random_traits_list = {
		count = 1
		devoted = {}
		scholar = {}
		brave = {}
		gregarious = {}
		just = {}
		calm = {}
	}
	random_traits_list = {
		count = 1
		education_martial_2 = {}
		education_martial_3 = {}
		education_stewardship_2 = {}
		education_stewardship_3 = {}
		education_learning_2 = {}
		education_learning_3 = {}
	}
	random_traits = yes

	after_creation = {
		add_to_list = dispute_characters
		add_to_list = generated_dispute_characters
	}
}

symposium_template = {
	# General
	age = { 55 65 }
	dynasty = none
	faith = scope:symposium_ruler.faith
	culture = scope:symposium_ruler.culture
	gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
	# Traits
	trait = diligent
	random_traits_list = {
		count = 1
		education_learning_2 = { weight = { base = 2 } }
		education_learning_3 = { weight = { base = 2 } }
		education_learning_4 = { weight = { base = 1 } }
	}
	random_traits_list = {
		count = 1
		calm = {}
		patient = {}
		shy = {}
		zealous = {}
		intellect_good_1 = {}
		intellect_good_2 = {}
	}
	random_traits_list = {
		count = 1
		lifestyle_physician = { weight = { base = 3 } }
		lifestyle_mystic = { weight = { base = 3 } }
		scholar = { weight = { base = 9 } }
		theologian = { weight = { base = 6 } }
		devoted = { weight = { base = 6 } }
	}
	random_traits = yes
	# Skills
	diplomacy = { min_template_low_skill max_template_decent_skill }
	martial = { min_template_low_skill max_template_decent_skill }
	stewardship = { min_template_low_skill max_template_decent_skill }
	intrigue = { min_template_low_skill max_template_decent_skill }
	learning = { min_template_low_skill min_template_decent_skill }
	prowess = { min_template_low_skill max_template_decent_skill }
	# Misc
	after_creation = {
		# Learn root court language
		if = { 
			limit = {
				root = { has_royal_court = yes has_dlc_feature = royal_court }
				NOT = { knows_court_language_of = root }
			}
			learn_court_language_of = root
		}
		# Secrets
		if = {
			limit = { has_trait = lifestyle_mystic }
			random = {
				chance = 50
				add_secret = { type = secret_witch }
			}
		}
		if = {
			limit = {
				NOT = { has_trait = zealous }
			}
			random = {
				chance = 50
				add_secret = { type = secret_non_believer }
			}
		}
		# Extra language
		random_list = {
			2 = {
				trigger = {
					exists = scope:ling_cul_1_bonus
					NOT = { knows_language_of_culture = scope:ling_cul_1_bonus }
				}
				learn_language_of_culture = scope:ling_cul_1_bonus
			}
			2 = {
				trigger = {
					exists = scope:ling_cul_2_bonus
					NOT = { knows_language_of_culture = scope:ling_cul_2_bonus }
				}
				learn_language_of_culture = scope:ling_cul_2_bonus
			}
		}
		# Bonus language
		random = {
			chance = 50
			random_list = {
				2 = {
					trigger = {
						exists = scope:ling_cul_1_bonus
						NOT = { knows_language_of_culture = scope:ling_cul_1_bonus }
					}
					learn_language_of_culture = scope:ling_cul_1_bonus
				}
				2 = {
					trigger = {
						exists = scope:ling_cul_2_bonus
						NOT = { knows_language_of_culture = scope:ling_cul_2_bonus }
					}
					learn_language_of_culture = scope:ling_cul_2_bonus
				}
			}
		}
		add_random_tiered_trait_xp_effect = {
			TRAIT = lifestyle_mystic
			LEVEL_1 = yes
			LEVEL_3 = yes
		}
		add_random_tiered_trait_xp_effect = {
			TRAIT = lifestyle_physician
			LEVEL_1 = yes
			LEVEL_3 = yes
		}
	}
}

poet_template = {
	age = { 20 45 }
	faith = root.faith
	culture = root.culture
	dynasty = none
	#Misc
	random_traits = yes
	gender_female_chance = 50

	trait = lifestyle_poet

	diplomacy = { min_template_high_skill max_template_high_skill }
}

gardener_template = {
	age = { 40 60 }
	faith = root.faith
	culture = root.culture
	dynasty = none
	#Misc
	random_traits = yes
	gender_female_chance = 50

	random_traits_list = {
		count = 1
		education_stewardship_1 = { weight = { base = 80 } }
		education_stewardship_2 = { weight = { base = 50 } }
		education_stewardship_3 = { weight = { base = 20 } }
		education_stewardship_4 = { weight = { base = 5 } }
	}

	trait = lifestyle_gardener

	stewardship = { min_template_average_skill max_template_decent_skill }
}

preacher_template = {
	age = { 30 85 }
	dynasty = none
	trait = zealous
	trait = lifestyle_mystic
	random_traits_list = {
		count = 1
		education_learning_1 = { weight = { base = 80 } }
		education_learning_2 = { weight = { base = 50 } }
		education_learning_3 = { weight = { base = 20 } }
		education_learning_4 = { weight = { base = 5 } }
	}
	random_traits_list = {
		count = 1
		celibate = {}
		wrathful = {}
		temperate = {}
		reclusive = {}
		flagellant = {}
		inappetetic = {}
	}
	random_traits_list = {
		count = { 0 1 }
		lunatic_1 = {}
		lunatic_genetic = {}
		possessed_1 = {}
		possessed_genetic = {}
		devoted = {}
	}
	gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
	after_creation = {
		add_random_tiered_trait_xp_effect = {
			TRAIT = lifestyle_mystic
			LEVEL_1 = yes
			LEVEL_3 = yes
		}
	}
}
