﻿custom_headgear = {
	usage = customization
	interface_position = 4

	add_accessory_modifiers = {
		gene = headgear
		template = no_headgear
	}
	
	## POL ##

	add_accessory_modifiers = {
		gene = headgear
		template = pol_common
		is_valid_custom = {
			has_pol_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = pol_low_nobility
		is_valid_custom = {
			has_pol_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = pol_high_nobility
		is_valid_custom = {
			has_pol_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = pol_royalty
		is_valid_custom = {
			has_pol_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = pol_imperial
		is_valid_custom = {
			has_pol_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = pol_war
		is_valid_custom = {
			has_pol_dlc_trigger = yes
		}
	}

	## Veils ##
	add_accessory_modifiers = {
		gene = headgear
		template = fp4_western_era2_veils
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp4_western_era2_veils
	}

	add_accessory_modifiers = {
		gene = headgear
		template = western_veils
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era1_veils
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era2_veils
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era3_veils
	}



	## CE1 ##
	add_accessory_modifiers = {
		gene = headgear
		template = fp4_western_common
		is_valid_custom = {
			has_ce1_dlc_trigger = yes
		}
	}
	add_accessory_modifiers = {
		gene = headgear
		template = fp4_western_era3_common
	}
	add_accessory_modifiers = {
		gene = headgear
		template = fp4_western_cloak_hoods
		is_valid_custom = {
			has_ce1_dlc_trigger = yes
		}
	}
	add_accessory_modifiers = {
		gene = cloak_hoods
		template = fp4_western_cloak_hoods
		is_valid_custom = {
			has_ce1_dlc_trigger = yes
		}
	}
	add_accessory_modifiers = {
		gene = headgear
		template = fp4_western_low_nobility
		is_valid_custom = {
			has_ce1_dlc_trigger = yes
		}
	}
	add_accessory_modifiers = {
		gene = headgear
		template = fp4_western_royalty
		is_valid_custom = {
			has_ce1_dlc_trigger = yes
		}
	}

	## Couture of the Capets ##
	
	add_accessory_modifiers = {
		gene = headgear
		template = sp3_western_royalty
		is_valid_custom = {
			has_dlc_feature = couture_of_the_capets
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = sp3_western_high_nobility
		is_valid_custom = {
			has_dlc_feature = couture_of_the_capets
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = sp3_western_nobility
		is_valid_custom = {
			has_dlc_feature = couture_of_the_capets
		}
	}

	## AFR ##

	add_accessory_modifiers = {
		gene = headgear
		template = afr_common
		is_valid_custom = {
			has_afr_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = afr_low_nobility
		is_valid_custom = {
			has_afr_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = afr_high_nobility
		is_valid_custom = {
			has_afr_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_berber_high_nobility
		is_valid_custom = {
			has_afr_dlc_trigger = no
		}
	}
	
	add_accessory_modifiers = {
		gene = headgear
		template = afr_royalty
		is_valid_custom = {
			has_afr_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = afr_imperial
		is_valid_custom = {
			has_afr_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = afr_war
		is_valid_custom = {
			has_afr_dlc_trigger = yes
		}
	}

	### FP3 ###
	### Iranian ###
	
	

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_iranian_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_iranian_low_nobility
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_iranian_high_nobility
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_iranian_royalty
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
	}	
	
	add_accessory_modifiers = {
		gene = headgear
		template = fp3_iranian_imperial
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_iranian_war
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
	}

	### Turkic ###

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_turkic_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_turkic_low_nobility
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_turkic_high_nobility
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
	}
	
	add_accessory_modifiers = {
		gene = headgear
		template = fp3_turkic_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_turkic_imperial
	}	

	add_accessory_modifiers = {
		gene = headgear
		template = fp3_turkic_war
	}	
	
	
	## SP1 ##
	add_accessory_modifiers = {
		gene = headgear
		template = reward_western_royalty
		is_valid_custom = {
			has_reward_item = newsletter_crown
		}
	}

	## SP2 Elegance of the Empire ##
	
	add_accessory_modifiers = {
		gene = headgear
		template = sp2_western_imperial
		is_valid_custom = {
			has_dlc_feature = elegance_of_the_empire
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = sp2_western_high_nobility
		is_valid_custom = {
			has_dlc_feature = elegance_of_the_empire
		}
	}
	


	### EP2 ###

	add_accessory_modifiers = {
		gene = headgear
		template = western_wedding
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = mena_wedding
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = byzantine_wedding
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era1_imperial
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era1_royalty
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era1_high_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era1_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era1_common
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = western_wedding
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = mena_wedding
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = byzantine_wedding
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era1_war_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era2_war_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era3_war_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_western_era4_war_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_mena_war_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_steppe_war_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_byzantine_war_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep2_indian_war_nobility
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
	}

	### FP2 ###

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_christian_common
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iberian_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_christian_low_nobility
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iberian_low_nobility 
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_christian_high_nobility
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iberian_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_christian_royalty
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iberian_castilian_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iberian_aragonese_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iberian_war_aragonese_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_christian_war_nobility
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iberian_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_muslim_common
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_muslim_low_nobility
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_muslim_high_nobility
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_muslim_royalty
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp2_muslim_war_nobility
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_andalusian_war
	}
	
	### EP1 ###

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_western_royalty
		is_valid_custom = {
			has_ep1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_mena_royalty
		is_valid_custom = {
			has_ep1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_steppe_royalty
		is_valid_custom = {
			has_ep1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_sub_saharan_royalty
		is_valid_custom = {
			has_ep1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_indian_royalty
		is_valid_custom = {
			has_ep1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_indian_imperial
		is_valid_custom = {
			has_ep1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_byzantine_imperial
		is_valid_custom = {
			has_ep1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_italian_royalty
		# EP1 model is overwritten by CFP
		# is_valid_custom = {
			# has_ep1_dlc_trigger = yes
		# }
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_persian_imperial
		is_valid_custom = {
			has_ep1_dlc_trigger = yes
		}
	}

	### FP1 ###

	add_accessory_modifiers = {
		gene = headgear
		template = fp1_common
		is_valid_custom = {
			has_fp1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp1_low_nobility
		is_valid_custom = {
			has_fp1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp1_nobility
		is_valid_custom = {
			has_fp1_dlc_trigger = yes
		}
	}
	
	add_accessory_modifiers = {
		gene = headgear
		template = fp1_royalty
		is_valid_custom = {
			has_fp1_dlc_trigger = yes
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp1_imperial
		is_valid_custom = {
			has_fp1_dlc_trigger = yes
		}
	}	
	
	add_accessory_modifiers = {
		gene = headgear
		template = cfp_norse_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = fp1_war
		is_valid_custom = {
			has_fp1_dlc_trigger = yes
		}
	}


	add_accessory_modifiers = {
		gene = headgear
		template = western_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = western_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		# is_valid_custom = {
		# 	highest_held_title_tier >= tier_duchy
		# }
		template = western_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_western_war_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		# is_valid_custom = {
		# 	highest_held_title_tier >= tier_kingdom
		# }
		template = western_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		# is_valid_custom = {
		# 	highest_held_title_tier >= tier_kingdom
		# }
		template = western_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = western_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = crusades_western_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_western_era3_war_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_western_war_plate_armor
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_latin_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_latin_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_latin_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_latin_venetian_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_latin_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = northern_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_northern_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = northern_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_norman_sicily_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_anglo_saxon_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_hungarian_high_nobility
	}

	#add_accessory_modifiers = {
	#	gene = headgear
	#	template = cfp_hungarian_royalty
	#}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_hungarian_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_slavic_commoner
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_slavic_low_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_slavic_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_slavic_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_slavic_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_albanian_royalty
	}

	#add_accessory_modifiers = {
	#	gene = headgear
	#	template = cfp_croatian_royalty
	#}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_slavic_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = byzantine_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = byzantine_low_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = byzantine_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = byzantine_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = byzantine_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = byzantine_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_rre_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_trait_laurel
	}

	add_accessory_modifiers = {
		gene = headgear
		template = mena_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_egyptian_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = mena_low_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = mena_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = mena_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = mena_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = mena_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_mena_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_mena_war_high_medieval
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_mena_war_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iranian_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iranian_low_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iranian_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iranian_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_iranian_war_high_medieval
	}

	add_accessory_modifiers = {
		gene = headgear
		template = steppe_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = steppe_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = steppe_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = steppe_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = steppe_war
	}

	#add_accessory_modifiers = {
	#	gene = headgear
	#	template = cfp_turkic_common
	#}

	#add_accessory_modifiers = {
	#	gene = headgear
	#	template = cfp_turkic_nobility
	#}

	#add_accessory_modifiers = {
	#	gene = headgear
	#	template = cfp_turkic_high_nobility
	#}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_oghuz_low_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_oghuz_high_nobility
	}

	#add_accessory_modifiers = {
	#	gene = headgear
	#	template = cfp_turkic_royalty
	#}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_turkic_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_turkic_war_fullplate
	}

	add_accessory_modifiers = {
		gene = headgear
		template = sub_saharan_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = sub_saharan_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = sub_saharan_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = sub_saharan_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_west_african_low_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_west_african_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_west_african_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_central_african_low_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_central_african_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_central_african_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_east_african_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_east_african_low_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_east_african_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_east_african_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_east_african_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_east_african_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = indian_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = indian_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = indian_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_indian_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = indian_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = indian_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = indian_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_indian_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_javanese_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_javanese_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_hre_common
		is_valid_custom = {
			has_dlc = "Garments of the Holy Roman Empire"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_hre_nobility
		is_valid_custom = {
			has_dlc = "Garments of the Holy Roman Empire"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_hre_high_nobility
		is_valid_custom = {
			has_dlc = "Garments of the Holy Roman Empire"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_hre_royalty
		is_valid_custom = {
			has_dlc = "Garments of the Holy Roman Empire"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_hre_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_hre_war
		is_valid_custom = {
			has_dlc = "Garments of the Holy Roman Empire"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_abbasid_common
		is_valid_custom = {
			has_dlc = "Fashion of the Abbasid Court"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_abbasid_high_nobility
		is_valid_custom = {
			has_dlc = "Fashion of the Abbasid Court"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_abbasid_royalty
		is_valid_custom = {
			has_dlc = "Fashion of the Abbasid Court"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_abbasid_imperial
		is_valid_custom = {
			has_dlc = "Fashion of the Abbasid Court"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = dde_abbasid_war
		is_valid_custom = {
			has_dlc = "Fashion of the Abbasid Court"
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_crusades_western_commoner
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_crusades_western
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_crusades_western_black
	}

	add_accessory_modifiers = {
		# CFP Unlocked vanilla
		gene = headgear
		template = mena_stealth
	}
	add_accessory_modifiers = {
		# CFP Unlocked vanilla
		gene = headgear
		template = western_stealth
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_religious_catholic_pilgrim
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_catholic_devoted
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_religious_catholic_high_northern
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_religious_catholic_cardinal
	}

	add_accessory_modifiers = {
		gene = headgear
		template = catholic_high
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_religious_catholic_head_early
	}

	add_accessory_modifiers = {
		gene = headgear
		template = catholic_head
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_religious_orthodox_devoted
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_orthodox_high
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_orthodox_head
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_zoroastrian_high
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_religious_buddhist_tibetan_mask
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_religious_jewish_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_jewish_high
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_jewish_head
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_muslim_high
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_religious_muslim_high_turkic
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_muslim_head
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_african_high
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_african_religious_masks
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_steppe_high
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_northern_high
	}

	#add_accessory_modifiers = {
	#	gene = hairstyles
	#	template = rtt_hairstyles
	#
	#	is_valid_custom = {
	#		monarchs_journey_unlock = 1
	#	}
	#}
	#add_accessory_modifiers = {
	#	gene = headgear
	#	template = religious_northern_high
	#}


	add_accessory_modifiers = {
		gene = headgear
		template = monarchs_journey_low

		weight = {
			base = 0
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = monarchs_journey_high

		weight = {
			base = 0
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = ep1_jester

		weight = {
			base = 0
		}
	}

	add_accessory_modifiers = {
		gene = headgear
		template = cfp_fantasy_witches
		is_valid_custom = {
			OR = {
				has_game_rule = barbershop_cfp_fantasy
				has_game_rule = ai_cfp_fantasy
			}
		}
	}

	add_accessory_modifiers = {
		gene = special_headgear_spectacles
		template = spectacles
	}

	add_accessory_modifiers = {
		gene = headgear
		template = reward_western_royalty
		is_valid_custom = {
			has_reward_item = newsletter_crown
		}
	}
	
	
	
	##############################################################################################################################
	######################################################### EPE  ###############################################################
	##############################################################################################################################

	##########################################################################
	#### Bulgarian 
	##########################################################################			
		
	add_accessory_modifiers = {
		gene = headgear
		template = epe_balkan_royalty
		is_valid_custom = {
			has_ep3_dlc_trigger = yes
		}		
	}	
	
	
	##########################################################################
	#### Han Chinese
	##########################################################################

	add_accessory_modifiers = {
		gene = headgear
		template = han_chinese_common
	}	
	add_accessory_modifiers = {
		gene = headgear
		template = han_chinese_low_nobility
	}	
	add_accessory_modifiers = {
		gene = headgear
		template = han_chinese_high_nobility
	}
	add_accessory_modifiers = {
		gene = headgear
		template = han_chinese_royalty
	}
	add_accessory_modifiers = {
		gene = headgear
		template = han_chinese_imperial
	}
	add_accessory_modifiers = {
		gene = headgear
		template = han_chinese_war
	}	
	
	##########################################################################
	#### East Slavic
	##########################################################################

	add_accessory_modifiers = {
		gene = headgear
		template = east_slav_common
	}	
	add_accessory_modifiers = {
		gene = headgear
		template = east_slav_low_nobility
	}	
	add_accessory_modifiers = {
		gene = headgear
		template = east_slav_high_nobility
	}
	add_accessory_modifiers = {
		gene = headgear
		template = east_slav_royalty
	}
	add_accessory_modifiers = {
		gene = headgear
		template = east_slav_imperial
	}
	add_accessory_modifiers = {
		gene = headgear
		template = east_slav_war
	}	
	
	##########################################################################
	#### Spymaster
	##########################################################################	
	
	add_accessory_modifiers = {
		gene = headgear
		template = epe_spymaster_headgears
	}		
	
	##########################################################################
	#### EPE Crown Titles
	##########################################################################			
	
	add_accessory_modifiers = {
		gene = headgear
		template = epe_crown_titles
	}

	#######################
	###  Rajas of Asia  ###
	#######################

	add_accessory_modifiers = {
		gene = headgear
		template = chinese_common
	}

	add_accessory_modifiers = {
		gene = headgear
		template = chinese_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = chinese_high_nobility
	}

	add_accessory_modifiers = {
		gene = headgear
		template = chinese_royalty
	}

	add_accessory_modifiers = {
		gene = headgear
		template = chinese_prince
	}

	add_accessory_modifiers = {
		gene = headgear
		template = chinese_imperial
	}

	add_accessory_modifiers = {
		gene = headgear
		template = chinese_song_headgear
	}

	add_accessory_modifiers = {
		gene = headgear
		template = chinese_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = religious_taoism_high
	}

	add_accessory_modifiers = {
		gene = headgear
		template = shogunate_suieikan
	}

	add_accessory_modifiers = {
		gene = headgear
		template = shogunate_war
	}

	add_accessory_modifiers = {
		gene = headgear
		template = khmer_crown
	}

	add_accessory_modifiers = {
		gene = headgear
		template = tai_crown
	}

	add_accessory_modifiers = {
		gene = headgear
		template = tai_crown2
	}

	add_accessory_modifiers = {
		gene = headgear_CFP
		template = cfp_fantasy_witches
		is_valid_custom = {
			OR = {
				has_game_rule = barbershop_cfp_fantasy
				has_game_rule = ai_cfp_fantasy
			}
		}
	}

}


#####################################
#									#
# 			  HEADGEAR 	2		    #
#									#
#####################################

custom_headgear_2 = {
	usage = customization
	interface_position = 10


	add_accessory_modifiers = {
		gene = headgear_2
		template = no_headgear
	}
}
