﻿### Scandinavian adventurer templates

#Western Created Adventurers
histmod_western_warrior_character = {
	#General
	age = { 30 60 }
	faith = scope:scandinavian_county.faith
	culture = scope:scandinavian_county.culture
	#Education
	random_traits_list = {
		education_martial_2 = {
			weight = { base = 10 }
		}
		education_martial_3 = {
			weight = { base = 30 }
		}
		education_martial_4 = {
			weight = { base = 20 }
		}
	}
	#Personality
	random_traits_list = {
		count = 3
		wrathful = {}
		impatient = {}
		arrogant = {}
		brave = {}
		ambitious = {}
		diligent = {}
		gregarious = {}
		stubborn = {}
		fickle = {}
		vengeful = {}
	}
	#Misc
	trait = adventurer
	random_traits = yes
	gender_female_chance = {
		if = {
			limit = {
				OR = {
					scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_female_only_combatant }
					scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco }
				}
			}
			add = 100
		}
		else_if = {
			limit = {
				OR = {
					scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_equal_combatant }
					scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco }
				}
			}
			add = 50
		}
		else_if = {
			limit = {
				scope:scandinavian_county.culture = { has_cultural_parameter = has_access_to_shieldmaidens }
			}
			add = 10
		}
		else = {
			add = 0
		}
	}
	#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 = {
		# Possible Commander trait
		# Possible Commander trait
		if = {
			limit = { number_of_commander_traits < 1 }
			random_list = {
				10 = { add_trait = aggressive_attacker }
				10 = { add_trait = unyielding_defender }
				10 = { add_trait = winter_soldier }
				10 = { add_trait = reaver }
				10 = { add_trait = reckless }
				50 = {}
			}
		}
		# Possible Extra Trait
		if = {
			limit = { number_of_lifestyle_traits < 1 }
			random_list = {
				10 = { add_trait = lifestyle_hunter }
				10 = { add_trait = lifestyle_reveler }
				10 = { add_trait = athletic }
				10 = { add_trait = lunatic_genetic }
				10 = { add_trait = shrewd }
				10 = { add_trait = bastard }
				10 = { add_trait = education_martial_prowess_1 }
				10 = { add_trait = education_martial_prowess_2 }
				10 = { add_trait = education_martial_prowess_3 }
				10 = { add_trait = education_martial_prowess_4 }
				100 = {}
			}
		}
		else = {
			random_list = {
				10 = { add_trait = athletic }
				10 = { add_trait = lunatic_genetic }
				10 = { add_trait = bastard }
				10 = { add_trait = education_martial_prowess_1 }
				10 = { add_trait = education_martial_prowess_2 }
				10 = { add_trait = education_martial_prowess_3 }
				10 = { add_trait = education_martial_prowess_4 }
				70 = {}
			}
		}
		if = {
			limit = {
				is_female = yes
				scope:scandinavian_county.culture = { has_cultural_parameter = has_access_to_shieldmaidens }
				NOR = {
					has_trait = shieldmaiden
					scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_female_only_combatant }
					scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco }
					scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_equal_combatant }
					scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco }
				}
			}
			add_trait = shieldmaiden
		}
		if = {
			limit = {
				OR = {
					is_male = yes
					AND = {
						is_female = yes
						OR = {
							scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_female_only_combatant }
							scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco }
							scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_equal_combatant }
							scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco }
						}
					}
				}
			}
			random_list = {
				50 = {
					trigger = {
						is_female = yes
						NOT = { has_trait = shieldmaiden }
						scope:scandinavian_county.culture = { has_cultural_parameter = has_access_to_shieldmaidens }
					}
					add_trait = shieldmaiden
				}
				25 = {
					trigger = {
						is_male = yes
						NOR = {
							has_trait = berserker
							has_trait = viking
						}
					}
					add_trait = berserker
				}
				25 = {
					trigger = {
						NOR = {
							has_trait = berserker
							has_trait = viking
						}
					}
					add_trait = viking
				}
				25 = {
					trigger = {
						NOT = { has_trait = physique_good }
					}
					add_trait = physique_good_1
				}
				25 = {
					trigger = {
						NOT = { has_trait = physique_good }
					}
					add_trait = physique_good_2
				}
				25 = {
					trigger = {
						NOT = { has_trait = lifestyle_blademaster }
					}
					add_trait = lifestyle_blademaster
					add_trait_xp = {
						trait = lifestyle_blademaster
						value = {
							integer_range = {
								min = medium_lifestyle_random_xp_low
								max = medium_lifestyle_random_xp_high
							}
						}
					}
				}
				50 = {}
			}
		}
	}
}

#Eastern Created Adventurers
histmod_eastern_warrior_character = {
	#General
	age = { 30 60 }
	faith = scope:scandinavian_county.faith
	culture = scope:scandinavian_county.culture
	#Education
	random_traits_list = {
		education_martial_2 = {
			weight = { base = 10 }
		}
		education_martial_3 = {
			weight = { base = 30 }
		}
		education_martial_4 = {
			weight = { base = 20 }
		}
	}
	#Personality
	random_traits_list = {
		count = 3
		wrathful = {}
		impatient = {}
		arrogant = {}
		brave = {}
		ambitious = {}
		diligent = {}
		gregarious = {}
		stubborn = {}
		fickle = {}
		vengeful = {}
	}
	#Misc
	trait = adventurer
	random_traits = yes
	gender_female_chance = {
		if = {
			limit = {
				OR = {
					scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_female_only_combatant }
					scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco }
				}
			}
			add = 100
		}
		else_if = {
			limit = {
				OR = {
					scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_equal_combatant }
					scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco }
				}
			}
			add = 50
		}
		else_if = {
			limit = {
				scope:scandinavian_county.culture = { has_cultural_parameter = has_access_to_shieldmaidens }
			}
			add = 10
		}
		else = {
			add = 0
		}
	}
	#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 = {
		# Possible Commander trait
		if = {
			limit = { number_of_commander_traits < 1 }
			random_list = {
				10 = { add_trait = aggressive_attacker }
				10 = { add_trait = unyielding_defender }
				10 = { add_trait = winter_soldier }
				10 = { add_trait = reaver }
				10 = { add_trait = reckless }
				50 = {}
			}
		}
		# Possible Extra Trait
		if = {
			limit = { number_of_lifestyle_traits < 1 }
			random_list = {
				10 = { add_trait = lifestyle_hunter }
				10 = { add_trait = lifestyle_reveler }
				10 = { add_trait = athletic }
				10 = { add_trait = lunatic_genetic }
				10 = { add_trait = shrewd }
				10 = { add_trait = bastard }
				10 = { add_trait = education_martial_prowess_1 }
				10 = { add_trait = education_martial_prowess_2 }
				10 = { add_trait = education_martial_prowess_3 }
				10 = { add_trait = education_martial_prowess_4 }
				100 = {}
			}
		}
		else = {
			random_list = {
				10 = { add_trait = athletic }
				10 = { add_trait = lunatic_genetic }
				10 = { add_trait = bastard }
				10 = { add_trait = education_martial_prowess_1 }
				10 = { add_trait = education_martial_prowess_2 }
				10 = { add_trait = education_martial_prowess_3 }
				10 = { add_trait = education_martial_prowess_4 }
				70 = {}
			}
		}
		if = {
			limit = {
				is_female = yes
				scope:scandinavian_county.culture = { has_cultural_parameter = has_access_to_shieldmaidens }
				NOR = {
					has_trait = shieldmaiden
					scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_female_only_combatant }
					scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco }
					scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_equal_combatant }
					scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco }
				}
			}
			add_trait = shieldmaiden
		}
		if = {
			limit = {
				OR = {
					is_male = yes
					AND = {
						is_female = yes
						OR = {
							scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_female_only_combatant }
							scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco }
							scope:scandinavian_county.culture = { has_cultural_parameter = martial_custom_equal_combatant }
							scope:scandinavian_county.faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco }
						}
					}
				}
			}
			random_list = {
				50 = {
					trigger = {
						is_female = yes
						NOT = { has_trait = shieldmaiden }
						scope:scandinavian_county.culture = { has_cultural_parameter = has_access_to_shieldmaidens }
					}
					add_trait = shieldmaiden
				}
				25 = {
					trigger = {
						is_male = yes
						NOR = {
							has_trait = berserker
							has_trait = viking
						}
					}
					add_trait = berserker
				}
				25 = {
					trigger = {
						NOR = {
							has_trait = berserker
							has_trait = viking
						}
					}
					add_trait = viking
				}
				25 = {
					trigger = {
						NOT = { has_trait = physique_good }
					}
					add_trait = physique_good_1
				}
				25 = {
					trigger = {
						NOT = { has_trait = physique_good }
					}
					add_trait = physique_good_2
				}
				25 = {
					trigger = {
						NOT = { has_trait = lifestyle_blademaster }
					}
					add_trait = lifestyle_blademaster
					add_trait_xp = {
						trait = lifestyle_blademaster
						value = {
							integer_range = {
								min = medium_lifestyle_random_xp_low
								max = medium_lifestyle_random_xp_high
							}
						}
					}
				}
				50 = {}
			}
		}
	}
}

#Physician
histmod_physician_template = {
	age = { 24 50 }
	gender_female_chance = 50

	# Traits
	random_traits_list = {
		count = 1
		education_learning_2 = {}
		education_learning_3 = {}
		education_learning_4 = {}
	}
	trait = lifestyle_physician
	random_traits = yes
	
	# Skills
	learning = {
		min_template_medium_skill
		max_template_medium_skill
	}

	after_creation = {
		add_trait_xp = {
			trait = lifestyle_physician
			value = {
				medium_lifestyle_random_xp_low
				medium_lifestyle_random_xp_high
			}
		}
	}
}

#Scandinavian Adventurer Family
scandi_adventurer_wife = {
	age = { 19 26 }
	random_traits = yes
	random_traits_list = {
		education_diplomacy_1 = { weight = { base = 35 } }
		education_diplomacy_2 = { weight = { base = 35 } }
		education_diplomacy_3 = { weight = { base = 20 } }
		education_diplomacy_4 = { weight = { base = 10 } }
		education_stewardship_1 = { weight = { base = 35 } }
		education_stewardship_2 = { weight = { base = 35 } }
		education_stewardship_3 = { weight = { base = 20 } }
		education_stewardship_4 = { weight = { base = 10 } }
		education_intrigue_1 = { weight = { base = 35 } }
		education_intrigue_2 = { weight = { base = 35 } }
		education_intrigue_3 = { weight = { base = 20 } }
		education_intrigue_4 = { weight = { base = 10 } }
		education_learning_1 = { weight = { base = 35 } }
		education_learning_2 = { weight = { base = 35 } }
		education_learning_3 = { weight = { base = 20 } }
		education_learning_4 = { weight = { base = 10 } }
	}
	random_traits_list = {
		count = { 0 1 }
		diplomat = {}
		strategist = {}
		architect = {}
		schemer = {}
		scholar = {}
		whole_of_body = {}
		fecund = {}
		intellect_good_1 = {}
		physique_good_1 = {}
		beauty_good_1 = {}
	}
	random_traits_list = {
		count = { 0 1 }
		beauty_good_1 = {}
		beauty_good_2 = {}
		beauty_good_3 = {}
	}
	after_creation = {
		random = {
			chance = 1
			
			add_trait = lifestyle_poet
			
			modifier = {
				add = 10
				culture = { has_cultural_parameter = poet_trait_more_common }
			}
			modifier = {
				add = 5
				OR = {
					culture = { has_cultural_pillar = heritage_north_germanic }
					religion = religion:germanic_religion
				}
			}
		}
		set_interesting_traits_and_modifiers_effect = yes
	}
}

### Hauteville adventurer templates
hauteville_warrior_template = {
	faith = faith:catholic
	culture = culture:norman
	
	random_traits_list = {
		education_martial_2 = {
			weight = { base = 10 }
		}
		education_martial_3 = {
			weight = { base = 20 }
		}
		education_martial_4 = {
			weight = { base = 30 }
		}
	}
	random_traits_list = {
		aggressive_attacker = {}
		unyielding_defender = {}
		reckless = {}
		flexible_leader = {}
		logistician = {}
		military_engineer = {}
	}
	random_traits_list = {
		strong = {}
		athletic = {}
		lifestyle_hunter = {}
		lifestyle_blademaster = {}
		gallant = {}
	}
	
	random_traits = yes
	
	martial = { min_template_decent_skill max_template_high_skill }
	prowess = { min_template_decent_skill max_template_high_skill }
	
	after_creation = {
		set_interesting_traits_and_modifiers_effect = yes
		save_temporary_scope_as = new_adventurer
		every_character_trait = {
			limit = { is_bad_genetic_trait_trigger = yes }
			scope:new_adventurer = { remove_trait = prev }
		}
	}
}

hauteville_family_template = {
	faith = faith:catholic
	culture = culture:norman
	
	random_traits = yes
	
	after_creation = {
		set_interesting_traits_and_modifiers_effect = yes
		save_temporary_scope_as = new_adventurer
		every_character_trait = {
			limit = { is_bad_genetic_trait_trigger = yes }
			scope:new_adventurer = { remove_trait = prev }
		}
	}
}

