﻿
special_makeup = {

	# usage = customization
	priority = 6

	no_makeup = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gene_makeup
				template = no_makeup
				range = {0 1}
			}
			morph = { # TEMPORARY hack for when removing makeup in the barbershop. Without this, eyebrows will be gone. It should be fixed properly in code, as this doesn't give us actual eyebrows from DNA.
				mode = modify
				gene = gene_eyebrows_shape
				template = avg_spacing_avg_thickness
				value = 0.71
			}
			morph = { # TEMPORARY hack for when removing makeup in the barbershop. Without this, eyebrows will be gone. It should be fixed properly in code, as this doesn't give us actual eyebrows from DNA.
				mode = modify
				gene = gene_eyebrows_fullness
				template = layer_2_avg_thickness
				value = 0.83
			}
		}
		outfit_tags = { no_clothes nightgown }
		weight = {
			base = 0
			modifier = {
				add = 1000
				should_be_fully_naked_portrait_trigger = yes
			}
			modifier = {
				add = 1000
				should_be_topless_portrait_trigger = yes
			}
			modifier = { #
				add = 50
				is_male = yes
				# Japanese gfx
				portrait_shared_clothing_contents_trigger = {
					CULTURE_SCOPE = culture
					CULTURE_FLAG = japanese
				}
			}
		}
	}

	chinese_makeup_01 = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gene_makeup
				template = chinese_01
				range = {0.4 0.7}
			}
			morph = {
				mode = modify
				gene = gene_eyebrows_shape
				template = no_eyebrows
				value = 0
			}
			morph = {
				mode = modify
				gene = gene_eyebrows_fullness
				template = no_eyebrows
				value = 0
			}
		}
		weight = {
			base = 0
			modifier = {
				add = -1000
				age >= 10
				is_female = yes
				OR = {
					portrait_low_nobles_clothing_trigger = {  
						CULTURE_INPUT = chinese 
					}
					portrait_high_nobles_clothing_trigger = {  
						CULTURE_INPUT = chinese 
					}				 
				}
				# General makeup triggers (clergy, naked, sickness, armor, etc.)
				portrait_shared_makeup_trigger = yes
				NOR = {
					culture = { has_cultural_pillar = heritage_korean }
					has_trait = devoted
					government_has_flag = government_is_theocracy
					has_council_position = councillor_court_chaplain
				}
			}
		}
	}

	chinese_makeup_02 = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gene_makeup
				template = chinese_02
				range = {0.4 0.7}
			}
			morph = {
				mode = modify
				gene = gene_eyebrows_shape
				template = no_eyebrows
				value = 0
			}
			morph = {
				mode = modify
				gene = gene_eyebrows_fullness
				template = no_eyebrows
				value = 0
			}
		}
		weight = {
			base = 0
			modifier = {
				add = -1000
				age >= 10
				is_female = yes
				OR = {
					portrait_low_nobles_clothing_trigger = {  
						CULTURE_INPUT = chinese 
					}
					portrait_high_nobles_clothing_trigger = {  
						CULTURE_INPUT = chinese 
					}				 
				}
				# General makeup triggers (clergy, naked, sickness, armor, etc.)
				portrait_shared_makeup_trigger = yes
				NOR = {
					culture = { has_cultural_pillar = heritage_korean }
					has_trait = devoted
					government_has_flag = government_is_theocracy
					has_council_position = councillor_court_chaplain
				}
			}
		}
	}

	japanese_makeup = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gene_makeup
				template = japanese_01
				range = {0.4 0.7}
			}
			morph = {
				mode = modify
				gene = gene_eyebrows_shape
				template = no_eyebrows
				value = 0
			}
			morph = {
				mode = modify
				gene = gene_eyebrows_fullness
				template = no_eyebrows
				value = 0
			}
			accessory = {
				mode = modify
				gene = teeth_accessory
				template = ohaguro_teeth
				value = 1
			}
			accessory = {
				mode = add
				gene = beards
				template = no_beard
				range = {0 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = -1000
				age > 12
				# Japanese gfx
				portrait_shared_clothing_contents_trigger = {
					CULTURE_SCOPE = culture
					CULTURE_FLAG = japanese
				}
				# General makeup triggers (clergy, naked, sickness, armor, etc.)
				portrait_shared_makeup_trigger = yes
				# Only married
				OR = {
					AND = {
						OR = {
							is_male = yes
							AND = {
								is_female = yes
								OR = {
									is_married = yes
									is_concubine = yes
								}				
							}			
						}
						# Only Ritsuryo nobility
						OR = {
							government_allows = administrative
							court_owner ?= { government_allows = administrative }
							primary_spouse ?= { government_allows = administrative }
						}
						OR = {
							highest_held_title_tier >= main_administrative_tier
							court_owner ?= { highest_held_title_tier >= main_administrative_tier }
							primary_spouse ?= { highest_held_title_tier >= main_administrative_tier }
							house.house_head ?= { highest_held_title_tier >= main_administrative_tier }
						}
					}
				}
			}
			modifier = {
				add = -75
				tgp_japanese_high_nobility_clothing_family_trigger = no
			}
			modifier = {
				add = -250
				age > 60
				is_male = yes
			}
			modifier = {
				add = -1000
				has_character_flag = murasaki
			}
		}
	}

	southeast_asian_makeup = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gene_makeup
				template = malay_01
				range = {0.2 0.8}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 200
				age >= 10
				is_female = yes
				OR = {
					portrait_low_nobles_clothing_trigger = {  
						CULTURE_INPUT = southeast_asian 
					}
					portrait_high_nobles_clothing_trigger = {  
						CULTURE_INPUT = southeast_asian 
					}	 
					portrait_low_nobles_clothing_trigger = {  
						CULTURE_INPUT = malay 
					}
					portrait_high_nobles_clothing_trigger = {  
						CULTURE_INPUT = malay 
					}						
				}
			}
		}
	}

	southeast_asian_blackened_teeth = {
		dna_modifiers = {
			accessory = {
				mode = modify
				gene = teeth_accessory
				template = ohaguro_teeth
				value = 1
			}
			morph = {
				mode = add
				gene = gene_makeup
				template = malay_01
				range = {0.2 0.8}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = -1000
				age >= 10
				OR = {
					portrait_low_nobles_clothing_trigger = {  
						CULTURE_INPUT = viet 
					}
					portrait_high_nobles_clothing_trigger = {  
						CULTURE_INPUT = viet 
					}	 
					portrait_low_nobles_clothing_trigger = {  
						CULTURE_INPUT = tai 
					}
					portrait_high_nobles_clothing_trigger = {  
						CULTURE_INPUT = tai 
					}						
				}
			}
		}
	}

	ainu_lip_paint_01 = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gene_makeup
				template = ainu_01
				range = {0.9 1.0}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = -1000
				age >= 10
				is_female = yes
				portrait_ainu_clothing_trigger = yes
			}
		}
	}

	ainu_lip_paint_02 = {
		dna_modifiers = {
			morph = {
				mode = add
				gene = gene_makeup
				template = ainu_02
				range = {0.9 1.0}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = -1000
				age >= 10
				is_female = yes
				portrait_ainu_clothing_trigger = yes
			}
		}
	}

}

