spawn_ehc_effect = {
if = { # Nilus the Younger b.910 #965
	limit = {
		current_year >= 868 
		current_year <= 970
		NOT = { exists = global_var:hchar_nilus_younger }
	}
	set_global_variable = { name = hchar_nilus_younger value = yes }
	title:b_rossano = {     # Rossano 
		save_scope_as = birth_location
		create_character = {
			age = 55
			name = "Nilus"
			dynasty_house = house:house_di_rossano
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = theologian
			trait = scholar
			trait = content
			trait = temperate
			trait = patient
			trait = devoted
			trait = reclusive
			trait = saint


			diplomacy = { min_template_medium_skill max_template_medium_skill }
			martial = { min_template_low_skill max_template_low_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_very_high_skill max_template_very_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = nilus_younger
			add_piety = 5000
			add_character_modifier = {
				modifier = founder_monasteries
			}
			add_character_modifier = {
				modifier = no_respect_authority
			}
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = nilus_younger } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Ferdowsi b.935
	limit = {
		current_year >= 1010
		current_year <= 1012
		NOT = { exists = global_var:hchar_ferdowsi }
	}
	set_global_variable = { name = hchar_ferdowsi value = yes }
	title:b_tus = {      
		save_scope_as = birth_location
		create_character = {
			age = 75
			name = "Ferdowsī"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = scholar
			trait = lifestyle_traveler
			trait = diligent
			trait = vengeful
			trait = patient
			trait = poet
			trait = improvident
			trait = depressed_1



			diplomacy = { min_template_medium_skill max_template_medium_skill }
			martial = { min_template_medium_skill max_template_medium_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_very_high_skill max_template_very_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = ferdowsi
			add_prestige = 1000
			add_character_modifier = {
				modifier = shahnameh
			}
			add_character_modifier = {
				modifier = dehqan
			}
			set_variable = legendary_author
			give_nickname = nick_mutanabbi
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			add_character_flag = mena_low_nobles
			save_scope_as = major
		}
		if = { limit = { has_variable = ferdowsi } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Pedro Martinez de Luna b. 1328
	limit = {
		current_year >= 1363 #1363
		current_year <= 1365
		NOT = { exists = global_var:hchar_deluna }
	}
	set_global_variable = { name = hchar_deluna value = yes }
	title:b_zaragoza = {      
		save_scope_as = birth_location
		create_character = {
			age = 35
			name = "Pedro"
			dynasty_house = house:house_martinez
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = faith:catholic
			culture = scope:birth_location.title_province.culture
			trait = education_intrigue_4
			trait = diplomat
			trait = lifestyle_traveler
			trait = gregarious
			trait = ambitious
			trait = stubborn
			trait = schemer



			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_medium_skill max_template_medium_skill }
			stewardship = { 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 }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = deluna
			add_prestige = 1000
			add_character_modifier = {
				modifier = canonlaw
			}
			add_character_modifier = {
				modifier = etsidoctor
			}
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = deluna } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Gonzalo de Berceo b.1196
	limit = {
		current_year >= 1216 #1216
		current_year <= 1218
		NOT = { exists = global_var:hchar_gonzalober }
	}
	set_global_variable = { name = hchar_gonzalober value = yes }
	title:b_logrono = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Gonzalo"
			dynasty_house = house:house_berceo
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = scholar
			trait = diligent
			trait = patient
			trait = calm
			trait = poet
			trait = loyal



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { 4 10 }
			stewardship = { 8 10 }
			intrigue = { 4 10 }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = gonzalober
			add_prestige = 1000
			add_character_modifier = {
				modifier = mesterde
			}
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = gonzalober } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Raymond of Penyafort b. 1175
	limit = {
		current_year >= 1210 #1210
		current_year <= 1212
		NOT = { exists = global_var:hchar_penyafort }
	}
	set_global_variable = { name = hchar_penyafort value = yes }
	title:b_barcelona = {      
		save_scope_as = birth_location
		create_character = {
			age = 35
			name = "Raymond"
			dynasty_house = house:house_Penyafort
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = faith:catholic
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_4
			trait = diplomat
			trait = lifestyle_traveler
			trait = compassionate
			trait = gregarious
			trait = just
			trait = theologian
			trait = devoted
			trait = scholar
			trait = saint



			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = penyafort
			add_prestige = 1000
			add_character_modifier = {
				modifier = canonlaw
			}
			add_character_modifier = {
				modifier = studia_linguarum
			}
			add_character_modifier = {
				modifier = vows_of_poverty
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = penyafort } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Anthony of Padua b. 1195
	limit = {
		current_year >= 1214 #1214
		current_year <= 869
		NOT = { exists = global_var:hchar_apadua }
	}
	set_global_variable = { name = hchar_apadua value = yes }
	title:b_lisboa = {      
		save_scope_as = birth_location
		create_character = {
			age = 19
			name = "Fernando"
			dynasty_house = house:house_apadua
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = faith:catholic
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = lifestyle_mystic
			trait = lifestyle_traveler
			trait = zealous
			trait = diligent
			trait = compassionate
			trait = theologian
			trait = scholar
			trait = devoted
			trait = reclusive
			trait = saint
			trait = intellect_good_2



			diplomacy = { min_template_high_skill max_template_high_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_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = apadua
			add_piety = 1000
			add_character_modifier = {
				modifier = powerful_speeches
			}
			add_character_modifier = {
				modifier = vows_of_poverty
			}
			add_trait_xp = {
				trait = lifestyle_mystic 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			set_variable = legendary_author
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = apadua } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Diego Gelmirez b.1069
	limit = {
		current_year >= 1089 #1089
		current_year <= 1091
		NOT = { exists = global_var:hchar_dgelmirez }
	}
	set_global_variable = { name = hchar_dgelmirez value = yes }
	title:b_padron = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Diego"
			dynasty_house = house:house_dgelmirez
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_stewardship_4
			trait = administrator
			trait = intrigue_court_2
			trait = diligent
			trait = ambitious
			trait = diplomat
			trait = architect
			trait = impatient
			trait = military_engineer



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = dgelmirez
			add_piety = 1000
			add_character_modifier = {
				modifier = sponsors_pilgrims
			}
			add_character_modifier = {
				modifier = historia_compos
			}
			set_variable = legendary_author
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = dgelmirez } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Ibn Quzman  b.1087
	limit = {
		current_year >= 1107 #1107
		current_year <= 1109
		NOT = { exists = global_var:hchar_ibnquzman }
	}
	set_global_variable = { name = hchar_ibnquzman value = yes }
	title:b_cordoba = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Abu Bakr"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = diligent
			trait = humble
			trait = lifestyle_traveler
			trait = gregarious
			trait = poet
			trait = intellect_good_2



			diplomacy = { min_template_decent_skill max_template_decent_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_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = ibnquzman
			add_piety = 1000
			add_prestige = 1000
			add_character_modifier = {
				modifier = zajals
			}
			add_character_modifier = {
				modifier = no_respect_authority
			}
			create_inspiration = book_inspiration
			set_variable = legendary_author
			add_character_flag = ai_will_not_convert
			save_scope_as = major
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
		}
		if = { limit = { has_variable = ibnquzman } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Lubna of Cordoba b.935
	limit = {
		current_year >= 955 #955
		current_year <= 957
		NOT = { exists = global_var:hchar_lubnacordoba }
	}
	set_global_variable = { name = hchar_lubnacordoba value = yes }
	title:b_cordoba = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Lubna"
			dynasty = none
			gender_female_chance = 100
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = diligent
			trait = humble
			trait = scholar
			trait = administrator
			trait = patient
			trait = poet
			trait = intellect_good_2



			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = lubnacordoba
			add_prestige = 1000
			add_character_modifier = {
				modifier = library_azahara
			}
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = lubnacordoba } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Ibn Sa'id al-Maghribi b.1213
	limit = {
		current_year >= 1243 #1243
		current_year <= 1245
		NOT = { exists = global_var:hchar_ibnsaid }
	}
	set_global_variable = { name = hchar_ibnsaid value = yes }
	title:b_andujar = {      
		save_scope_as = birth_location
		create_character = {
			age = 30
			name = "Ibn Said"
			dynasty_house = house:house_ibnsaid
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = diligent
			trait = calm
			trait = scholar
			trait = administrator
			trait = impatient
			trait = poet
			trait = lifestyle_traveler
			trait = pilgrim
			trait = hajjaj




			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = ibnsaid
			add_prestige = 1000
			add_character_modifier = {
				modifier = kitabal
			}
			add_character_modifier = {
				modifier = almughrib
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = ibnsaid } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Ibn Arabi b.1165
	limit = {
		current_year >= 1185 #1185
		current_year <= 1187
		NOT = { exists = global_var:hchar_ibnarabi }
	}
	set_global_variable = { name = hchar_ibnarabi value = yes }
	title:b_murcia = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Abū Abd Allāh"
			dynasty_house = house:house_ibnarabi
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = diligent
			trait = calm
			trait = scholar
			trait = lifestyle_mystic
			trait = fickle
			trait = poet
			trait = lifestyle_traveler
			trait = theologian




			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { 20 24 }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = ibnarabi
			add_prestige = 1000
			add_character_modifier = {
				modifier = insanalkamil
			}
			add_character_modifier = {
				modifier = wahdatal
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_mystic 
				value = 100
			}
			give_nickname = nick_shaykakbar
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = ibnarabi } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #al-Zahrawi b.936
	limit = {
		current_year >= 966 #976
		current_year <= 968
		NOT = { exists = global_var:hchar_alzahrawi }
	}
	set_global_variable = { name = hchar_alzahrawi value = yes }
	title:b_cordoba = {      
		save_scope_as = birth_location
		create_character = {
			age = 30
			name = "Abū al-Qāsim"
			dynasty_house = house:house_alzahrawi
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_5
			trait = diligent
			trait = compassionate
			trait = scholar
			trait = lifestyle_physician
			trait = honest
			trait = lifestyle_herbalist
			trait = lifestyle_gardener
			trait = overseer
			trait = whole_of_body
			trait = scholar





			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { 20 24 }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = alzahrawi
			add_prestige = 1000
			add_character_modifier = {
				modifier = fatherofsurgery
			}
			add_character_modifier = {
				modifier = kitabaltasrif
			}
			hidden_effect = {
				add_trait_xp = {
					trait = lifestyle_physician
					value = 100
				}
			}
		
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = alzahrawi } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Ibn Hazm b.994
	limit = {
		current_year >= 1014 #1014
		current_year <= 1016
		NOT = { exists = global_var:hchar_ibnhazm }
	}
	set_global_variable = { name = hchar_ibnhazm value = yes }
	title:b_cordoba = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Ibn Hazm"
			dynasty_house = house:house_ibnhazm
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = diligent
			trait = just
			trait = scholar
			trait = administrator
			trait = zealous
			trait = poet
			trait = theologian
			trait = lifestyle_physician




			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = ibnhazm
			add_prestige = 1000
			add_character_modifier = {
				modifier = tawqhamama
			}
			add_character_modifier = {
				modifier = muhalla
			}
			hidden_effect = {
				add_trait_xp = {
					trait = lifestyle_physician
					value = 100
				}
			}
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = ibnhazm } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Ibn Tufayl b.1105
	limit = {
		current_year >= 1125 #1125
		current_year <= 1127
		NOT = { exists = global_var:hchar_tufayl }
	}
	set_global_variable = { name = hchar_tufayl value = yes }
	title:b_granada = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Abu Bakr"
			dynasty_house = house:house_tufayl
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = diligent
			trait = calm
			trait = scholar
			trait = administrator
			trait = theologian
			trait = gregarious
			trait = poet
			trait = lifestyle_physician



			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = tufayl
			add_prestige = 1000
			add_character_modifier = {
				modifier = yaqzan
			}
			add_character_modifier = {
				modifier = andalusian_revolt
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = tufayl } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Simon of Kéza b.1230
	limit = {
		current_year >= 1250 #1250
		current_year <= 1252
		NOT = { exists = global_var:hchar_simonkeza }
	}
	set_global_variable = { name = hchar_simonkeza value = yes }
	title:b_pest = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Simon"
			dynasty_house = house:house_simonkeza
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = diligent
			trait = patient
			trait = scholar
			trait = journaller
			trait = calm
			trait = poet
			trait = lifestyle_traveler



			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = simonkeza
			add_prestige = 1000
			add_character_modifier = {
				modifier = gestahunghun
			}

			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = simonkeza } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Friar Julius b.1200
	limit = {
		current_year >= 1220 #1220
		current_year <= 1222
		NOT = { exists = global_var:hchar_fjulianus }
	}
	set_global_variable = { name = hchar_fjulianus value = yes }
	title:b_gyor = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Julianus"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = diligent
			trait = stubborn
			trait = scholar
			trait = devoted
			trait = brave
			trait = lifestyle_traveler
			trait = lifestyle_voyager



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = fjulianus
			add_prestige = 1000
			add_piety = 1000
			add_character_modifier = {
				modifier = magyarsearch
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = fjulianus } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Anonymus b.1170
	limit = {
		current_year >= 1190 #1190
		current_year <= 1192
		NOT = { exists = global_var:hchar_anonymusp }
	}
	set_global_variable = { name = hchar_anonymusp value = yes }
	title:b_zemplen = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Anonymus"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = diligent
			trait = content
			trait = scholar
			trait = administrator
			trait = just
			trait = journaller


			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = anonymusp
			add_prestige = 1000
			add_character_modifier = {
				modifier = studiedabroad
			}
			add_character_modifier = {
				modifier = gestahungary
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = anonymusp } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Rahel la Fermosa b.1165
	limit = {
		current_year >= 1185 #1185
		current_year <= 1188
		NOT = { exists = global_var:hchar_resra }
	}
	set_global_variable = { name = hchar_resra value = yes }
	title:b_toledo = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Rahel"
			dynasty_house = house:house_resra
			gender_female_chance = 100
			random_traits = no
			location = scope:birth_location.title_province
			faith = faith:rabbinism
			culture = culture:sephardi
			trait = education_intrigue_4
			trait = ambitious
			trait = gregarious
			trait = seducer
			trait = calm
			trait = beauty_good_3



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { min_template_high_skill max_template_high_skill }
			learning = { min_template_average_skill max_template_avetrage_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = resra
			add_piety = 1000
			add_prestige = 1000
			add_character_modifier = {
				modifier = jewish_protector
			}
			
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = resra } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Samuel ibn Naghrillah b.993
	limit = {
		current_year >= 1020 #1020
		current_year <= 1022
		NOT = { exists = global_var:hchar_samuelprince }
	}
	set_global_variable = { name = hchar_samuelprince value = yes }
	title:b_granada = {      
		save_scope_as = birth_location
		create_character = {
			age = 27
			name = "Samuel"
			dynasty_house = house:house_samuelprince
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = faith:rabbinism
			culture = culture:sephardi
			trait = education_stewardship_5
			trait = forgiving
			trait = humble
			trait = cautious_leader
			trait = compassionate
			trait = poet
			trait = scholar
			trait = administrator
			trait = overseer



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = samuelprince
			add_piety = 1000
			add_prestige = 1000
			add_character_modifier = {
				modifier = jewish_protector
			}
			add_character_modifier = {
				modifier = mevoha
			}
			create_inspiration = book_inspiration
			give_nickname = nick_samprince
			set_variable = legendary_author
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = samuelprince } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Xemone b.1090
	limit = {
		current_year >= 1110 #1110
		current_year <= 1112
		NOT = { exists = global_var:hchar_xemone }
	}
	set_global_variable = { name = hchar_xemone value = yes }
	title:b_granada = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Qasmuna"
			dynasty_house = house:house_samuelprince
			gender_female_chance = 100
			random_traits = no
			location = scope:birth_location.title_province
			faith = faith:rabbinism
			culture = culture:sephardi
			trait = education_learning_3
			trait = diligent
			trait = humble
			trait = compassionate
			trait = poet
			trait = beauty_good_2



			diplomacy = { 4 12 }
			martial = { 4 12 }
			stewardship = { 4 12 }
			intrigue = { 6 12 }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 4 8 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = xemone
			add_piety = 1000
			add_prestige = 1000

			create_inspiration = book_inspiration
			set_variable = legendary_author
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = xemone } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Sibrand of Holstein b.1057
	limit = {
		current_year >= 1190 #1190
		current_year <= 1192
		NOT = { exists = global_var:hchar_sholstein }
	}
	set_global_variable = { name = hchar_sholstein value = yes }
	title:b_lubeck = {      
		save_scope_as = birth_location
		create_character = {
			age = 33
			name = "Sibrand"
			dynasty_house = house:house_sholstein
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_2
			trait = diligent
			trait = compassionate
			trait = humble
			trait = pilgrim
			trait = faith_warrior
			trait = lifestyle_physician
			trait = order_member
			trait = lifestyle_gardener
		



			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_low_skill max_template_low_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 8 10 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = sholstein
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = firstgrandmaster
			}
			add_character_modifier = {
				modifier = kn_teutonic
			}
			
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = sholstein } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Hugues de Payens b.1070
	limit = {
		current_year >= 1118 #1118
		current_year <= 1120
		NOT = { exists = global_var:hchar_hpayens }
	}
	set_global_variable = { name = hchar_hpayens value = yes }
	title:b_troyes = {      
		save_scope_as = birth_location
		create_character = {
			age = 48
			name = "Hugues"
			dynasty_house = house:house_hpayens
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_3
			trait = diligent
			trait = zealous
			trait = temperate
			trait = lifestyle_surveyor
			trait = pilgrim
			trait = faith_warrior
			trait = lifestyle_traveler
			trait = organizer
			trait = loyal
			trait = order_member



			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_low_skill max_template_low_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = hpayens
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = firstgrandmaster
			}
			add_character_modifier = {
				modifier = kn_templar
			}
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = hpayens } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Raymond du Puy b.1083
	limit = {
		current_year >= 1121 #1121
		current_year <= 1123
		NOT = { exists = global_var:hchar_raypu }
	}
	set_global_variable = { name = hchar_raypu value = yes }
	title:b_viviers = {      
		save_scope_as = birth_location
		create_character = {
			age = 38
			name = "Raymond"
			dynasty_house = house:house_raypu
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_stewardship_4
			trait = diligent
			trait = zealous
			trait = just
			trait = lifestyle_surveyor
			trait = pilgrim
			trait = faith_warrior
			trait = lifestyle_traveler
			trait = organizer
			trait = diplomat
			trait = administrator
			trait = order_member



			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_low_skill max_template_low_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = raypu
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = kn_hospitaller
			}
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = raypu } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Blessed Gerard Sasso b.1040
	limit = {
		current_year >= 1099 #1099
		current_year <= 1101
		NOT = { exists = global_var:hchar_gsasso }
	}
	set_global_variable = { name = hchar_gsasso value = yes }
	title:b_amalfi = {      
		save_scope_as = birth_location
		create_character = {
			age = 59
			name = "Gerard"
			dynasty_house = house:house_gsasso
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_stewardship_3
			trait = humble
			trait = brave
			trait = pilgrim
			trait = compassionate
			trait = lifestyle_traveler
			trait = logistician
			trait = administrator
			trait = order_member
			trait = lifestyle_physician



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_low_skill max_template_low_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = gsasso
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = kn_hospitaller
			}
			add_character_modifier = {
				modifier = vows_of_poverty
			}
			add_character_modifier = {
				modifier = firstgrandmaster
			}
			
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = gsasso } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Robert of St. Albans b.1060
	limit = {
		current_year >= 1080 #1080
		current_year <= 1082
		NOT = { exists = global_var:hchar_ralbans }
	}
	set_global_variable = { name = hchar_ralbans value = yes }
	title:b_saint_albans = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Robert"
			dynasty_house = house:house_ralbans
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = brave
			trait = fickle
			trait = deceitful
			trait = strategist
			trait = faith_warrior
			trait = lifestyle_traveler
			trait = organizer
			trait = order_member



			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_high_skill max_template_high_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 = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = ralbans
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = kn_templar
			}
			add_character_flag = need_military_outfit
			save_scope_as = major
		}
		if = { limit = { has_variable = ralbans } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Raymond of Fitero b.1107
	limit = {
		current_year >= 1147 #1147
		current_year <= 1149
		NOT = { exists = global_var:hchar_rfitero }
	}
	set_global_variable = { name = hchar_rfitero value = yes }
	title:b_zaragoza = {      
		save_scope_as = birth_location
		create_character = {
			age = 40
			name = "Raymond"
			dynasty_house = house:house_rfitero
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_stewardship_3
			trait = diligent
			trait = zealous
			trait = ambitious
			trait = strategist
			trait = faith_warrior
			trait = lifestyle_traveler
			trait = devoted
			trait = holy_warrior
			trait = administrator
			trait = saint
			



			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_low_skill max_template_low_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = rfitero
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = founder_monasteries
			}
			add_character_modifier = {
				modifier = canonlaw
			}
			add_character_modifier = {
				modifier = firstgrandmaster
			}
			add_character_modifier = {
				modifier = kn_calatrava
			}
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = rfitero } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Robert de Craon
	limit = {
		current_year >= 1130 #1130
		current_year <= 1132
		NOT = { exists = global_var:hchar_rdecraon }
	}
	set_global_variable = { name = hchar_rdecraon value = yes }
	title:b_craon = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Robert"
			dynasty_house = house:house_rdecraon
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_stewardship_3
			trait = diligent
			trait = zealous
			trait = honest
			trait = lifestyle_surveyor
			trait = diplomat
			trait = faith_warrior
			trait = lifestyle_traveler
			trait = organizer
			trait = administrator
			trait = order_member



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_low_skill max_template_low_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = rdecraon
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = kn_templar
			}
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = rdecraon } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Pedro Fernández de Castro b.1115
	limit = {
		current_year >= 1165 #1165
		current_year <= 1167
		NOT = { exists = global_var:hchar_pfcastro }
	}
	set_global_variable = { name = hchar_pfcastro value = yes }
	title:b_madrid = {      
		save_scope_as = birth_location
		create_character = {
			age = 50
			name = "Pedro Fernández"
			dynasty_house = house:house_pfcastro
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = temperate
			trait = zealous
			trait = generous
			trait = pilgrim
			trait = faith_warrior
			trait = lifestyle_traveler
			trait = organizer
			trait = forder
			trait = order_member



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = pfcastro
			add_piety = 1000
			add_prestige = 1000
			add_character_modifier = {
				modifier = firstgrandmaster
			}
			add_character_modifier = {
				modifier = kn_santiago
			}
			add_character_modifier = {
				modifier = founder_monasteries
			}
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = pfcastro } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Rodrigo Álvarez
	limit = {
		current_year >= 1173 #1173
		current_year <= 1175
		NOT = { exists = global_var:hchar_ralvarez }
	}
	set_global_variable = { name = hchar_ralvarez value = yes }
	title:b_lugo = {      
		save_scope_as = birth_location
		create_character = {
			age = 35
			name = "Rodrigo"
			dynasty_house = house:house_ralvarez
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = temperate
			trait = zealous
			trait = stubborn
			trait = pilgrim
			trait = faith_warrior
			trait = lifestyle_traveler
			trait = holy_warrior
			trait = administrator
			trait = order_member
			trait = irritable



			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = ralvarez
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = kn_santiago
			}
			add_character_modifier = {
				modifier = firstgrandmaster
			}
			add_character_modifier = {
				modifier = kn_mountjoy
			}
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = ralvarez } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Gerard of Ridefort b.1140
	limit = {
		current_year >= 1170 #1170
		current_year <= 1172
		NOT = { exists = global_var:hchar_gridefort }
	}
	set_global_variable = { name = hchar_gridefort value = yes }
	title:b_bruges = {      
		save_scope_as = birth_location
		create_character = {
			age = 30
			name = "Gerard"
			dynasty_house = house:house_gridefort
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = arrogant
			trait = zealous
			trait = vengeful
			trait = pilgrim
			trait = faith_warrior
			trait = lifestyle_traveler
			trait = organizer
			trait = administrator
			trait = order_member



			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { 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 }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = gridefort
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = kingsmoney
			}
			add_character_modifier = {
				modifier = kn_templar
			}
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = gridefort } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Pedro Muñiz de Godoy b.1140
	limit = {
		current_year >= 1167 #1167
		current_year <= 1169
		NOT = { exists = global_var:hchar_munizdegodoy }
	}
	set_global_variable = { name = hchar_munizdegodoy value = yes }
	title:b_burgos = {      
		save_scope_as = birth_location
		create_character = {
			age = 27
			name = "Pedro Muñiz"
			dynasty_house = house:house_munizdegodoy
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = ambitious
			trait = zealous
			trait = gregarious
			trait = pilgrim
			trait = faith_warrior
			trait = lifestyle_traveler
			trait = organizer
			trait = unyielding_defender
			trait = strategist
			trait = order_member



			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_decent_skill max_template_decent_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = munizdegodoy
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = kn_alcantara
			}
			add_character_modifier = {
				modifier = kn_calatrava
			}
			add_character_modifier = {
				modifier = kn_santiago
			}
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = munizdegodoy } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Heinrich Walpot von Bassenheim
	limit = {
		current_year >= 1196 #1196
		current_year <= 1198
		NOT = { exists = global_var:hchar_hwalpt }
	}
	set_global_variable = { name = hchar_hwalpt value = yes }
	title:b_mainz = {      
		save_scope_as = birth_location
		create_character = {
			age = 40
			name = "Heinrich Walpot"
			dynasty_house = house:house_hwalpt
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = ambitious
			trait = zealous
			trait = brave
			trait = pilgrim
			trait = faith_warrior
			trait = order_member
			trait = holy_warrior
			trait = overseer



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_decent_skill max_template_decent_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = hwalpt
			add_piety = 1000
			add_prestige = 1000

			add_character_modifier = {
				modifier = firstgrandmaster
			}
			add_character_modifier = {
				modifier = kn_teutonic
			}
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = hwalpt } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Foulques de Villaret b.1274
	limit = {
		current_year >= 1299 #1299
		current_year <= 1301
		NOT = { exists = global_var:hchar_fvillaret }
	}
	set_global_variable = { name = hchar_fvillaret value = yes }
	title:b_beziers = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Foulques"
			dynasty_house = house:house_fvillaret
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_4
			trait = arrogant
			trait = ambitious
			trait = stubborn
			trait = faith_warrior
			trait = order_member
			trait = lifestyle_surveyor
			trait = lifestyle_traveler
			trait = overseer
			trait = logistician
			trait = unyielding_defender
			trait = profligate




			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { min_template_decent_skill max_template_decent_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = fvillaret
			add_piety = 1000
			add_prestige = 1000
		
			add_character_modifier = {
				modifier = kn_hospitaller
			}
			add_character_flag = need_military_outfit

			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = fvillaret } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Jacques de Molay b.1244
	limit = {
		current_year >= 1264 #1264
		current_year <= 1266
		NOT = { exists = global_var:hchar_jmolay }
	}
	set_global_variable = { name = hchar_jmolay value = yes }
	title:b_besancon = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Jacques"
			dynasty_house = house:house_jmolay
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = gregarious
			trait = zealous
			trait = ambitious
			trait = faith_warrior
			trait = order_member
			trait = lifestyle_surveyor
			trait = lifestyle_traveler




			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = jmolay
			add_piety = 1000
			add_prestige = 1000
			add_character_modifier = {
				modifier = lastgrandmaster
			}
			add_character_modifier = {
				modifier = kn_templar
			}
			add_character_flag = need_military_outfit

			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = jmolay } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Hermann von Salza b.1162
	limit = {
		current_year >= 1182 #1182
		current_year <= 1184
		NOT = { exists = global_var:hchar_hsalza }
	}
	set_global_variable = { name = hchar_hsalza value = yes }
	title:b_gleichenstein = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Hermann"
			dynasty_house = house:house_hsalza
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_5
			trait = gregarious
			trait = just
			trait = calm
			trait = faith_warrior
			trait = order_member
			trait = lifestyle_traveler
			trait = diplomat
		




			diplomacy = { min_template_very_high_skill max_template_very_high_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = hsalza
			add_piety = 1000
			add_prestige = 1000
			
			add_character_modifier = {
				modifier = kn_teutonic
			}
			add_character_flag = need_military_outfit

			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = hsalza } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Winrich von Kniprode b.1310
	limit = {
		current_year >= 1330 #1330
		current_year <= 1332
		NOT = { exists = global_var:hchar_wkniprode }
	}
	set_global_variable = { name = hchar_wkniprode value = yes }
	title:b_cologne = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Winrich"
			dynasty_house = house:house_wkniprode
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_4
			trait = just
			trait = zealous
			trait = temperate
			trait = faith_warrior
			trait = order_member
			trait = lifestyle_surveyor
			trait = holy_warrior
			trait = forder
			trait = lifestyle_traveler
			trait = avaricious
			trait = architect




			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = wkniprode
			add_piety = 1000
			add_prestige = 1000
			
			add_character_modifier = {
				modifier = kn_teutonic
			}
			add_character_modifier = {
				modifier = fortressbuilder
			}
			add_character_flag = need_military_outfit

			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = wkniprode } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Ulrich von Jungingen b.1360
	limit = {
		current_year >= 1380 #1380
		current_year <= 1382
		NOT = { exists = global_var:hchar_ujungingen }
	}
	set_global_variable = { name = hchar_ujungingen value = yes }
	title:b_grunningen = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Ulrich"
			dynasty_house = house:house_ujungingen
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = arrogant
			trait = zealous
			trait = stubborn
			trait = faith_warrior
			trait = order_member
			trait = holy_warrior
			trait = lifestyle_traveler
			trait = overseer
			trait = aggressive_attacker




			diplomacy = { min_template_low_skill max_template_low_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_decent_skill max_template_decent_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = ujungingen
			add_piety = 1000
			add_prestige = 1000
			
			add_character_modifier = {
				modifier = kn_teutonic
			}
			
			add_character_flag = need_military_outfit

			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = ujungingen } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Albert of Riga b.1165
	limit = {
		current_year >= 1215 #1215
		current_year <= 1217
		NOT = { exists = global_var:hchar_alriga }
	}
	set_global_variable = { name = hchar_alriga value = yes }
	title:b_stade = {      
		save_scope_as = birth_location
		create_character = {
			age = 50
			name = "Albert"
			dynasty_house = house:house_alriga
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_4
			trait = ambitious
			trait = zealous
			trait = patient
			trait = strategist
			trait = order_member
			trait = holy_warrior
			trait = lifestyle_traveler
			trait = architect
			trait = administrator




			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { 10 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = alriga
			add_piety = 1000
			add_prestige = 1000
			
			add_character_modifier = {
				modifier = firstgrandmaster
			}
			add_character_modifier = {
				modifier = kn_livonian
			}
			
			add_character_flag = need_military_outfit

			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = alriga } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { #Al Mansur  b.938
	limit = {
		current_year >= 963 #963
		current_year <= 965
		NOT = { exists = global_var:hchar_almanzor }
	}
	set_global_variable = { name = hchar_almanzor value = yes }
	title:b_algeciras = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Abū Āmir"
			dynasty_house = house:house_almanzor
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_stewardship_5
			trait = diligent
			trait = ambitious
			trait = zealous
			trait = administrator
			trait = holy_warrior
			trait = overseer
			trait = organizer
			trait = intrigue_court_2
			trait = schemer



			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_very_high_skill max_template_very_high_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_decent_skill max_template_decent_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_decent_skill max_template_decent_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = almanzor
			add_piety = 1000
			add_prestige = 1000
			add_character_modifier = {
				modifier = manzor_reform
			}
			give_nickname = nick_almanzor

			add_character_flag = ai_will_not_convert
			save_scope_as = major
			add_character_flag = need_military_outfit
		}
		if = { limit = { has_variable = almanzor } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Ramon Llull b.1232
	limit = {
		current_year >= 1252 #1252
		current_year <= 1254
		NOT = { exists = global_var:hchar_llull }
	}
	set_global_variable = { name = hchar_llull value = yes }
	title:b_palma = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Ramon"
			dynasty_house = house:house_llull
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = lifestyle_traveler
			trait = zealous
			trait = diligent
			trait = calm
			trait = theologian
			trait = lifestyle_mystic
			trait = scholar
			trait = poet




			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = llull
			add_prestige = 1000
			add_piety = 1000
			add_character_modifier = {
				modifier = faiths_mission
			}
			add_character_modifier = {
				modifier = llull_art
			}
			add_character_modifier = {
				modifier = vows_of_poverty
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = llull } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Pablo Christiani b.1210
	limit = {
		current_year >= 1243 #1243
		current_year <= 1245
		NOT = { exists = global_var:hchar_christiani }
	}
	set_global_variable = { name = hchar_christiani value = yes }
	title:b_tarascon = {      
		save_scope_as = birth_location
		create_character = {
			age = 33
			name = "Pablo"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = faith:conversos
			culture = scope:birth_location.title_province.culture
			trait = education_intrigue_3
			trait = diplomat
			trait = schemer
			trait = stubborn
			trait = gregarious
			trait = zealous
			trait = theologian
			trait = devoted



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = christiani
			add_prestige = 1000
			add_character_modifier = {
				modifier = dispute_barcelona
			}
			add_character_modifier = {
				modifier = vows_of_poverty
			}
			add_character_modifier = {
				modifier = faiths_mission
			}
			give_nickname = nick_christiani
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = christiani } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Nachmanides (Moses ben Nahman)
		limit = {
			current_year >= 1212
			current_year <= 1214
			NOT = { exists = global_var:hchar_nachmanides}
		}
		set_global_variable = { name = hchar_nachmanides value = yes }
		title:b_girona = {
			save_scope_as = birth_location
			create_character = {
				age = 18
				name = "Moses"
				dynasty_house = house:house_nahman
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = faith:rabbinism
				culture = culture:sephardi
				trait = education_learning_4
				trait = zealous
				trait = brave
				trait = just
				trait = theologian
				diplomacy = { min_template_high_skill max_template_high_skill }
				martial = { min_template_low_skill max_template_low_skill }
				stewardship = { min_template_high_skill max_template_high_skill }
				intrigue = { min_template_high_skill max_template_high_skill }
				learning = { min_template_high_skill max_template_high_skill }
				prowess = { min_template_low_skill max_template_low_skill }
				save_scope_as = historical_character
			}
			scope:historical_character ?= {
				historical_character_finalization_effect = yes
				set_variable = nachmanides
				give_nickname = nick_nachmanides
				add_character_modifier = {
					modifier = dispute_barcelona
				}
				add_character_modifier = {
					modifier = kabbalist
				}
				create_inspiration = book_inspiration
				add_piety = 10000
				add_character_flag = ai_will_not_convert
			}
			if = { limit = { has_variable = nachmanides } } # Error suppression
			spawn_historical_characters_boilerplate_effect = yes
		}
}


if = { # al-Mutanabbī b.910
	limit = {
		current_year >= 935
		current_year <= 937
		NOT = { exists = global_var:hchar_mutan }
	}
	set_global_variable = { name = hchar_mutan value = yes }
	title:b_al-kufa = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Ahmad"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_intrigue_3
			trait = intellect_good_2
			trait = lifestyle_hunter
			trait = lifestyle_traveler
			trait = stubborn
			trait = ambitious
			trait = arrogant
			trait = poet
			trait = peasant_leader


			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_medium_skill max_template_medium_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { min_template_high_skill max_template_high_skill }
			learning = { min_template_medium_skill max_template_medium_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = mutan
			add_prestige = 2000
			add_character_modifier = {
				modifier = Troublemaker
			}
			add_character_modifier = {
				modifier = Qasidas
			}
			set_variable = legendary_author
			give_nickname = nick_mutanabbi
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			add_character_flag = mena_low_nobles
			save_scope_as = major
		}
		if = { limit = { has_variable = mutan } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Sæmundr fróði b.1056
	limit = {
		current_year >= 1086 # 1086
		current_year <= 1088
		NOT = { exists = global_var:hchar_frodi }
	}
	set_global_variable = { name = hchar_frodi value = yes }
	title:b_hofn = {      
		save_scope_as = birth_location
		create_character = {
			age = 30
			name = "Saemundr"
			dynasty_house = house:house_oddaverjar
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = lifestyle_mystic
			trait = intellect_good_1
			trait = deceitful
			trait = eccentric
			trait = diligent
			trait = poet
			trait = scholar
			trait = witch


			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = frodi
			add_prestige = 2000
			add_character_modifier = {
				modifier = poeticedda
			}
			add_character_modifier = {
				modifier = founderoddi
			}
			set_variable = legendary_author
			give_nickname = nick_frodi
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = frodi } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Leif Erikson b.970
	limit = {
		current_year >= 1000 # 1000
		current_year <= 1003
		NOT = { exists = global_var:hchar_leiferik }
	}
	set_global_variable = { name = hchar_leiferik value = yes }
	title:b_olafsvik = {      
		save_scope_as = birth_location
		create_character = {
			age = 30
			name = "Leif"
			dynasty_house = house:house_rode
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_4
			trait = physique_good_2
			trait = just
			trait = honest
			trait = brave
			trait = viking
			trait = lifestyle_traveler
			trait = adventurer
			trait = organizer


			diplomacy = { min_template_medium_skill max_template_medium_skill }
			martial = { min_template_medium_skill max_template_medium_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_medium_skill max_template_medium_skill }
			prowess = { min_template_high_skill max_template_high_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = leiferik
			add_prestige = 2000
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_modifier = {
				modifier = exvinland
			}
			add_character_modifier = {
				modifier = faiths_mission
			}
			give_nickname = nick_the_lucky
			add_character_flag = need_military_outfit
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = leiferik } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Absalon of lund b.1128
	limit = {
		current_year >= 1158 # 1158
		current_year <= 1160
		NOT = { exists = global_var:hchar_absalon }
	}
	set_global_variable = { name = hchar_absalon value = yes }
	title:b_roskilde = {      
		save_scope_as = birth_location
		create_character = {
			age = 30
			name = "Absalon"
			dynasty_house = house:house_hvide
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_4
			trait = overseer
			trait = ambitious
			trait = zealous
			trait = stubborn
			trait = holy_warrior
			trait = scholar
			trait = celibate


			diplomacy = { min_template_medium_skill max_template_medium_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = absalon
			add_prestige = 2000
			add_character_modifier = {
				modifier = wendishcrusade
			}
			add_character_modifier = {
				modifier = promoteorders
			}
			add_character_flag = ai_will_not_convert
			add_character_flag = religious_catholic_high_clothes
			save_scope_as = major
		}
		if = { limit = { has_variable = absalon } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Olaf the Peacock b.938
	limit = {
		current_year >= 962 # 962
		current_year <= 964
		NOT = { exists = global_var:hchar_olafpc }
	}
	set_global_variable = { name = hchar_olafpc value = yes }
	title:b_olafsvik = {      
		save_scope_as = birth_location
		create_character = {
			age = 24
			name = "Olaf"
			dynasty_house = house:house_laxdaela
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_stewardship_3
			trait = diplomat
			trait = administrator
			trait = gregarious
			trait = calm
			trait = trusting
			trait = intellect_good_2
			trait = lifestyle_traveler
			trait = profligate
			trait = child_of_concubine_female



			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_low_skill max_template_low_skill }
			learning = { min_template_medium_skill max_template_medium_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = olafpc
			add_prestige = 1000
			add_character_modifier = {
				modifier = famoushall
			}
			add_character_modifier = {
				modifier = heirfortune
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 150
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 150
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			give_nickname = nick_the_peacock
			save_scope_as = major
		}
		if = { limit = { has_variable = olafpc } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Hrotsvitha b.935
	limit = {
		current_year >= 953
		current_year <= 955
		NOT = { exists = global_var:hchar_hrotsvitha }
	}
	set_global_variable = { name = hchar_hrotsvitha value = yes }
	title:b_hildesheim = {      
		save_scope_as = birth_location
		create_character = {
			age = 18
			name = "Roswitha"
			dynasty_house = house:house_gandersheim
			gender_female_chance = 100
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_4
			trait = shrewd
			trait = zealous
			trait = diligent
			trait = just
			trait = poet
			trait = journaller
			trait = loyal
			trait = celibate
			

			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_low_skill max_template_low_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = roswitha
			add_prestige = 1500
			add_piety = 1000
			add_character_modifier = {
				modifier = liber_primus
			}
			add_character_modifier = {
				modifier = liber_secundus
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
		save_scope_as = major
		}
		if = { limit = { has_variable = roswitha } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Bridget of Sweden b.1303
	limit = {
		current_year >= 1322 #1322
		current_year <= 1324
		NOT = { exists = global_var:hchar_bridget_of_sweden }
	}
	set_global_variable = { name = hchar_bridget_of_sweden value = yes }
	title:b_sigtuna = {      
		save_scope_as = birth_location
		create_character = {
			age = 19
			name = "Birgitta"
			dynasty_house = house:house_finsta
			gender_female_chance = 100
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_3
			trait = compassionate
			trait = humble
			trait = calm
			trait = devoted
			trait = lifestyle_physician
			trait = improvident
			trait = theologian
			trait = pilgrim
			trait = saint
			trait = lifestyle_mystic
			trait = possessed_1

			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_low_skill max_template_low_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { 6 16 }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = bridget_of_sweden
			add_piety = 1500
			add_character_modifier = {
				modifier = bridgettines
			}
			add_character_modifier = {
				modifier = founder_monasteries
			}
			add_trait_xp = {
				trait = lifestyle_mystic 
				value = 100
			}
			add_character_flag = ai_will_not_convert
		save_scope_as = major
		}
		if = { limit = { has_variable = bridget_of_sweden } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Oddi Helgason b.1070
	limit = {
		current_year >= 1095 #1095
		current_year <= 1098
		NOT = { exists = global_var:hchar_staroddi }
	}
	set_global_variable = { name = hchar_staroddi value = yes }
	title:b_vopnafjordur = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Oddi"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_2
			trait = diligent
			trait = patient
			trait = calm
			trait = journaller
			trait = scholar

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_medium_skill max_template_medium_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = staroddi
			add_prestige = 1500
			add_character_modifier = {
				modifier = oddatala
			}
			give_nickname = nick_oddi
			create_inspiration = book_inspiration
		save_scope_as = major
		}
		if = { limit = { has_variable = staroddi } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Henrik Harpestræng b.1160
	limit = {
		current_year >= 1160 #1181
		current_year <= 1163
		NOT = { exists = global_var:hchar_henrikh }
	}
	set_global_variable = { name = hchar_henrikh value = yes }
	title:b_vopnafjordur = {      
		save_scope_as = birth_location
		create_character = {
			age = 21
			name = "Henrik"
			dynasty_house = house:house_harpestrang
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = diligent
			trait = patient
			trait = calm
			trait = journaller
			trait = scholar
			trait = lifestyle_herbalist
			trait = lifestyle_physician

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = henrikh
			add_prestige = 1500
			add_character_modifier = {
				modifier = urtebog
			}
			add_character_modifier = {
				modifier = studiedabroad
			}
			create_inspiration = book_inspiration
		save_scope_as = major
		}
		if = { limit = { has_variable = henrikh } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Bo Johnsson b.1330
	limit = {
		current_year >= 1355 #1355
		current_year <= 1358
		NOT = { exists = global_var:hchar_bojo }
	}
	set_global_variable = { name = hchar_bojo value = yes }
	title:b_talje = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Bo Johnsson"
			dynasty_house = house:house_grip
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_intrigue_5
			trait = diligent
			trait = callous
			trait = ambitious
			trait = avaricious
			trait = schemer

			diplomacy = { min_template_medium_skill max_template_medium_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { 18 20 }
			learning = { min_template_medium_skill max_template_medium_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = bojo
			add_prestige = 1500
			add_character_modifier = {
				modifier = ownsall
			}
			add_character_modifier = {
				modifier = fortressbuilder
			}
		save_scope_as = major
		}
		if = { limit = { has_variable = bojo } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Palnatoke b.940
	limit = {
		current_year >= 975 #975
		current_year <= 978
		NOT = { exists = global_var:hchar_palnatoke }
	}
	set_global_variable = { name = hchar_palnatoke value = yes }
	title:b_odense = {      
		save_scope_as = birth_location
		create_character = {
			age = 35
			name = "Toki"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = zealous
			trait = vengeful
			trait = stubborn
			trait = overseer
			trait = lifestyle_hunter
			trait = reaver
			trait = viking
			trait = order_member

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_high_skill max_template_high_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = palnatoke
			add_prestige = 1500
			add_character_modifier = {
				modifier = ljoms
			}
			add_character_modifier = {
				modifier = mastermark
			}
			give_nickname = nick_palnatoke
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
		save_scope_as = major
		}
		if = { limit = { has_variable = palnatoke } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Thorkell the Tall b.970
	limit = {
		current_year >= 1010 #1010
		current_year <= 1013
		NOT = { exists = global_var:hchar_thorkell }
	}
	set_global_variable = { name = hchar_thorkell value = yes }
	title:b_lund = {      
		save_scope_as = birth_location
		create_character = {
			age = 40
			name = "Thorkell"
			dynasty_house = house:house_wolin
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = fickle
			trait = patient
			trait = gregarious
			trait = overseer
			trait = giant
			trait = reaver
			trait = viking
			trait = order_member

			diplomacy = { min_template_medium_skill max_template_medium_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_high_skill max_template_high_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = thorkell
			add_prestige = 1500
			add_character_modifier = {
				modifier = ljoms
			}
			add_character_modifier = {
				modifier = mentorcnut
			}
			give_nickname = nick_the_tall
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
		save_scope_as = major
		}
		if = { limit = { has_variable = thorkell } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # John Barbour b.1320
	limit = {
		current_year >= 1378
		current_year <= 1380
		NOT = { exists = global_var:hchar_jbarbour }
	}
	set_global_variable = { name = hchar_jbarbour value = yes }
	title:b_aberdeen = {      
		save_scope_as = birth_location
		create_character = {
			age = 58
			name = "John"
			dynasty_house = house:house_barbour
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_stewardship_4
			
			trait = zealous
			trait = diligent
			trait = just
			trait = poet
			trait = journaller
			trait = scholar
			trait = administrator

			diplomacy = { min_template_medium_skill max_template_medium_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = jbarbour
			add_prestige = 1500
			add_piety = 1000
			add_character_modifier = {
				modifier = the_brus
			}
			add_character_modifier = {
				modifier = stewartis_oryginalle
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = jbarbour } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Jetsun Milarepa b.1028
	limit = {
		current_year >= 1100
		current_year <= 1102
		NOT = { exists = global_var:hchar_milarepa }
	}
	set_global_variable = { name = hchar_milarepa value = yes }
	title:b_teglakar = {      
		save_scope_as = birth_location
		create_character = {
			age = 72
			name = "Jetsun Milarepa"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_5
			
			trait = forgiving
			trait = honest
			trait = compassionate
			trait = poet
			trait = lifestyle_traveler
			trait = theologian
			trait = lifestyle_mystic
			trait = whole_of_body
			trait = devoted
			trait = saint

			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_medium_skill max_template_medium_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = milarepa
			add_prestige = 1500
			add_piety = 4000
			add_character_modifier = {
				modifier = songs_milarepa
			}
			add_character_modifier = {
				modifier = kailash
			}
			add_trait_xp = {
				trait = lifestyle_mystic 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 150
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 150
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			add_character_flag = no_beard
			save_scope_as = major
		}
		if = { limit = { has_variable = milarepa } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Jayadeva b.1170
	limit = {
		current_year >= 1195
		current_year <= 1197
		NOT = { exists = global_var:hchar_jayadeva }
	}
	set_global_variable = { name = hchar_jayadeva value = yes }
	title:b_puri = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Jayadeva"
			dynasty_house = house:house_goswami
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_5
			
			trait = gregarious
			trait = temperate
			trait = compassionate
			trait = poet
			trait = theologian
			trait = lifestyle_mystic
			trait = reclusive

			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_medium_skill max_template_medium_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = jayadeva
			add_prestige = 1000
			add_piety = 2000
			add_character_modifier = {
				modifier = gitagovinda
			}
			add_character_modifier = {
				modifier = odissimusic
			}
			add_trait_xp = {
				trait = lifestyle_mystic 
				value = 100
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			add_character_flag = no_hat
			save_scope_as = major
		}
		if = { limit = { has_variable = jayadeva } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Wolfram of Eschenbach b.1180
	limit = {
		current_year >= 1215 #1215
		current_year <= 1217
		NOT = { exists = global_var:hchar_eschenbach }
	}
	set_global_variable = { name = hchar_eschenbach value = yes }
	title:b_ansbach = {      
		save_scope_as = birth_location
		create_character = {
			age = 35
			name = "Wolfram"
			dynasty_house = house:house_eschenbach
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_3
			
			trait = zealous
			trait = gregarious
			trait = just
			trait = poet
			trait = lifestyle_traveler
			trait = gallant
			trait = tourney_participant

			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { 6 16 }
			learning = { min_template_medium_skill max_template_medium_skill }
			prowess = { min_template_decent_skill max_template_decent_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = eschenbach
			add_prestige = 1000
			add_character_modifier = {
				modifier = illiterate_poet
			}
			add_character_modifier = {
				modifier = minnesinger
			}
			set_variable = legendary_author
			
			add_trait_xp = {
				trait = tourney_participant
				track = wit 
				value = 150
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 150
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 150
			}
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
			add_character_flag = need_military_outfit

		}
		if = { limit = { has_variable = eschenbach } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Marie de France b.1145
	limit = {
		current_year >= 1170
		current_year <= 1173
		NOT = { exists = global_var:hchar_mfrance }
	}
	set_global_variable = { name = hchar_mfrance value = yes }
	title:b_paris = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Marie"
			dynasty_house = house:house_mfrance
			gender_female_chance = 100
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_4
			trait = shrewd
			trait = compassionate
			trait = honest
			trait = just
			trait = poet
			trait = journaller


			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { 6 16 }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = mfrance
			add_prestige = 2000
			add_character_modifier = {
				modifier = Lais_Romance
			}
			add_character_modifier = {
				modifier = women_advocate
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = mfrance } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Margery Kempe b.1373
	limit = {
		current_year >= 1414
		current_year <= 1416
		NOT = { exists = global_var:hchar_mkempe }
	}
	set_global_variable = { name = hchar_mkempe value = yes }
	title:b_lynn = {      
		save_scope_as = birth_location
		create_character = {
			age = 41
			name = "Margery"
			dynasty_house = house:house_kempe
			gender_female_chance = 100
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = pilgrim
			trait = diligent
			trait = zealous
			trait = temperate
			trait = lifestyle_mystic
			trait = depressed_1
			trait = contrite
			trait = fecund
			trait = shrewd
			trait = celibate
			



			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_low_skill max_template_low_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { 6 16 }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = mkempe
			add_prestige = 1000
			add_piety = 1000
			add_character_modifier = {
				modifier = illiterate_poet
			}
			add_character_modifier = {
				modifier = open_weeping
			}
			add_trait_xp = {
				trait = lifestyle_mystic 
				value = 100
			}
			add_trait_xp = {
				trait = pilgrim 
				value = 100
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		create_character = {
			age = 44
			name = "John"
			dynasty_house = house:house_kempe
			gender_female_chance = 0
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = celibate

			save_scope_as = additional_character_1
		}
		scope:additional_character_1 ?= {
			save_scope_as = major
			marry = scope:historical_character
		}
		create_character = {
			age = 19
			name = "John"
			dynasty_house = house:house_kempe
			gender_female_chance = 0
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			

			save_scope_as = additional_character_2
		}
		scope:additional_character_2 ?= {
			save_scope_as = major
			set_mother = scope:historical_character
			set_father = scope:additional_character_1
		}
		create_character = {
			age = 0
			dynasty_house = house:house_kempe
			gender_female_chance = 50
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			

			save_scope_as = additional_character_3
		}
		scope:additional_character_3 ?= {
			save_scope_as = major
			set_mother = scope:historical_character
			set_father = scope:additional_character_1
		}
		if = { limit = { has_variable = mkempe } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Anselm of Canterbury b.1033
	limit = {
		current_year >= 1077
		current_year <= 1079
		NOT = { exists = global_var:hchar_anselm_canterbury }
	}
	set_global_variable = { name = hchar_anselm_canterbury value = yes }
	title:b_aosta = {     # Aosta 
		save_scope_as = birth_location
		create_character = {
			age = 44
			name = "Anselm"
			dynasty_house = house:house_aosta
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_5
			trait = theologian
			trait = scholar
			trait = honest
			trait = just
			trait = stubborn
			trait = devoted
			trait = contrite
			trait = saint


			diplomacy = { min_template_medium_skill max_template_medium_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = anselm_canterbury
			add_piety = 5000
			add_character_modifier = {
				modifier = Monologion
			}
			add_character_modifier = {
				modifier = Proslogion
			}
			set_variable = legendary_author
			create_inspiration = book_inspiration
			add_character_flag = no_beard
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = anselm_canterbury } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # St.Dominic b.1170
	limit = {
		current_year >= 1216
		current_year <= 1218
		NOT = { exists = global_var:hchar_stdominic }
	}
	set_global_variable = { name = hchar_stdominic value = yes }
	title:b_lerma = {     # Caleruega 
		save_scope_as = birth_location
		create_character = {
			age = 46
			name = "Dominic"
			dynasty_house = house:house_caleruega
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_5
			trait = theologian
			trait = scholar
			trait = content
			trait = humble
			trait = zealous
			trait = devoted
			trait = improvident
			trait = saint
			trait = lifestyle_traveler


			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = stdominic
			add_piety = 5000
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			add_character_modifier = {
				modifier = Order_of_Preachers
			}
			add_character_modifier = {
				modifier = vows_of_poverty
			}
			add_character_flag = no_beard
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = stdominic } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # St.Francis of Assisi b.1181
	limit = {
		current_year >= 1224
		current_year <= 1225
		NOT = { exists = global_var:hchar_stfrancis }
	}
	set_global_variable = { name = hchar_stfrancis value = yes }
	title:b_assissi = {     # Assisi
		save_scope_as = birth_location
		create_character = {
			age = 43
			name = "Francis"
			dynasty_house = house:house_assisi
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_5
			trait = theologian
			trait = chaste
			trait = humble
			trait = compassionate
			trait = devoted
			trait = improvident
			trait = saint
			trait = lifestyle_traveler
			trait = lifestyle_mystic
			trait = blind
			trait = lifestyle_herbalist



			diplomacy = { min_template_medium_skill max_template_medium_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = stfrancis
			add_piety = 5000
			add_trait_xp = {
				trait = lifestyle_mystic 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			add_character_modifier = {
				modifier = stigmata
			}
			add_character_modifier = {
				modifier = vows_of_poverty
			}
			add_character_flag = no_beard
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = stfrancis } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Bernard of Clairvaux b.1090
	limit = {
		current_year >= 1129
		current_year <= 1130
		NOT = { exists = global_var:hchar_bernard }
	}
	set_global_variable = { name = hchar_bernard value = yes }
	title:b_dijon = {     # Dijon 
		save_scope_as = birth_location
		create_character = {
			age = 39
			name = "Bernard"
			dynasty_house = house:house_Clairvaux
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_4
			trait = theologian
			trait = diplomat
			trait = lifestyle_mystic
			trait = zealous
			trait = diligent
			trait = gregarious
			trait = devoted
			trait = journaller
			trait = saint


			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_medium_skill max_template_medium_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = bernard
			set_variable = legendary_author #De Laudibus Novae Militiae
			add_piety = 5000
			add_character_modifier = {
				modifier = De_Laudibus_Novae_Militiae
			}
			create_inspiration = book_inspiration
			add_character_flag = no_beard
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = bernard } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Sylvester II b.946
	limit = {
		current_year >= 980
		current_year <= 984
		NOT = { exists = global_var:hchar_gerbert }
	}
	set_global_variable = { name = hchar_gerbert value = yes }
	title:b_aurillac = {     # Aurillac 
		save_scope_as = birth_location
		create_character = {
			age = 34
			name = "Gerbert"
			dynasty_house = house:house_Aurillac
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = scholar
			trait = shrewd
			trait = diligent
			trait = eccentric
			trait = chaste
			trait = devoted
			trait = scholarly_court_2
			trait = lifestyle_traveler
			trait = saint


			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_high_skill max_template_high_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = gerbert
			set_variable = legendary_author #Liber abaci
			add_piety = 5000
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			add_character_modifier = {
				modifier = studiedabroad
			}
			add_character_modifier = {
				modifier = iberian_tolerance
			}
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = gerbert } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Guigo the carthusian
	limit = {
		current_year >= 1170
		current_year <= 1175
		NOT = { exists = global_var:hchar_guigo }
	}
	set_global_variable = { name = hchar_guigo value = yes }
	title:b_chambery = {      
		save_scope_as = birth_location
		create_character = {
			age = 50
			name = "Guigo"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = theologian
			trait = humble
			trait = diligent
			trait = patient
			trait = devoted
			trait = reclusive
			


			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = guigo
			set_variable = legendary_author #Scala Claustralium
			add_piety = 5000
			add_character_modifier = {
				 modifier = scala_claustralium
			}
			set_variable = legendary_author #Scala Claustralium
			give_nickname = nick_carthusian
			create_inspiration = book_inspiration
			add_character_flag = no_beard
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = guigo } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Raniero Fasani
	limit = {
		current_year >= 1260
		current_year <= 1262
		NOT = { exists = global_var:hchar_fasani }
	}
	set_global_variable = { name = hchar_fasani value = yes }
	title:b_perugia = {     # Perugia 
		save_scope_as = birth_location
		create_character = {
			age = 35
			name = "Raniero"
			dynasty_house = house:house_fasani
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_2
			trait = zealous
			trait = paranoid
			trait = stubborn
			trait = flagellant
			trait = devoted
			trait = reclusive
			trait = lifestyle_mystic
			trait = possessed_1


			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { 4 12 }
			stewardship = { 4 12 }
			intrigue = { 9 12 }
			learning = { 4 12 }
			prowess = { 4 12 }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = fasani
			add_piety = 5000
			add_character_modifier = {
				modifier = Flagellantism
			}
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = fasani } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Berthold von Regensburg b.1210
	limit = {
		current_year >= 1250
		current_year <= 1252
		NOT = { exists = global_var:hchar_berburg }
	}
	set_global_variable = { name = hchar_berburg value = yes }
	title:b_regensburg = {     # regensburg 
		save_scope_as = birth_location
		create_character = {
			age = 40
			name = "Berthold"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_3
			trait = zealous
			trait = temperate
			trait = eccentric
			trait = devoted
			trait = diplomat
			trait = scholar
			trait = lifestyle_traveler

			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = berburg
			add_piety = 5000
			add_character_modifier = {
				modifier = catharian_cats
			}
			add_character_modifier = {
				modifier = against_crusade
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			create_inspiration = book_inspiration
			add_character_flag = no_beard
			add_character_flag = ai_will_not_convert
			save_scope_as = major
		}
		if = { limit = { has_variable = berburg } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Werner von Urslingen b.1308
	limit = {
		current_year >= 1328 #1328
		current_year <= 1330
		NOT = { exists = global_var:hchar_wurslingen }
	}
	set_global_variable = { name = hchar_wurslingen value = yes }
	title:b_rottweil = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Werner"
			dynasty_house = house:house_urslingen
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_4
			trait = callous
			trait = cynical
			trait = greedy
			trait = overseer
			trait = disloyal
			trait = reaver
			trait = military_engineer

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_very_high_skill max_template_very_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_high_skill max_template_high_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = wurslingen
			add_prestige = 1500
			add_character_modifier = {
				modifier = great_company
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
			}
			add_character_flag = need_military_outfit
		save_scope_as = major
		}
		if = { limit = { has_variable = wurslingen } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Lodrisio Visconti b.1280
	limit = {
		current_year >= 1300 #1300
		current_year <= 1302
		NOT = { exists = global_var:hchar_lvisconti }
	}
	set_global_variable = { name = hchar_lvisconti value = yes }
	title:b_milano = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Lodrisio"
			dynasty_house = house:house_lvisconti
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = diligent
			trait = ambitious
			trait = vengeful
			trait = overseer
			trait = flexible_leader
			trait = logistician

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_high_skill max_template_high_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = lvisconti
			add_prestige = 1500
			add_character_modifier = {
				modifier = company_stgeorg
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
			}
			add_character_flag = need_military_outfit
		save_scope_as = major
		}
		if = { limit = { has_variable = lvisconti } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Eustace the Monk b.1170
	limit = {
		current_year >= 1205 #1205
		current_year <= 1207
		NOT = { exists = global_var:hchar_emonk }
	}
	set_global_variable = { name = hchar_emonk value = yes }
	title:b_hesdin = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Eustace"
			dynasty_house = house:house_busket
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = vengeful
			trait = deceitful
			trait = greedy
			trait = overseer
			trait = witch
			trait = viking
			trait = cautious_leader
			trait = gallowsbait

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_decent_skill max_template_decent_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = emonk
			add_prestige = 1500
			add_character_modifier = {
				modifier = former_monk
			}
			add_character_modifier = {
				modifier = pirate_lord
			}
			add_trait_xp = {
				trait = gallowsbait
				track = bandit 
				value = 150
			}
			add_trait_xp = {
				trait = gallowsbait
				track = marauder 
				value = 150
			}
			give_nickname = nick_esmonk
			add_character_flag = need_military_outfit

		save_scope_as = major
		}
		if = { limit = { has_variable = emonk } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # John de Courcy b.1150
	limit = {
		current_year >= 1171 #1171
		current_year <= 1172
		NOT = { exists = global_var:hchar_jcourcy }
	}
	set_global_variable = { name = hchar_jcourcy value = yes }
	title:b_bath = {      
		save_scope_as = birth_location
		create_character = {
			age = 21
			name = "John"
			dynasty_house = house:house_courcy
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_stewardship_4
			trait = ambitious
			trait = zealous
			trait = stubborn
			trait = administrator
			trait = overseer
			trait = military_engineer
			trait = physique_good_3

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_very_high_skill max_template_very_high_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_high_skill max_template_high_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = jcourcy
			add_prestige = 1500
			add_character_modifier = {
				modifier = fortressbuilder
			}
			add_character_modifier = {
				modifier = founder_monasteries
			}
			add_character_flag = need_military_outfit

		save_scope_as = major
		}
		if = { limit = { has_variable = jcourcy } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Roussel de Bailleul b.1032
	limit = {
		current_year >= 1052 #1052
		current_year <= 1054
		NOT = { exists = global_var:hchar_roussel }
	}
	set_global_variable = { name = hchar_roussel value = yes }
	title:b_avranches = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Roussel"
			dynasty_house = house:house_bailleul
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = ambitious
			trait = brave
			trait = gregarious
			trait = reaver
			trait = lifestyle_traveler
			trait = military_engineer

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_high_skill max_template_high_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = roussel
			add_prestige = 1500
			add_character_modifier = {
				modifier = fortressbuilder
			}
			add_character_modifier = {
				modifier = norman_mercenary
			}
			give_nickname = nick_phrangopoulos
			add_character_flag = need_military_outfit

		save_scope_as = major
		}
		if = { limit = { has_variable = roussel } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Robert Crispin b.1040
	limit = {
		current_year >= 1060 #1060
		current_year <= 1062
		NOT = { exists = global_var:hchar_rcrispin }
	}
	set_global_variable = { name = hchar_rcrispin value = yes }
	title:b_evreux = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Robert"
			dynasty_house = house:house_crispin
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = ambitious
			trait = brave
			trait = wrathful
			trait = reaver
			trait = lifestyle_traveler
			trait = aggressive_attacker
			trait = holy_warrior

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_average_skill max_template_average_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_high_skill max_template_high_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = rcrispin
			add_prestige = 1500
			add_character_modifier = {
				modifier = barbastro
			}
			add_character_modifier = {
				modifier = norman_mercenary
			}
			give_nickname = nick_phrangopoulos
			add_character_flag = need_military_outfit

		save_scope_as = major
		}
		if = { limit = { has_variable = rcrispin } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Guido da Landriano b.1139
	limit = {
		current_year >= 1164 #1164
		current_year <= 1166
		NOT = { exists = global_var:hchar_glando }
	}
	set_global_variable = { name = hchar_glando value = yes }
	title:b_milano = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Guido"
			dynasty_house = house:house_landriano
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_4
			trait = diligent
			trait = gregarious
			trait = brave
			trait = administrator
			trait = strategist
			trait = diplomat
			

			diplomacy = { min_template_high_skill max_template_high_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_decent_skill max_template_decent_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = glando
			add_prestige = 1500
			add_character_modifier = {
				modifier = guissano
			}
			add_character_modifier = {
				modifier = lombard_military
			}
			add_character_flag = need_military_outfit

		save_scope_as = major
		}
		if = { limit = { has_variable = glando } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # William of Ypres b.1090
	limit = {
		current_year >= 1110 #1110
		current_year <= 1112
		NOT = { exists = global_var:hchar_wypres }
	}
	set_global_variable = { name = hchar_wypres value = yes }
	title:b_ypres = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "William"
			dynasty_house = house:house_wypres
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_4
			trait = ambitious
			trait = callous
			trait = stubborn
			trait = cautious_leader
			trait = overseer
			trait = bastard
			trait = loyal

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_decent_skill max_template_decent_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_medium_skill max_template_medium_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = wypres
			add_prestige = 1500
			add_character_modifier = {
				modifier = upstart
			}
			add_character_flag = need_military_outfit

		save_scope_as = major
		}
		if = { limit = { has_variable = wypres } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Mercadier b.1163
	limit = {
		current_year >= 1183 #1183
		current_year <= 1185
		NOT = { exists = global_var:hchar_mercadier }
	}
	set_global_variable = { name = hchar_mercadier value = yes }
	title:b_toulouse = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Mercadier"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = diligent
			trait = sadistic
			trait = vengeful
			trait = cautious_leader
			trait = overseer
			trait = reaver
			trait = administrator
			trait = loyal

			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { min_template_high_skill max_template_high_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = mercadier
			add_prestige = 1500
			add_character_modifier = {
				modifier = brabancon
			}
			add_character_flag = need_military_outfit

		save_scope_as = major
		set_relation_friend = { TARGET = 30722 }
		}
		if = { limit = { has_variable = mercadier } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # El Cid b.1045
	limit = {
		current_year >= 1064 #1065
		current_year <= 1065
		NOT = { exists = global_var:hchar_relcid }
	}
	set_global_variable = { name = hchar_relcid value = yes }
	title:b_atapuerca = {      
		save_scope_as = birth_location
		create_character = {
			age = 20
			dna = 107590_rodrigo_de_vidar
			name = "Rodrigo"
			dynasty_house = house:house_vivar
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_4
			trait = campeador
			trait = trusting
			trait = diligent
			trait = brave

			trait = open_terrain_expert
			trait = aggressive_attacker
			trait = flexible_leader
			trait = gallant
			trait = strategist
			trait = loyal

			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_medium_skill max_template_medium_skill }
			prowess = { min_template_decent_skill max_template_decent_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = relcid
			add_prestige = 1500
			give_nickname = nick_the_campeador
			add_character_flag = has_scripted_appearance
			add_character_modifier = {
				modifier = relcid
			}
			add_character_modifier = {
				modifier = exiled_mod
			}
			
			add_character_flag = need_military_outfit

		save_scope_as = major
		}
		if = { limit = { has_variable = relcid } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Harald Hardrada b.1015
	limit = {
		current_year >= 1034 #1034
		current_year <= 1036
		NOT = { exists = global_var:hchar_hardrada }
	}
	set_global_variable = { name = hchar_hardrada value = yes }
	title:b_ringariki = {      
		save_scope_as = birth_location
		create_character = {
			age = 19
			dna = 102531_harald_hardrade
			name = "Haraldr"
			dynasty_house = house:house_hardrada
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = ambitious
			trait = greedy
			trait = brave
			trait = education_martial_3
			trait = varangian
			trait = viking
			trait = lifestyle_traveler
			trait = physique_good_2
			trait = athletic
			trait = poet
			trait = tourney_participant
			

			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_high_skill max_template_high_skill }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_low_skill max_template_low_skill }
			prowess = { min_template_high_skill max_template_high_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = hardrada
			add_prestige = 1500
			add_character_flag = has_scripted_appearance
			add_character_modifier = {
				modifier = lastviking
			}
			add_character_modifier = {
				modifier = exiled_mod
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			add_character_flag = need_military_outfit

		save_scope_as = major
		}
		if = { limit = { has_variable = hardrada } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Jan Žižka b.1360
	limit = {
		current_year >= 1385 #1385
		current_year <= 1387
		NOT = { exists = global_var:hchar_zizka }
	}
	set_global_variable = { name = hchar_zizka value = yes }
	title:b_doudleby = {      
		save_scope_as = birth_location
		create_character = {
			age = 25
			name = "Jan"
			dynasty_house = house:house_zizka
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_5
			trait = brave
			trait = zealous
			trait = stubborn
			trait = strategist
			trait = one_eyed
			trait = heresiarch
			trait = whole_of_body
			trait = cautious_leader
			trait = flexible_leader
			trait = gallowsbait

			diplomacy = { min_template_decent_skill max_decent_average_skill }
			martial = { 22 26 }
			stewardship = { min_template_decent_skill max_template_decent_skill }
			intrigue = { min_template_medium_skill max_template_medium_skill }
			learning = { min_template_medium_skill max_template_medium_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = zizka
			add_prestige = 1500
			add_character_modifier = {
				modifier = wagenburg_tactic
			}
			add_character_modifier = {
				modifier = hussite
			}
			add_trait_xp = {
				trait = gallowsbait
				track = bandit 
				value = 150
			}
			add_trait_xp = {
				trait = gallowsbait
				track = marauder 
				value = 50
			}
			add_character_flag = need_military_outfit

		save_scope_as = major
		}
		if = { limit = { has_variable = zizka } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Symeon the New Theologian b.949 and Symeon the Studite
	limit = {
		current_year >= 979
		current_year <= 981
		NOT = { exists = global_var:hchar_simeon_1 }
	}
	set_global_variable = { name = hchar_simeon_1 = yes }
	title:b_galatia = {
			save_scope_as = birth_location
			create_character = {
				age = 59
				name = "Symeon"
				dynasty = none
				gender_female_chance = 0
				random_traits = yes
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_learning_3
				trait = eccentric
				trait = humble
				trait = scholar
				trait = devoted
				diplomacy = { 4 12 }
				martial = { 4 12 }
				stewardship = { 4 12 }
				intrigue = { 4 12 }
				learning = { min_template_decent_skill max_template_decent_skill }
				prowess = { 4 12 }
				save_scope_as = historical_character_2
			}
			scope:historical_character_2 ?= {
				add_trait = historical_character_2
				set_variable = simeon_1
				save_scope_as = major
				add_piety = 2500
				give_nickname = nick_studite
				set_variable = {
					name = show_historical_gui
					value = 1
				}
			}
			if = { limit = { has_variable = simeon_1 } } # Error suppression
	}
	title:b_galatia = {
			save_scope_as = birth_location
			create_character = {
				age = 30
				name = "Symeon"
				dynasty_house = house:house_galaton
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_learning_5
				trait = theologian
				trait = lifestyle_mystic
				trait = zealous
				trait = forgiving
				trait = temperate
				trait = devoted
				trait = reclusive
				trait = saint
				trait = intrigue_court_1

				diplomacy = { min_template_decent_skill max_template_decent_skill }
				martial = { min_template_average_skill max_template_average_skill }
				stewardship = { min_template_medium_skill max_template_medium_skill }
				intrigue = { min_template_medium_skill max_template_medium_skill }
				learning = { min_template_very_high_skill max_template_very_high_skill }
				prowess = { min_template_low_skill max_template_low_skill }
				save_scope_as = historical_character
			}
			scope:historical_character ?= {
				ehc_finalization_effect = yes
				set_variable = simeon_2
				set_variable = legendary_author #Hymns of Divine Love
				add_piety = 5000
				add_trait = historical_character_2
			add_character_modifier = {
				modifier = no_respect_authority
			}
			add_character_modifier = {
				modifier = revering_sfather
			}
			add_trait_xp = {
				trait = lifestyle_mystic 
				value = 100
			}
			create_inspiration = book_inspiration
			add_character_flag = ai_will_not_convert
			save_scope_as = major
				set_relation_mentor = { TARGET = scope:historical_character_2 }
				set_relation_friend = { TARGET = scope:historical_character_2 }
			}
			scope:historical_character_2 = {
				set_location = scope:historical_character.location
			}
			if = { limit = { has_variable = simeon_2 } } # Error suppression
			spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Montaigu Brothers b.1168 & b.1163
	limit = {
		current_year >= 1188 #1188
		current_year <= 1190
		NOT = { exists = global_var:hchar_bmontaigu }
	}
	set_global_variable = { name = hchar_bmontaigu = yes }
	title:b_thiers = {
		save_scope_as = birth_location
		create_character = {
			age = 55
			dynasty_house = house:house_bmontaigu
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			

			diplomacy = { 4 10 }
			martial = { 4 10 }
			stewardship = { 4 12 }
			intrigue = { 4 12 }
			learning = { min_template_average_skill max_template_average_skill }
			prowess = { 4 12 }
			save_scope_as = additional_character_1
		}
		scope:additional_character_1 ?= {
			set_variable = fmontaigu
			save_scope_as = major
			add_prestige = 1000
			add_character_flag = need_military_outfit
			house ?= {
				generate_coa = yes
			}
			dynasty ?= {
				set_coa = scope:additional_character_1.house
			}
		}
		if = { limit = { has_variable = fmontaigu } } # Error suppression
}
	title:b_thiers = {
			save_scope_as = birth_location
			create_character = {
				age = 25
				name = "Guérin"
				dynasty_house = house:house_bmontaigu
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_stewardship_3
				trait = diligent
				trait = humble
				trait = temperate
				trait = architect
				trait = administrator
				trait = order_member
				trait = military_engineer
				trait = logistician
				trait = pilgrim
				trait = faith_warrior
				trait = lifestyle_traveler

				diplomacy = { min_template_decent_skill max_template_decent_skill }
				martial = { min_template_average_skill max_template_average_skill }
				stewardship = { min_template_high_skill max_template_high_skill }
				intrigue = { min_template_average_skill max_template_average_skill }
				learning = { min_template_decent_skill max_template_decent_skill }
				prowess = { 10 12 }
				save_scope_as = historical_character_2
			}
			scope:historical_character_2 ?= {
				add_trait = historical_character_2
				set_variable = gmontaigu
				add_piety = 1000
			add_prestige = 1000
			
			add_character_modifier = {
				modifier = kn_hospitaller
			}
			add_character_flag = need_military_outfit
			set_father = scope:additional_character_1

			add_character_flag = ai_will_not_convert
				save_scope_as = major
				
				set_variable = {
					name = show_historical_gui
					value = 1
				}
			}
			if = { limit = { has_variable = bmontaigu } } # Error suppression
	}
	title:b_thiers = {
			save_scope_as = birth_location
			create_character = {
				age = 20
				name = "Peire"
				dynasty_house = house:house_bmontaigu
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_martial_3
				trait = overseer
				trait = zealous
				trait = stubborn
				trait = ambitious
				trait = order_member
				trait = military_engineer
				trait = faith_warrior
				trait = pilgrim

				diplomacy = { min_template_average_skill max_template_average_skill }
				martial = { min_template_decent_skill max_template_decent_skill }
				stewardship = { min_template_decent_skill max_template_decent_skill }
				intrigue = { min_template_decent_skill max_template_decent_skill }
				learning = { min_template_average_skill max_template_average_skill }
				prowess = { 10 12 }
				save_scope_as = historical_character
			}
			scope:historical_character ?= {
				ehc_finalization_effect = yes
				set_variable = pmontaigu
				add_trait = historical_character_2
				add_piety = 1000
				add_prestige = 1000
				
				add_character_modifier = {
					modifier = kn_templar
				}
				set_father = scope:additional_character_1
				add_character_flag = need_military_outfit
	
				add_character_flag = ai_will_not_convert
			save_scope_as = major
	
				set_relation_friend = { TARGET = scope:historical_character_2 }
			}
			scope:historical_character_2 = {
				set_location = scope:historical_character.location
			}
			scope:additional_character_1 = {
				death = natural
			}
			if = { limit = { has_variable = pmontaigu } } # Error suppression
			spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Rainulf Drengot b.990 + siblings 
	limit = {
		current_year >= 1010
		current_year <= 1011
		NOT = { exists = global_var:hchar_rdrengot }
	}
	set_global_variable = { name = hchar_rdrengot = yes }
	title:b_gisors = {
			save_scope_as = birth_location
			create_character = {
				age = 55
				dynasty_house = house:house_quarrel
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_diplomacy_3
				trait = ambitious
				trait = eccentric
				trait = diligent

				diplomacy = { 4 10 }
				martial = { 4 10 }
				stewardship = { 4 12 }
				intrigue = { 4 12 }
				learning = { min_template_average_skill max_template_average_skill }
				prowess = { 4 12 }
				save_scope_as = additional_character_1
			}
			scope:additional_character_1 ?= {
				set_variable = quarrelis
				save_scope_as = major
				add_prestige = 1000
				add_character_flag = need_military_outfit
				house ?= {
					generate_coa = yes
				}
				dynasty ?= {
					set_coa = scope:additional_character_1.house
				}
			}
			if = { limit = { has_variable = quarrelis } } # Error suppression
	}
	title:b_vieste = {
			save_scope_as = birth_location
			create_character = {
				age = 25
				name = "Osmond"
				dynasty_house = house:house_drengot
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_martial_2
				trait = ambitious
				trait = vengeful
				trait = deceitful
				trait = overseer
				trait = flexible_leader
				trait = lifestyle_traveler
				trait = lifestyle_hunter
				trait = murderer
	
				diplomacy = { min_template_medium_skill max_template_medium_skill }
				martial = { min_template_decent_skill max_template_decent_skill }
				stewardship = { min_template_average_skill max_template_average_skill }
				intrigue = { min_template_decent_skill max_template_decent_skill }
				learning = { min_template_average_skill max_template_average_skill }
				prowess = { 4 5 }
				save_scope_as = additional_character_2
			}
			scope:additional_character_2 ?= {
			add_prestige = 1500
			add_character_modifier = {
				modifier = exiled_mod
			}
			add_character_modifier = {
				modifier = norman_mercenary
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
		save_scope_as = major
				set_father = scope:additional_character_1 
			}
			create_character = {
				age = 20
				name = "Rainulf"
				dynasty_house = house:house_drengot
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_martial_4
				trait = ambitious
				trait = fickle
				trait = gregarious
				trait = overseer
				trait = cautious_leader
				trait = flexible_leader
				trait = lifestyle_traveler
	
				diplomacy = { min_template_medium_skill max_template_medium_skill }
				martial = { min_template_very_high_skill max_template_very_high_skill }
				stewardship = { min_template_average_skill max_template_average_skill }
				intrigue = { min_template_medium_skill max_template_medium_skill }
				learning = { min_template_average_skill max_template_average_skill }
				prowess = { min_template_high_skill max_template_high_skill }
				save_scope_as = historical_character
			}
			scope:historical_character ?= {
				ehc_finalization_effect = yes
			set_variable = radrengot
			add_prestige = 1500
			add_character_modifier = {
				modifier = exiled_mod
			}
			add_character_modifier = {
				modifier = norman_mercenary
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
		save_scope_as = major
		set_father = scope:additional_character_1 
				set_relation_friend = { TARGET = scope:additional_character_2 }
			}
			if = { limit = { has_variable = radrengot } } # Error suppression
			spawn_ehc_boilerplate_effect = yes
		create_character = {
				age = 24
				name = "Gilbert Buatère"
				dynasty_house = house:house_drengot
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_martial_2
				trait = ambitious
				trait = vengeful
				trait = deceitful
				trait = overseer
				trait = flexible_leader
				trait = lifestyle_traveler
				trait = lifestyle_hunter
				trait = murderer
	
				diplomacy = { min_template_medium_skill max_template_medium_skill }
				martial = { min_template_decent_skill max_template_decent_skill }
				stewardship = { min_template_average_skill max_template_average_skill }
				intrigue = { min_template_decent_skill max_template_decent_skill }
				learning = { min_template_average_skill max_template_average_skill }
				prowess = { 4 5 }
				save_scope_as = additional_character_3
			}
			scope:additional_character_3 ?= {
			add_prestige = 1500
			add_character_modifier = {
				modifier = exiled_mod
			}
			add_character_modifier = {
				modifier = norman_mercenary
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
		save_scope_as = major
		set_father = scope:additional_character_1 
				set_relation_friend = { TARGET = scope:historical_character }
			}
		create_character = {
				age = 18
				name = "Ascetil"
				dynasty_house = house:house_drengot
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_martial_3
				trait = ambitious
				trait = gregarious
				trait = diligent
				trait = cautious_leader
				trait = lifestyle_traveler
	
				diplomacy = { min_template_medium_skill max_template_medium_skill }
				martial = { min_template_decent_skill max_template_decent_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 = { 9 10 }
				save_scope_as = additional_character_4
			}
			scope:additional_character_4 ?= {
			add_prestige = 1500
			add_character_modifier = {
				modifier = exiled_mod
			}
			add_character_modifier = {
				modifier = norman_mercenary
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
		save_scope_as = major
		set_father = scope:additional_character_1 
			}
		create_character = {
				age = 16
				name = "Rudolph"
				dynasty_house = house:house_drengot
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_martial_2
				trait = ambitious
				trait = lustful
				trait = honest
				trait = lifestyle_traveler
	
				diplomacy = { min_template_medium_skill max_template_medium_skill }
				martial = { min_template_decent_skill max_template_decent_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 = { 9 10 }
				save_scope_as = additional_character_5
			}
			scope:additional_character_5 ?= {
			add_prestige = 1500
			add_character_modifier = {
				modifier = exiled_mod
			}
			add_character_modifier = {
				modifier = norman_mercenary
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
		save_scope_as = major
		set_father = scope:additional_character_1 
			}
			scope:historical_character = {
				set_culture_same_as = scope:additional_character_1
				set_faith_same_as = scope:additional_character_1
			}
			scope:additional_character_3 = {
				set_location = scope:historical_character.location
				set_culture_same_as = scope:additional_character_1
				set_faith_same_as = scope:additional_character_1
			}
			scope:additional_character_2 = {
				set_location = scope:historical_character.location
				set_culture_same_as = scope:additional_character_1
				set_faith_same_as = scope:additional_character_1
			}
			scope:additional_character_4 = {
				set_location = scope:historical_character.location
				set_culture_same_as = scope:additional_character_1
				set_faith_same_as = scope:additional_character_1
			}
			scope:additional_character_5 = {
				set_location = scope:historical_character.location
				set_culture_same_as = scope:additional_character_1
				set_faith_same_as = scope:additional_character_1
			}
			scope:additional_character_1 = {
				death = natural
			}
			
	}
}

if = { # John Hawkwood b.1323 and Albert Sterz
	limit = {
		current_year >= 1346 #1346
		current_year <= 1180
		NOT = { exists = global_var:hchar_jhawkwood }
	}
	set_global_variable = { name = hchar_jhawkwood = yes }
	title:b_konz = {
			save_scope_as = birth_location
			create_character = {
				age = 25
				name = "Albert"
				dynasty_house = house:house_asterz
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_martial_3
				trait = callous
				trait = greedy
				trait = deceitful
				trait = disloyal
				trait = viking
				trait = reaver
				trait = overseer

				diplomacy = { 4 10 }
				martial = { 13 16 }
				stewardship = { 4 12 }
				intrigue = { 4 12 }
				learning = { min_template_average_skill max_template_average_skill }
				prowess = { 4 12 }
				save_scope_as = historical_character_2
			}
			scope:historical_character_2 ?= {
				add_trait = historical_character_2
				set_variable = asterz
				save_scope_as = major
				add_prestige = 1000
				add_character_modifier = {
					modifier = white_company
				}
				add_character_modifier = {
					modifier = company_stella
				}
				add_character_flag = need_military_outfit
				house ?= {
					generate_coa = yes
				}
				dynasty ?= {
					set_coa = scope:historical_character_2.house
				}
				set_variable = {
					name = show_historical_gui
					value = 1
				}
			}
			if = { limit = { has_variable = asterz } } # Error suppression
	}
	title:b_ampthill = {
			save_scope_as = birth_location
			create_character = {
				age = 23
				name = "John"
				dynasty_house = house:house_hawkwood
				gender_female_chance = 0
				random_traits = no
				location = scope:birth_location.title_province
				faith = scope:birth_location.title_province.faith
				culture = scope:birth_location.title_province.culture
				trait = education_martial_5
				trait = callous
				trait = deceitful
				trait = diligent
				trait = overseer
				trait = strategist
				trait = organizer
				trait = flexible_leader
				trait = strong
	
				diplomacy = { min_template_medium_skill max_template_medium_skill }
				martial = { min_template_very_high_skill max_template_very_high_skill }
				stewardship = { min_template_average_skill max_template_average_skill }
				intrigue = { min_template_decent_skill max_template_decent_skill }
				learning = { min_template_average_skill max_template_average_skill }
				prowess = { min_template_high_skill max_template_high_skill }
				save_scope_as = historical_character
			}
			scope:historical_character ?= {
				ehc_finalization_effect = yes
			set_variable = jhawkwood
			add_prestige = 1500
			add_character_modifier = {
				modifier = white_company
			}
			give_nickname = nick_astute
			add_character_flag = need_military_outfit
		save_scope_as = major
				set_relation_friend = { TARGET = scope:historical_character_2 }
			}
			scope:historical_character_2 = {
				set_location = scope:historical_character.location
			}
			if = { limit = { has_variable = jhawkwood } } # Error suppression
			spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Hrafn Sveinbjarnarson b.1166 and his rival Þorvaldur Snorrason Vatnsfirðingur together with their children
	limit = {
		current_year >= 1205 #1205
		current_year <= 1208
			NOT = { exists = global_var:hchar_hrafn }
		}
	set_global_variable = { name = hchar_hrafn = yes }
	title:b_olafsvik = {
		save_scope_as = birth_location
		create_character = {
			age = 37
			name = "Þorvaldur"
			dynasty_house = house:house_seldaelir
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = lustful
			trait = vengeful
			trait = stubborn
			trait = irritable
			trait = viking
			trait = reaver
			trait = berserker
			trait = lifestyle_hunter


			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_decent_skill max_template_decent_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_decent_skill max_template_decent_skill }
			learning = { min_template_low_skill max_template_low_skill }
			prowess = { min_template_high_skill max_template_high_skill }
			save_scope_as = additional_character_2
		}
		scope:additional_character_2 ?= {
			add_trait = historical_character_2
			set_variable = porvald
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			add_trait_xp = {
				trait = lifestyle_hunter
				track = hunter
				value = 100
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
			set_variable = {
				name = show_historical_gui
				value = 1
			}
		}
		if = { limit = { has_variable = porvald } } # Error suppression
	}
	title:b_vestfirdir = {
		save_scope_as = birth_location
		create_character = {
			age = 39
			name = "Hrafn"
			dynasty_house = house:house_eyri
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_3
			trait = lifestyle_herbalist
			trait = lifestyle_physician
			trait = compassionate
			trait = diligent
			trait = generous
			trait = viking
			trait = scholar	
			trait = lifestyle_traveler			

			
			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_very_high_skill max_template_very_high_skill }
			prowess = { min_template_medium_skill max_template_medium_skill }
			save_scope_as = historical_character
		}	
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = hrafnsv
			add_trait = historical_character_2
		add_character_modifier = {
			modifier = interfeud
		}
		add_character_modifier = {
			modifier = studiedabroad
		}
		add_trait_xp = {
			trait = lifestyle_traveler
			track = travel 
			value = 100
		}
		add_trait_xp = {
			trait = lifestyle_traveler
			track = danger 
			value = 100
		}
		hidden_effect = {
			add_trait_xp = {
				trait = lifestyle_physician
				value = 100
			}
		}
		if = {
			limit = {
				has_ep1_dlc_trigger = yes
			}
			create_inspiration = adventure_inspiration
		}
		add_character_flag = need_military_outfit
		save_scope_as = major
			set_relation_nemesis = { TARGET = scope:additional_character_2 }
			set_variable = {
				name = show_historical_gui
				value = 1
			}
		}
		if = { limit = { has_variable = hrafnsv } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
		create_character = {
			age = 14
			name = "Snorri"
			dynasty_house = house:house_seldaelir
			gender_female_chance = 0
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_martial_3
			trait = vengeful
			trait = viking
			trait = reaver
			trait = child_of_concubine_female


			diplomacy = { 6 12 }
			martial = { 6 12 }
			stewardship = { 6 12 }
			intrigue = { 6 12 }
			learning = { 6 12 }
			prowess = { 6 12 }
			save_scope_as = additional_character_3
		}
		scope:additional_character_3 ?= {
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
			set_father = scope:additional_character_2
		}
		create_character = {
			age = 16
			name = "Einar"
			dynasty_house = house:house_seldaelir
			gender_female_chance = 0
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = viking


			diplomacy = { 6 12 }
			martial = { 6 12 }
			stewardship = { 6 12 }
			intrigue = { 6 12 }
			learning = { 6 12 }
			prowess = { 6 12 }
			save_scope_as = additional_character_4
		}
		scope:additional_character_4 ?= {
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
			set_father = scope:additional_character_2
		}
		create_character = {
			age = 17
			name = "Kolfinna"
			dynasty_house = house:house_seldaelir
			gender_female_chance = 100
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = viking
			trait = shieldmaiden


			diplomacy = { 6 12 }
			martial = { 6 12 }
			stewardship = { 6 12 }
			intrigue = { 6 12 }
			learning = { 6 12 }
			prowess = { 6 12 }
			save_scope_as = additional_character_5
		}
		scope:additional_character_5 ?= {
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
			set_father = scope:additional_character_2
		}
		create_character = {
			age = 15
			name = "Þórður"
			dynasty_house = house:house_seldaelir
			gender_female_chance = 0
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = vengeful
			trait = viking
			trait = child_of_concubine_female

			diplomacy = { 6 12 }
			martial = { 6 12 }
			stewardship = { 6 12 }
			intrigue = { 6 12 }
			learning = { 6 12 }
			prowess = { 6 12 }
			save_scope_as = additional_character_6
		}
		scope:additional_character_6 ?= {
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
			set_father = scope:additional_character_2
		}
		create_character = {
			age = 14
			name = "Olaf"
			dynasty_house = house:house_seldaelir
			gender_female_chance = 0
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = vengeful
			trait = child_of_concubine_female

			diplomacy = { 6 12 }
			martial = { 6 12 }
			stewardship = { 6 12 }
			intrigue = { 6 12 }
			learning = { 6 12 }
			prowess = { 6 12 }
			save_scope_as = additional_character_7
		}
		scope:additional_character_7 ?= {
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			if = {
				limit = {
					has_ep1_dlc_trigger = yes
				}
				create_inspiration = adventure_inspiration
			}
			add_character_flag = need_military_outfit
			set_father = scope:additional_character_2
		}
		create_character = {
			age = 6
			name = "Sveinbjörn"
			dynasty_house = house:house_eyri
			gender_female_chance = 0
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = vengeful

			diplomacy = { 4 6 }
			martial = { 4 6 }
			stewardship = { 4 6 }
			intrigue = { 4 6}
			learning = { 4 6 }
			prowess = { 5 6 }
			save_scope_as = additional_character_8
		}
		scope:additional_character_8 ?= {
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			set_father = scope:historical_character
		}
		create_character = {
			age = 3
			name = "Krákur"
			dynasty_house = house:house_eyri
			gender_female_chance = 0
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = vengeful

			diplomacy = { 4 6 }
			martial = { 4 6 }
			stewardship = { 4 6 }
			intrigue = { 4 6}
			learning = { 4 6 }
			prowess = { 5 6 }
			save_scope_as = additional_character_9
		}
		scope:additional_character_9 ?= {
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			set_father = scope:historical_character
		}
		create_character = {
			age = 6
			name = "Steinunn"
			dynasty_house = house:house_eyri
			gender_female_chance = 100
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture

			diplomacy = { 4 6 }
			martial = { 4 6 }
			stewardship = { 4 6 }
			intrigue = { 4 6}
			learning = { 4 6 }
			prowess = { 5 6 }
			save_scope_as = additional_character_10
		}
		scope:additional_character_10 ?= {
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			set_father = scope:historical_character
		}
		create_character = {
			age = 4
			name = "Herdís"
			dynasty_house = house:house_eyri
			gender_female_chance = 100
			random_traits = yes
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture

			diplomacy = { 4 6 }
			martial = { 4 6 }
			stewardship = { 4 6 }
			intrigue = { 4 6}
			learning = { 4 6 }
			prowess = { 5 6 }
			save_scope_as = additional_character_11
		}
		scope:additional_character_11 ?= {
			save_scope_as = major
			add_character_modifier = {
				modifier = interfeud
			}
			set_father = scope:historical_character
		}
	}
}

if = { # Wallada bint al-Mustakfi b. 1001 & Ibn Zaydun
	limit = {
		current_year >= 1021 #1021
		current_year <= 1022
		
			NOT = { exists = global_var:hchar_wallada }
		}
	set_global_variable = { name = hchar_wallada = yes }
	title:b_cordoba = {
		save_scope_as = birth_location
		create_character = {
			age = 18
			name = "Abū ibn Zaydun"
			dynasty_house = house:house_zaydun
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_intrigue_3
			trait = lustful
			trait = calm
			trait = deceitful
			trait = journaller
			trait = poet
			trait = intrigue_court_2
			trait = schemer
			trait = lifestyle_traveler


			diplomacy = { min_template_average_skill max_template_average_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_decent_skill max_template_decent_skill }
			learning = { min_template_decent_skill max_template_decent_skill }
			prowess = { min_template_average_skill max_template_average_skill }
			save_scope_as = additional_character_2
		}
		scope:additional_character_2 ?= {
			add_trait = historical_character_2
			set_variable = zaydun
			save_scope_as = major
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}

			set_variable = {
				name = show_historical_gui
				value = 1
			}
		}
		if = { limit = { has_variable = zaydun } } # Error suppression
	}
	title:b_cordoba = {
		save_scope_as = birth_location
		create_character = {
			age = 20
			name = "Wallada"
			dynasty_house = house:house_wallada
			gender_female_chance = 100
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_diplomacy_5
			trait = beauty_good_3
			trait = diligent
			trait = eccentric
			trait = lustful
			trait = family_first
			trait = sayyid
			trait = poet	
			trait = violet_poet	
			trait = intellect_good_2
			trait = intrigue_court_2		

			
			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_very_high_skill max_template_very_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}	
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = wallada
			add_trait = historical_character_2
		add_character_modifier = {
			modifier = anawallah
		}
		add_character_modifier = {
			modifier = women_advocate
		}
		add_character_modifier = {
			modifier = no_respect_authority
		}
		save_scope_as = major
			set_relation_lover = { TARGET = scope:additional_character_2 }
			set_variable = {
				name = show_historical_gui
				value = 1
			}
		}
		if = { limit = { has_variable = wallada } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

if = { # Rumi b.1207 and Tabrizi
	limit = {
		current_year >= 1245 #1245
		current_year <= 1247
			NOT = { exists = global_var:hchar_tabrizi }
		}
	set_global_variable = { name = hchar_tabrizi = yes }
	title:b_balkh = {
		save_scope_as = birth_location
		create_character = {
			age = 60
			name = "Shams-i Tabrīzī"
			dynasty = none
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_4
			trait = eccentric
			trait = temperate
			trait = humble
			trait = poet
			trait = shrewd
			trait = lifestyle_mystic
			trait = lifestyle_traveler

			diplomacy = { 4 12 }
			martial = { 4 12 }
			stewardship = { 4 12 }
			intrigue = { 4 12 }
			learning = { min_template_high_skill max_template_high_skill }
			prowess = { 4 12 }
			save_scope_as = historical_character_2
		}
		scope:historical_character_2 ?= {
			add_trait = historical_character_2
			set_variable = tabrizi
			save_scope_as = major
			add_piety = 3500
			add_character_modifier = {
				modifier = maqalat
			}
			add_character_modifier = {
				modifier = dervish
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = travel 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_traveler
				track = danger 
				value = 100
			}
			add_trait_xp = {
				trait = lifestyle_mystic 
				value = 100
			}
			set_variable = {
				name = show_historical_gui
				value = 1
			}
		}
		if = { limit = { has_variable = tabrizi } } # Error suppression
	}
	title:b_balkh = {
		save_scope_as = birth_location
		create_character = {
			age = 38
			name = "Jalāl al-Dīn"
			dynasty_house = house:house_rumi
			gender_female_chance = 0
			random_traits = no
			location = scope:birth_location.title_province
			faith = scope:birth_location.title_province.faith
			culture = scope:birth_location.title_province.culture
			trait = education_learning_5
			trait = theologian
			trait = lifestyle_mystic
			trait = humble
			trait = calm
			trait = temperate
			trait = poet
			trait = scholar	
			trait = lifestyle_traveler
			trait = diplomatic_court_2
			

			
			diplomacy = { min_template_decent_skill max_template_decent_skill }
			martial = { min_template_average_skill max_template_average_skill }
			stewardship = { min_template_medium_skill max_template_medium_skill }
			intrigue = { min_template_average_skill max_template_average_skill }
			learning = { min_template_very_high_skill max_template_very_high_skill }
			prowess = { min_template_low_skill max_template_low_skill }
			save_scope_as = historical_character
		}
		scope:historical_character ?= {
			ehc_finalization_effect = yes
			set_variable = rumi
			set_variable = legendary_author
			add_piety = 1000
			add_trait = historical_character_2
		add_character_modifier = {
			modifier = dervish
		}
		add_character_modifier = {
			modifier = divaneshams
		}
		add_trait_xp = {
			trait = lifestyle_mystic 
			value = 100
		}
		create_inspiration = book_inspiration
		add_character_flag = ai_will_not_convert
		save_scope_as = major
			set_relation_mentor = { TARGET = scope:historical_character_2 }
			set_relation_friend = { TARGET = scope:historical_character_2 }
		}
		scope:historical_character_2 = {
			set_location = scope:historical_character.location
		}
		if = { limit = { has_variable = rumi } } # Error suppression
		spawn_ehc_boilerplate_effect = yes
	}
}

}
ehc_finalization_effect = {
	add_trait = historical_character_2
	house ?= {
		generate_coa = yes
	}
	dynasty ?= {
		set_coa = scope:historical_character.house
	}
	set_variable = {
		name = show_historical_gui
		value = 1
	}
}

spawn_ehc_boilerplate_effect = {
	county = { save_scope_as = county_scope }
	county.holder = {
		if = {
			limit = {
				is_ai = no
			}
			trigger_event = historical_char_creation_events.1
		}
		else_if = {
			limit = {
				OR = {
					exists = scope:major
					has_game_rule = all_historical_characters
				}
				any_liege_or_above = {
					is_ai = no
				}
			}
			random_liege_or_above = {
				limit = {
					is_ai = no
				}
				trigger_event = historical_char_creation_events.1
			}
		}
		else_if = {
			limit = {
				exists = scope:county_scope.duchy.holder
			}
			scope:county_scope.duchy.holder = {
				trigger_event = historical_char_creation_events.1
			}
		}
		else = {
			top_liege = {
				trigger_event = historical_char_creation_events.1
			}
		}
	}
}








# Karunakara Tondaiman
# Sekkilhar
# Omar Khayyam
# Bhaskaracharya
# Joseph Rabban
# Atisha
# Hemachandra
# Kshemendra
# Akka Mahadevi
# Namdev
# Madhvacharya
# Vidyapati
# Abhinavagupta
# Basava
# Hildegard von Bingen
# Thomas Aquinas
# Dante Alighieri
# Thomas Becket
# Maimonides (Moses ben Maimon)
# Chrétien de Troyes
# Egil Skallagrímsson
# Gunnlaug Ormstunga
# Þorbjörg the Seeress
# Erik Röde
# Ibn al-Haytham (Alhazen)
# Ibn Battuta
# William of Ockham
# Geoffrey Chaucer
# Roger Bacon
# Aaron of Lincoln
# John Wycliffe
# Héloïse d'Argenteuil & Peter Abelard
# Petrarch (Francesco Petrarca)
# Giotto di Bondone
# Leonardo Fibonacci
# Giovanni Boccaccio
# Christine de Pizan
# Snorri Sturluson
# Hrotsvitha
# Ramanuja
# Arnaldus de Villa Nova
# Ibn Khaldun
# Jalaluddin Rumi
# Avicenna
# Averroes
# Al-Biruni
# Rashi (Shlomo Yitzchaki)
# Yehuda Halevi
# Hasdai ibn Shaprut
# Levi ben Gershon (Gersonides)
# Abraham ibn Ezra
# Solomon ibn Gabirol
# Nachmanides (Moses ben Nahman)
# Hasdai Crescas
# Saadia Gaon
# Yusuf ibn 'Awkal
# Benjamin of Tudela
# Marco Polo
# Bridget of Sweden
# Johannes Eckhart (Meister Eckhart)
# Jangar
# Zawisza Czarny
# Theophanes the Greek
# Nicetas Choniates
# Michael Psellos
# John Tzetzes
# Theophylact of Ohrid
# Eustathius of Thessalonica
# Nicephorus Blemmydes
# Georgius Pachymeres
# Manuel Moschopoulos
# Theodore Metochites
# Michael Choniates
# Joseph Tarchaneiotes
# Gemistus Pletho
# Arethas of Caesarea
# Basil Lekapenos
# John the Orphanotrophos AKA totally who Varys is based on
# Samonas
# Peter the Eunuch
# Constantine the Paphlagonian
# Peter the Stratopedarches
# Basilios Bessarion
# Demetrios Kydones
# Manuel Holobolos
# John Axuch
# Mkhitar Gosh
# Shota Rustaveli
# Grigor Tatevatsi
# Sargis Pitsak
# Averardo de' Medici
# Alfonso de Borgia
# William Wallace
# La Hire (Étienne de Vignolles)
# Rabban Bar Sauma
# Nasreddin Hodja
# Widukind of Corvey
# Roger de Flor
# Regino of Prüm
# Geoffrey of Monmouth
