########################################################
#FP3 Character Templates
#######################################################

fp3_raging_ghazi_character = {
	#General
	age = { 18 40 }
	culture = root.culture
	faith = root.faith
	dynasty = none
	#Education
	random_traits_list = {
		education_martial_2 = {
			weight = { base = 30 }
		}
		education_martial_3 = {
			weight = { base = 20 }
		}
		education_martial_4 = {
			weight = { base = 10}
		}
	}
	trait = murderer
	random_traits_list = {
		count = 1
		irritable = {}
		drunkard = {}
	}
	random_traits_list = {
		count = 1
		aggressive_attacker = {}
		desert_warrior = {}
		reaver = {}
	}
	random_traits_list = {
		count = 3
		callous = {}
		gluttonous = {}
		impatient = {}
		sadistic = {}
		vengeful = {}
		wrathful = {}
		zealous = {}
	}
	random_traits_list = {
		count = 1
		faith_warrior = {}
		lifestyle_blademaster = {}
		strong = {}
		lunatic_1 = {}
		intellect_bad_1	= {}
	}
	random_traits = no
	gender_female_chance = root_soldier_female_chance
	#Skills
	diplomacy = { min_template_low_skill max_template_decent_skill }
	martial = { min_template_decent_skill max_template_high_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_decent_skill max_template_high_skill }
	after_creation = {
		add_random_tiered_trait_xp_effect = {
			TRAIT = lifestyle_blademaster
			LEVEL_1 = yes
			LEVEL_3 = no
		}
	}
}

fp3_chinese_grand_old_lady = {
	#General
	age = { 50 75 }
	dynasty = none
	gender = female
	faith = faith:zhengyi
	culture = culture:han
	#Education
	random_traits_list = {
		education_diplomacy_2 = {
			weight = { base = 20 }
		}
		education_diplomacy_3 = {
			weight = { base = 30 }
		}
		education_diplomacy_4 = {
			weight = { base = 10 }
		}
	}
	trait = arrogant
	trait = profligate
	trait = athletic
	random_traits_list = {
		count = 2
		brave = {}
		calm = {}
		gluttonous = {}
		impatient = {}
		gregarious = {}
		generous = {}
	}
	random_traits = no
	#Skills
	diplomacy = { min_template_decent_skill max_template_high_skill }
	martial = { min_template_low_skill max_template_decent_skill }
	stewardship = { min_template_low_skill max_template_decent_skill }
	intrigue = { min_template_decent_skill max_template_high_skill }
	learning = { min_template_decent_skill max_template_high_skill }
	prowess = { min_template_low_skill max_template_decent_skill }
}

fp3_chinese_eunuch_envoy = {
	#General
	age = { 20 55 }
	dynasty = none
	gender = male
	faith = faith:mahayana
	culture = culture:han
	#Education
	random_traits_list = {
		education_diplomacy_2 = {
			weight = { base = 20 }
		}
		education_diplomacy_3 = {
			weight = { base = 30 }
		}
		education_diplomacy_4 = {
			weight = { base = 10 }
		}
	}
	trait = brave
	trait = beardless_eunuch
	random_traits_list = {
		count = 2
		temperate = {}
		calm = {}
		gluttonous = {}
		stubborn = {}
		gregarious = {}
		generous = {}
	}
	random_traits = no
	#Skills
	diplomacy = { min_template_decent_skill max_template_high_skill }
	martial = { min_template_low_skill max_template_decent_skill }
	stewardship = { min_template_low_skill max_template_decent_skill }
	intrigue = { min_template_decent_skill max_template_high_skill }
	learning = { min_template_decent_skill max_template_high_skill }
	prowess = { min_template_low_skill max_template_decent_skill }
}

fp3_gnostic_paragon = {
	age = { 30 60 }
	dynasty = none
	faith = faith:manichean
	culture = culture:levantine
	#Education
	random_traits_list = {
		education_diplomacy_3 = {
			weight = { base = 30 }
		}
		education_diplomacy_4 = {
			weight = { base = 10}
		}
		education_learning_3 = {
			weight = { base = 30 }
		}
		education_learning_4 = {
			weight = { base = 10}
		}
	}
	trait = pilgrim
	trait = devoted
	random_traits_list = {
		count = 3
		diligent = {}
		brave = {}
		stubborn = {}
		honest = {}
		paranoid = {}
		calm = {}
		compassionate = {}
	}
	random_traits_list = { #something fun to give them character!
		count = 1
		lifestyle_mystic = {}
		theologian = {}
		journaller = {}
	}
	random_traits = no
	#Skills
	diplomacy = { min_template_decent_skill max_template_high_skill }
	martial = { min_template_low_skill max_template_decent_skill }
	stewardship = { min_template_low_skill max_template_decent_skill }
	intrigue = { min_template_decent_skill max_template_high_skill }
	learning = { min_template_decent_skill max_template_high_skill }
	prowess = { min_template_low_skill max_template_decent_skill }
	# Mystic XP (if applicable)
	after_creation = {
		add_random_tiered_trait_xp_effect = {
			TRAIT = lifestyle_mystic
			LEVEL_1 = yes
			LEVEL_3 = no
		}
	}
}

fp3_sufi_mystic = {
	age = { 30 80 }
	dynasty = none
	faith = root.faith
	culture = root.culture
	#Education
	random_traits_list = {
		education_learning_2 = {
			weight = { base = 30 }
		}
		education_learning_3 = {
			weight = { base = 30 }
		}
		education_learning_4 = {
			weight = { base = 10}
		}
	}
	trait = lifestyle_mystic
	random_traits_list = {
		count = 3
		calm = {}
		humble = {}
		stubborn = {}
		honest = {}
		just = {}
		zealous = {}
		compassionate = {}
		temperate = {}
		generous = {}
		shy = {}
		chaste = {}
	}
	random_traits_list = { #something fun to give them character!
		count = 1
		pilgrim = {}
		theologian = {}
		lifestyle_poet = {}
	}
	random_traits = no
	#Skills
	diplomacy = { min_template_decent_skill max_template_high_skill }
	martial = { min_template_low_skill max_template_decent_skill }
	stewardship = { min_template_low_skill max_template_decent_skill }
	intrigue = { min_template_decent_skill max_template_decent_skill }
	learning = { min_template_decent_skill max_template_high_skill }
	prowess = { min_template_low_skill max_template_decent_skill }
	after_creation = {
		if = {
			limit = { has_trait = lifestyle_mystic }
			add_random_tiered_trait_xp_effect = {
				TRAIT = lifestyle_mystic
				LEVEL_1 = yes
				LEVEL_3 = no
			}
		}
	}
}

fp3_zoroastrian_armed_pilgrim = {
	age = { 20 50 }
	dynasty = none
	#Education
	random_traits_list = {
		education_learning_2 = {
			weight = { base = 30 }
		}
		education_learning_3 = {
			weight = { base = 30 }
		}
		education_learning_4 = {
			weight = { base = 10}
		}
	}
	trait = lifestyle_mystic
	trait = pilgrim
	trait = zealous
	random_traits_list = {
		count = 2
		calm = {}
		humble = {}
		stubborn = {}
		honest = {}
		just = {}
		compassionate = {}
		temperate = {}
		generous = {}
		chaste = {}
	}
	random_traits_list = {
		count = 1
		scholar = {}
		theologian = {}
		lifestyle_poet = {}
	}
	random_traits = no
	#Skills
	diplomacy = { min_template_low_skill max_template_decent_skill }
	martial = { min_template_low_skill max_template_low_skill }
	stewardship = { min_template_low_skill max_template_decent_skill }
	intrigue = { min_template_low_skill max_template_decent_skill }
	learning = { min_template_decent_skill max_template_decent_skill }
	prowess = { min_template_low_skill max_template_decent_skill }
	after_creation = {
		if = {
			limit = { has_trait = lifestyle_mystic }
			add_random_tiered_trait_xp_effect = {
				TRAIT = lifestyle_mystic
				LEVEL_1 = yes
				LEVEL_3 = no
			}
			add_character_flag = {
				flag = need_priest_outfit
			}
		}
	}
}

fp3_young_rascal = {
	age = { 9 12 }
	dynasty = none
	#Personality
	random_traits_list = {
		count = 1
		rowdy = {}
		bossy = {}
		curious = {}
	}
	random_traits = no
	#Misc
	gender_female_chance = 50
	#Skills
	diplomacy = { min_template_average_skill max_template_average_skill }
	martial = { min_template_average_skill max_template_average_skill }
	stewardship = { min_template_average_skill max_template_average_skill }
	intrigue = { min_template_average_skill max_template_average_skill }
	learning = { min_template_average_skill max_template_average_skill }
	prowess = { min_template_average_skill max_template_average_skill }
}

fp3_adorable_orphan = {
	#General
	age = { 6 13 }
	faith = root.capital_county.faith
	culture = root.capital_county.culture
	dynasty = none
	trait = wild_oat
	#Personality
	random_traits_list = {
		count = 1
		rowdy = {}
		charming = {}
		curious = {}
		pensive = {}
		bossy = {}
	}
	random_traits_list = {
		count = 1
		shrewd = {}
		spindly = {}
		strong = {}
		scarred = {}
	}
	#Misc
	random_traits = no
	gender_female_chance = 50
	#Skills
	diplomacy = { min_template_low_skill max_template_high_skill }
	martial = { min_template_low_skill max_template_average_skill }
	stewardship = { min_template_average_skill max_template_high_skill }
	intrigue = { min_template_average_skill max_template_high_skill }
	learning = { min_template_low_skill max_template_average_skill }
	prowess = { min_template_low_skill max_template_average_skill }
}

fp3_turkic_traveler = {
	#General
	age = { 24 40 }
	culture = culture:turkish
	dynasty = none
	#Education
	random_traits_list = {
		education_martial_2 = {
			weight = { base = 20 }
		}
		education_martial_3 = {
			weight = { base = 30 }
		}
		education_martial_4 = {
			weight = { base = 10}
		}
	}
	trait = lifestyle_traveler
	random_traits_list = {
		count = 3
		brave = {}
		greedy = {}
		gregarious = {}
		wrathful = {}
		deceitful = {}
		ambitious = {}
	}

	random_traits = no
	gender_female_chance = root_soldier_female_chance
	#Skills
	diplomacy = { min_template_low_skill max_template_decent_skill }
	martial = { min_template_decent_skill max_template_decent_skill }
	stewardship = { min_template_low_skill max_template_low_skill }
	intrigue = { min_template_low_skill max_template_decent_skill }
	learning = { min_template_low_skill max_template_low_skill }
	prowess = { min_template_decent_skill max_template_decent_skill }
}

fp3_tomb_raider = {
	#General
	age = { 20 40 }
	dynasty = none
	#Education
	random_traits_list = {
		education_intrigue_1 = {
			weight = { base = 20 }
		}
		education_intrigue_2 = {
			weight = { base = 30 }
		}
		education_intrigue_3 = {
			weight = { base = 10}
		}
	}
	trait = lifestyle_traveler
	trait = cynical
	random_traits_list = {
		count = 2
		brave = {}
		greedy = {}
		gregarious = {}
		wrathful = {}
		deceitful = {}
		impatient = {}
		ambitious = {}
		vengeful = {}
		lustful = {}
		craven = {}
		fickle = {}
		arbitrary = {}
		diligent = {}
	}

	random_traits = no
	gender_female_chance = 50
	#Skills
	diplomacy = { min_template_low_skill max_template_decent_skill }
	martial = { min_template_low_skill max_template_low_skill }
	stewardship = { min_template_low_skill max_template_decent_skill }
	intrigue = { min_template_decent_skill max_template_decent_skill }
	learning = { min_template_low_skill max_template_low_skill }
	prowess = { min_template_low_skill max_template_low_skill }
}

fp3_turko-mongol_leader = {
	#General
	age = { 24 40 }
	culture = culture:turkish
	faith = faith:maturidi
	dynasty = generate
	#Education
	random_traits_list = {
		education_martial_2 = {
			weight = { base = 20 }
		}
		education_martial_3 = {
			weight = { base = 30 }
		}
		education_martial_4 = {
			weight = { base = 10}
		}
	}
	trait = ambitious
	trait = flexible_leader
	random_traits_list = {
		count = 2
		brave = {}
		greedy = {}
		gregarious = {}
		trusting = {}
		wrathful = {}
	}
	random_traits_list = {
		count = 1
		athletic = {}
		loyal = {}
		reaver = {}
	}
	random_traits_list = {
		count = 1
		lifestyle_hunter = {}
		strong = {}
	}
	random_traits = no
	gender_female_chance = root_soldier_female_chance
	#Skills
	diplomacy = { min_template_low_skill max_template_decent_skill }
	martial = { min_template_decent_skill max_template_high_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_decent_skill max_template_high_skill }
	after_creation = {
		add_random_tiered_trait_track_xp_effect = {
			TRAIT = lifestyle_hunter
			TRACK = hunter
			LEVEL_1 = yes
			LEVEL_3 = no
		}
	}
}

####FP3 Historical Characters####

#This is Ibn Sina, the great Iranian polymath. He's scripted here so we can potentialy use him in many events, or move him to the history files if needed later.

fp3_avicenna_template = {
	age = { 20 60 } #their rough age during the period of their flourishing
	name = "Ibn_Sina" #Avicenna
	gender = male
	faith = faith:maturidi
	culture = culture:persian
	dynasty_house = house:house_harmaytan #named for Harmaytan, his father's estate
	trait = intellect_good_3 #He was one of the Middle Ages' greatest geniuses
	trait = theologian
	trait = lifestyle_physician
	trait = education_learning_4
	trait = diligent
	trait = lifestyle_poet
	trait = weak #he was sickly and died quite young
	random_traits_list = { #his personality
		count = 2
		compassionate = {}
		calm = {}
		cynical = {}
		humble = {}
		patient = {}
	}
	random_traits = no
	#Skills
	learning = {
		min_template_high_skill
		max_template_high_skill
	}
	martial = 1
	prowess = 6
	diplomacy = 6
	intrigue = 4
	stewardship = 9
	after_creation = {
		add_trait_xp = {
			trait = lifestyle_physician
			value = 100
		}
	}
}

#This is Rhazes, the great Iranian polymath. He's scripted here so we can potentialy use him in many events, or move him to the history files if needed later.

fp3_rhazes_template = {
	age = { 30 70 } #their rough age during the period of their flourishing
	name = "Abu_Bakr_al-Razi" #Rhazes
	gender = male
	faith = faith:ashari
	culture = culture:persian
	dynasty = none
	trait = intellect_good_2 #He was one of the Middle Ages' greatest geniuses
	trait = lifestyle_herbalist
	trait = lifestyle_physician
	trait = education_learning_4
	trait = cynical
	trait = stubborn
	random_traits_list = { #his personality
		count = 1
		compassionate = {}
		calm = {}
	}
	random_traits = no
	#Skills
	learning = {
		min_template_high_skill
		max_template_high_skill
	}
	martial = 3
	prowess = 7
	diplomacy = 9
	intrigue = 7
	stewardship = 4
	after_creation = {
		add_trait_xp = {
			trait = lifestyle_physician
			value = 100
		}
	}
}

#This is Al-Akhwayni, a physician known for his treatment of mental disorders

fp3_al_akhwayni_template = {
	age = { 30 70 } #their rough age during the period of their flourishing
	name = "Al_Akhwayni" #Rhazes
	gender = male
	faith = faith:mutazila
	culture = culture:tajik
	dynasty = none
	trait = shrewd
	trait = journaller
	trait = lifestyle_physician
	trait = education_learning_3
	trait = ambitious
	trait = temperate
	random_traits_list = { #his personality
		count = 1
		compassionate = {}
		calm = {}
		diligent = {}
		patient = {}
	}
	random_traits = no
	#Skills
	learning = {
		min_template_high_skill
		max_template_high_skill
	}
	martial = 2
	prowess = 8
	diplomacy = 5
	intrigue = 5
	stewardship = 7
	after_creation = {
		add_trait_xp = {
			trait = lifestyle_physician
			value = 100
		}
	}
}

#This is Ferdowsi, the great Iranian author. He's scripted here so we can potentialy use him in many events, or move him to the history files if needed later.

fp3_ferdowsi_template = {
	age = { 40 85 } #their rough age during the period of their flourishing
	name = "Abul_Qasem_Ferdowsi" #Ferdowsi
	faith = faith:maturidi
	culture = culture:tajik
	gender = male
	dynasty_house = house:house_tusi
	trait = lifestyle_poet
	trait = intellect_good_1
	trait = education_diplomacy_3
	trait = compassionate
	trait = diligent
	trait = patient
	random_traits = no
	#Skills
	diplomacy = {
		min_template_high_skill
		max_template_high_skill
	}
	martial = 4
	prowess = 4
	learning = 12
	intrigue = 6
	stewardship = 10
}

fp3_skilled_outsider_template = {
	# General
	age = { 30 60 }
	dynasty = none
	# Education
	## We give out random low tier education traits, and we'll upgrade them later if we're in batch B.
	random_traits_list = {
		count = 1
		education_diplomacy_1 = {
			trigger = {
				OR = {
					scope:outsider_diplomacy_martial = yes
					scope:outsider_stewardship_diplomacy = yes
				}
			}
		}
		education_diplomacy_2 = {
			trigger = {
				OR = {
					scope:outsider_diplomacy_martial = yes
					scope:outsider_stewardship_diplomacy = yes
				}
			}
		}
		education_martial_1 = {
			trigger = {
				OR = {
					scope:outsider_martial_prowess = yes
					scope:outsider_diplomacy_martial = yes
					# As there's no main prowess education.
					scope:outsider_prowess_learning = yes
				}
			}
		}
		education_martial_2 = {
			trigger = {
				OR = {
					scope:outsider_martial_prowess = yes
					scope:outsider_diplomacy_martial = yes
					# As there's no main prowess education.
					scope:outsider_prowess_learning = yes
				}
			}
		}
		education_stewardship_1 = {
			trigger = {
				OR = {
					scope:outsider_stewardship_diplomacy = yes
					scope:outsider_intrigue_stewardship = yes
				}
			}
		}
		education_stewardship_2 = {
			trigger = {
				OR = {
					scope:outsider_stewardship_diplomacy = yes
					scope:outsider_intrigue_stewardship = yes
				}
			}
		}
		education_intrigue_1 = {
			trigger = {
				OR = {
					scope:outsider_intrigue_stewardship = yes
					scope:outsider_learning_intrigue = yes
				}
			}
		}
		education_intrigue_2 = {
			trigger = {
				OR = {
					scope:outsider_intrigue_stewardship = yes
					scope:outsider_learning_intrigue = yes
				}
			}
		}
		education_learning_1 = {
			trigger = {
				OR = {
					scope:outsider_learning_intrigue = yes
					scope:outsider_prowess_learning = yes
				}
			}
		}
		education_learning_2 = {
			trigger = {
				OR = {
					scope:outsider_learning_intrigue = yes
					scope:outsider_prowess_learning = yes
				}
			}
		}
	}
	# We random roll all of our traits.
	random_traits = yes
	gender_female_chance = root_soldier_female_chance
	# Skills
	diplomacy = {
		fp3_skilled_outsider_template_diplomacy_min_value
		fp3_skilled_outsider_template_diplomacy_max_value
	}
	martial = {
		fp3_skilled_outsider_template_martial_min_value
		fp3_skilled_outsider_template_martial_max_value
	}
	stewardship = {
		fp3_skilled_outsider_template_stewardship_min_value
		fp3_skilled_outsider_template_stewardship_max_value
	}
	intrigue = {
		fp3_skilled_outsider_template_intrigue_min_value
		fp3_skilled_outsider_template_intrigue_max_value
	}
	learning = {
		fp3_skilled_outsider_template_learning_min_value
		fp3_skilled_outsider_template_learning_max_value
	}
	prowess = {
		fp3_skilled_outsider_template_prowess_min_value
		fp3_skilled_outsider_template_prowess_max_value
	}
}
