﻿#################################### THE DUKE AND THE BODENSEE ######################################
#																									#
# The Duke of Swabia sat by the shores of the Bodensee with his fishing rod for many months without #
# reward. He had even put a lovely slice of dove pie on the hook, but his bucket remained empty.	#
# "Are there no characters in the lake?" he thought to himself and sighed. "At this rate, my court 	#
# will become desolate within a generation! My heir will have no diligent councillors, no brave 	#
# knights, and no wise crones to help him rule the lands!" 											#		
#																									#
# The Duke cried for a long, long while, and then stood up to gathering his things.					#
# "Thank God!" he suddenly exclaimed. "I have an idea!"												#
# If the lake was empty, could he not create some new characters and release them into the waters?  #
# If some of them married, the Bodensee would surely be repopulated in just a few years!			#
#																									#
# The clever Duke quickly got to work. He made maidens and adventurers, matrons and fools. Young	#
# and old he made them, weak and strong, wicked and pious. The sun rose in the sky and set again.	#
# Under the light of moon and stars, the Duke put the final touch on his creation. 					#
#																									#
# The next morning, he gently released the little characters into the waters. He watched them swim 	#
# away with tears of happiness trailing down his whiskered cheeks. This was farewell, but he was 	#
# certain - they would not be gone for long.														#
#																									#
# And this is the story behind why pools spawn new characters for the royal courts all over the 	#
# world. Whenever we throw our hook into the depths, we send a thought of gratitude to the noble 	#
# Duke of Swabia, and his marvelous creation.														#
#																									#
#####################################################################################################





#Notes
#Random Traits List contains relevant lifestyle traits and all personality traits exist in 1 template
#Template-specific skill min/max regulated through scripted values
#Template-specific education trait is weighted

pool_repopulate_prowess = {
	age = { 20 40 }
	random_traits = yes
	gender_female_chance = root_soldier_female_chance
	culture = root.culture
	faith = root.faith
	prowess = {
		min_guest_template_skill max_guest_template_skill
	}
	random_traits_list = {
		education_nht_prowess_1 = { weight = { base = 35 } }
		education_nht_prowess_2 = { weight = { base = 35 } }
		education_nht_prowess_3 = { weight = { base = 20 } }
		education_nht_prowess_4 = { weight = { base = 10 } }
	}
	random_traits_list = {
		count = { 0 1 }
		lifestyle_blademaster = {}
		gallant = {}
		nht_commander = {}
		nht_vanguard = {}
		nht_sentinel = {}
		brave = {}
		gluttonous = {}
		strong = {}
		athletic = {}
		lifestyle_hunter = {}
	}
	dynasty = none
	after_creation = {
		random_list = {
			200 = {
				# Character is of average weight, nothing happens	
			}
			25 = {
				change_current_weight = -25
			}
			25 = {
				change_current_weight = -75
			}
			25 = {
				change_current_weight = 25
			}
			25 = {
				change_current_weight = 75
			}
			5 = {
				change_current_weight = 100
			}
			5 = {
				change_current_weight = 200
			}
		}
		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
				}
			}
		}
		
		# Cultural Traditions
		if = {
			limit = {
				culture = {
					has_cultural_parameter = winter_soldier_trait_more_common
				}
				NOT = {
					has_trait = winter_soldier
				}
			}
			random = {
				chance = 10
				add_trait = winter_soldier
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = forest_fighter_trait_more_common
				}
				NOT = {
					has_trait = forest_fighter
				}
			}
			random = {
				chance = 10
				add_trait = forest_fighter
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = rough_terrain_expert_trait_more_common
				}
				NOT = {
					has_trait = rough_terrain_expert
				}
			}
			random = {
				chance = 10
				add_trait = rough_terrain_expert
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = desert_warrior_trait_more_common
				}
				NOT = {
					has_trait = desert_warrior
				}
			}
			random = {
				chance = 10
				add_trait = desert_warrior
			}
		}
		if = {
			limit = {
				culture = {
					has_cultural_parameter = jungle_stalker_trait_more_common
				}
				NOT = {
					has_trait = jungle_stalker
				}
			}
			random = {
				chance = 10
				add_trait = jungle_stalker
			}
		}
		set_interesting_traits_and_modifiers_effect = yes
		add_random_tiered_trait_xp_effect = {
			TRAIT = lifestyle_blademaster
			LEVEL_1 = yes
			LEVEL_3 = yes
		}
		add_random_tiered_trait_track_xp_effect = {
			TRAIT = lifestyle_hunter
			TRACK = hunter
			LEVEL_1 = yes
			LEVEL_3 = no
		}
		# ToTo Hastiluder
		if = {
			limit = { has_dlc_feature = tours_and_tournaments }
			random = {
				chance = 33
				add_trait = tourney_participant
				add_random_tourney_participant_level_effect = yes
			}
		}
	}
}