﻿# Make sure the weights here match up best as possible with the hairstyles set
custom_hair = {
	usage = customization
	interface_position = 0
	priority = 5

	no_hair = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = hairstyles
				template = no_hairstyles
				value = 0
			}
		}

		weight = {
			base = 0
			modifier = {
				add = 200
				exists = this
				exists = character:easteregg_joe_parkin
				this = character:easteregg_joe_parkin
			}
			modifier = {
				add = 200
				exists = this
				exists = character:easteregg_alessandro_bragalini
				this = character:easteregg_alessandro_bragalini
			}
		}
	}

	### SP5 - Crowns of Authority ###

	add_accessory_modifiers = {
		gene = hairstyles
		template = sp5_hairstyles
		is_valid_custom = {
			has_sp5_dlc_triggers = yes
		}
	}
	#ccp9
	
	add_accessory_modifiers = {
		gene = hairstyles
		template = ccp9_uighur_hairstyles
		is_valid_custom = {
			has_cp9_dlc_trigger = yes
		}
	}

	### TGP - Asia ###

	add_accessory_modifiers = {
		gene = hairstyles
		template = tgp_chinese_hairstyles
		is_valid_custom = {
			has_tgp_dlc_trigger = yes
		}
		weight = {
			base = 0
			modifier = {
				add = 50
		        portrait_chinese_clothing_trigger = yes
			}
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = tgp_japanese_hairstyles
		is_valid_custom = {
			has_tgp_dlc_trigger = yes
		}
		weight = {
			base = 0
			modifier = {
				add = 50
		        portrait_japanese_clothing_trigger = yes
			}
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = tgp_japanese_royal_hairstyles
		is_valid_custom = {
			has_tgp_dlc_trigger = yes
		}
		weight = {
			base = 0
			modifier = {
				add = 50
		        portrait_japanese_clothing_trigger = yes
			}
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = tgp_southeast_hairstyles
		is_valid_custom = {
			has_tgp_dlc_trigger = yes
		}
		weight = {
			base = 0
			modifier = {
				add = 50
		        portrait_southeast_asian_clothing_trigger = yes
			}
		}
	}

	### MPO - Khans of the Steppe ###

	add_accessory_modifiers = {
		gene = hairstyles
		template = mpo_mongol_hairstyles
		is_valid_custom = {
			has_mpo_dlc_trigger = yes
		}
		weight = {
			base = 0
			modifier = {
				add = 50
		        portrait_steppe_clothing_trigger = yes
			}
		}
	}

	### SP4 - Crowns of the World ###

	add_accessory_modifiers = {
		gene = hairstyles
		template = sp4_western_hairstyles
		is_valid_custom = {
			has_sp4_dlc_trigger = yes
		}
		weight = {
			base = 0
			modifier = {
				add = 50
		        portrait_western_clothing_trigger = yes
			}
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = sp4_mena_hairstyles
		is_valid_custom = {
			has_sp4_dlc_trigger = yes
		}
		weight = {
			base = 0
			modifier = {
				add = 50
		        portrait_mena_clothing_trigger = yes
			}
		}
	}

	### SP3 - Couture of the Capets ###

	add_accessory_modifiers = {
		gene = hairstyles
		template = sp3_hairstyles
		is_valid_custom = {
			has_dlc_feature = couture_of_the_capets
		}
		weight = {
			base = 0
			modifier = {
				add = 50
		        portrait_byzantine_clothing_trigger = yes
			}
		}
	}

	### Ep3 Hair ###
	#byzantine
	add_accessory_modifiers = {
		gene = hairstyles
		template = ep3_byzantine_hairstyle
		is_valid_custom = {
			has_ep3_dlc_trigger = yes
		}
		weight = {
			base = 0
			modifier = {
				add = 50
		        portrait_byzantine_clothing_trigger = yes
			}
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = ep3_byzantine_hairstyles_wavy
		is_valid_custom = {
			has_ep3_dlc_trigger = yes
		}
		weight = {
			base = 0
			portrait_byzantine_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = ep3_byzantine_hairstyles_curly
		is_valid_custom = {
			has_ep3_dlc_trigger = yes
		}
		weight = {
			base = 0
			portrait_byzantine_clothing_modifier = yes
		}
	}
	
	add_accessory_modifiers = {
		gene = hairstyles
		template = ep3_byzantine_hairstyles_straight
		is_valid_custom = {
			has_ep3_dlc_trigger = yes
		}
		weight = {
			base = 0
			portrait_byzantine_clothing_modifier = yes
		}
	}

	### FP3 Hair ###
	#iranian
	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
		template = fp3_hairstyles_iranian_straight

		weight = {
			base = 0
			portrait_fp3_iranian_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
		template = fp3_hairstyles_iranian_wavy

		weight = {
			base = 0
			portrait_fp3_iranian_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = { #Unop: To show the "without hearring variant"
		gene = hairstyles
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
		template = fp3_hairstyles_iranian_straight_common

		weight = {
			base = 0
			portrait_fp3_iranian_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = { #Unop: To show the "without hearring variant"
		gene = hairstyles
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
		template = fp3_hairstyles_iranian_wavy_common

		weight = {
			base = 0
			portrait_fp3_iranian_clothing_modifier = yes
		}
	}

	#turkic
	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			OR = {
				has_fp3_dlc_trigger = yes
				has_mpo_dlc_trigger = yes
			}
		}
		template = fp3_hairstyles_turkic_straight

		weight = {
			base = 0
			portrait_fp3_turkic_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			OR = {
				has_fp3_dlc_trigger = yes
				has_mpo_dlc_trigger = yes
			}
		}
		template = fp3_hairstyles_turkic_wavy

		weight = {
			base = 0
			portrait_fp3_turkic_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = { #Unop: To show the "without hearring variant"
		gene = hairstyles
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
		template = fp3_hairstyles_turkic_straight_common

		weight = {
			base = 0
			portrait_fp3_turkic_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = { #Unop: To show the "without hearring variant"
		gene = hairstyles
		is_valid_custom = {
			has_fp3_dlc_trigger = yes
		}
		template = fp3_hairstyles_turkic_wavy_common

		weight = {
			base = 0
			portrait_fp3_turkic_clothing_modifier = yes
		}
	}

	### EP2 Hair ###
	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			has_ep2_dlc_trigger = yes
		}
		template = ep2_hairstyles_western
	}

	### FP2 Hair ###
	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
		template = fp2_hairstyles_iberian_muslim_straight

		weight = {
			base = 0
			portrait_fp2_iberian_muslim_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
		template = fp2_hairstyles_iberian_muslim_wavy

		weight = {
			base = 0
			portrait_fp2_iberian_muslim_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
		template = fp2_hairstyles_iberian_christian_straight

		weight = {
			base = 0
			portrait_fp2_iberian_christian_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			has_fp2_dlc_trigger = yes
		}
		template = fp2_hairstyles_iberian_christian_wavy

		weight = {
			base = 0
			portrait_fp2_iberian_christian_clothing_modifier = yes
		}
	}

	### FP1 Hair ###

	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			has_fp1_dlc_trigger = yes
		}
		template = fp1_hairstyles_straight

		weight = {
			base = 0
			portrait_fp1_norse_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		is_valid_custom = {
			has_fp1_dlc_trigger = yes
		}
		template = fp1_hairstyles_wavy

		weight = {
			base = 0
			portrait_fp1_norse_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = western_hairstyles_straight

		weight = {
			base = 0
			portrait_western_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = western_hairstyles_wavy

		weight = {
			base = 0
			portrait_western_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = western_hairstyles_curly

		weight = {
			base = 0
			portrait_western_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = mena_hairstyles_straight

		weight = {
			base = 0
			portrait_mena_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = mena_hairstyles_wavy

		weight = {
			base = 0
			portrait_mena_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = mena_hairstyles_curly

		weight = {
			base = 0
			portrait_mena_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = byzantine_hairstyles_straight

		weight = {
			base = 0
			portrait_byzantine_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = byzantine_hairstyles_wavy

		weight = {
			base = 0
			portrait_byzantine_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = byzantine_hairstyles_curly

		weight = {
			base = 0
			portrait_byzantine_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = indian_hairstyles_straight

		weight = {
			base = 0
			portrait_indian_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = indian_hairstyles_wavy

		weight = {
			base = 0
			portrait_indian_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = indian_hairstyles_curly

		weight = {
			base = 0
			portrait_indian_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = steppe_hairstyles_straight

		weight = {
			base = 0
			portrait_steppe_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = steppe_hairstyles_wavy

		weight = {
			base = 0
			portrait_steppe_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = steppe_hairstyles_curly

		weight = {
			base = 0
			portrait_steppe_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = northern_hairstyles_straight

		weight = {
			base = 0
			portrait_northern_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = northern_hairstyles_wavy

		weight = {
			base = 0
			portrait_northern_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = northern_hairstyles_curly

		weight = {
			base = 0
			portrait_northern_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = sub_saharan_hairstyles_afro

		weight = {
			base = 0
			portrait_african_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = byzantine_hairstyles_afro #Unop ck3-tiger Fix missing hairstyle template

		weight = {
			base = 0
			portrait_byzantine_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = sub_saharan_hairstyles_wavy #Unop ck3-tiger Fix missing hairstyle template

		weight = {
			base = 0
			portrait_african_clothing_modifier = yes
		}
	}

	#Unop ck3-tiger Add modifiers for sub_saharan_hairstyles_curly hairstyle template
	add_accessory_modifiers = {
		gene = hairstyles
		template = sub_saharan_hairstyles_curly

		weight = {
			base = 0
			portrait_african_clothing_modifier = yes
		}
	}

	#Unop ck3-tiger Add modifiers for sub_saharan_hairstyles_straight hairstyle template
	add_accessory_modifiers = {
		gene = hairstyles
		template = sub_saharan_hairstyles_straight

		weight = {
			base = 0
			portrait_african_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = indian_hairstyles_afro #Unop ck3-tiger Fix missing hairstyle template

		weight = {
			base = 0
			portrait_indian_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = northern_hairstyles_afro #Unop ck3-tiger Fix missing hairstyle template

		weight = {
			base = 0
			portrait_northern_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = steppe_hairstyles_afro #Unop ck3-tiger Fix missing hairstyle template

		weight = {
			base = 0
			portrait_steppe_clothing_modifier = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = rtt_hairstyles

		weight = {
			base = 0
			portrait_scottish_unique_haircut = yes
			portrait_frankish_unique_haircut = yes
		}
	}

	add_accessory_modifiers = {
		gene = hairstyles
		template = special_hairstyles
	}
}
