# The choice is made based on a weighted random, but the first factor that evaluates to >= 100 will be automatically chosen

# p0 background
0 = {
	0 = { # castle 1
		factor = 1
		modifier = {
			factor = 0
			NOT = { religion_group = christian }
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			is_nomadic = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}

	1 = { #throne room
		factor = 50
		modifier = {
			factor = 0
			NOT = { real_tier = king }
			NOT = { real_tier = emperor }
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			OR = {
				is_nomadic = yes
				is_tribal = yes
			}
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}

	2 = { # dungeon
		factor = 100
		modifier = {
			factor = 0
			prisoner = no
			NOT = { death_reason = death_dungeon }
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}

	3 = { # forest
		factor = 1
		modifier = {
			factor = 0
			NOT = { capital_scope = { terrain = forest } }
			NOT = { capital_scope = { terrain = woods } }	
		}
		modifier = {
			factor = 2
			OR = {
				is_pagan_religion = yes
				religion = aztec
			}
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0.01
			is_nomadic = yes
		}
		modifier = {
			factor = 10
			is_tribal = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}

	4 = { # bed
		factor = 100
		modifier = {
			factor = 0
			is_alive = yes
			NOT = { trait = incapable }
			NOT = { trait = infirm }
		}
		modifier = {
			factor = 0.001
			OR = {
				death_sacrificed_trigger = yes
				death_reason = death_battle
				death_execution_trigger = yes
				death_reason = death_dungeon
			}
		}
		modifier = {
			factor = 0.02
			trait = infirm
			is_alive = yes
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	
	5 = { # tavern
		factor = 100
		modifier = {
			factor = 0
			NOT = { 
				OR = {
					trait = drunkard
					trait = hedonist
					trait = lustful
				}
			}
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	
	6 = { # military camp
		factor = 100
		modifier = {
			factor = 0
			OR = {
				AND = {
					is_alive = yes
					in_command = no
					NOT = { has_job_title  = job_marshal }
				}
				AND = {
					is_alive = no
					NOT = { death_reason = death_battle }
				}
			}
		}
		modifier = {
			factor = 0.02
			has_job_title = job_marshal
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	7 = { # Dolmen
		factor = 5
		modifier = {
			factor = 0
			NOT = { religion = aztec }
			is_pagan_religion = no
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 100
			is_alive = no
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			culture_group = west_african
		}
		modifier = {
			factor = 0
			culture_group = arabic
		}
		modifier = {
			factor = 2
			is_priest = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	8 = { # Gallows
		factor = 5
		modifier = {
			factor = 0
			NOT = { trait = cruel }
			NOT = { trait = impaler }
			NOT = { death_execution_trigger = yes }
		}
		modifier = {
			factor = 20
			OR = {
				trait = impaler
				death_execution_trigger = yes
			}
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	9 = { # Church
		factor = 100
		modifier = {
			factor = 0
			NOT = { religion_group = christian }
		}
		modifier = {
			factor = 0
			OR = {
				is_ruler = no
				is_theocracy = no
			}
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	10 = { # Desert
		factor = 5
		modifier = {
			factor = 0
			NOT = { religion_group = muslim }
			NOT = { religion_group = zoroastrian_group }
			NOT = { religion = zun_pagan }
			NOT = { religion = arab_pagan }
			NOT = { religion = berber_pagan }
			NOT = { trait = desert_mother }
			NOT = { trait = desert_father }
		}
		modifier = {
			factor = 2
			religion_group = pagan
		}
		modifier = {
			factor = 2
			OR = {
				religion_group = muslim
				religion = arab_pagan
				religion = berber_pagan
			}
		}
		modifier = {
			factor = 100
			OR = {
				trait = desert_mother
				trait = desert_father
			}
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	11 = { # Steppe
		factor = 1
		modifier = {
			factor = 0
			NOT = { culture_group = altaic }
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}	
		modifier = {
			factor = 10
			culture_group = altaic
			NOT = { culture = turkish }
		}
		modifier = {
			factor = 10
			is_nomadic = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	12 = { # Ocean w ships
		factor = 10000
		modifier = {
			factor = 0
			NOT = { is_at_sea = yes }
		}
	}
	13 = { # Muslim interior
		factor = 2
		modifier = {
			factor = 0
			NOT = { religion_group = muslim }
			NOT = { religion_group = zoroastrian_group }
			NOT = { religion = zun_pagan }
			NOT = { religion = arab_pagan }
			NOT = { religion = berber_pagan }
			NOT = { religion_group = indian_group }
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	14 = { # Harem
		factor = 1
		modifier = {
			factor = 0
			NOT = { religion_group = muslim }
			NOT = { religion_group = indian_group }
			NOT = { religion_group = zoroastrian_group }
			NOT = { religion = zun_pagan }
			NOT = { religion = arab_pagan }
			NOT = { religion = berber_pagan }
		}
		modifier = {
			factor = 100
			OR = {
				trait = lustful
				trait = hedonist
			}
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	15 = { # Muslim interior 2
		factor = 5
		modifier = {
			factor = 0
			NOT = { religion_group = muslim }
			NOT = { religion = arab_pagan }
			NOT = { religion = berber_pagan }
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}

	16 = { # Mongol camp 1
		factor = 1
		modifier = {
			factor = 0
			NOT = { culture = mongol }
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}

	17 = { # Mongol camp 2
		factor = 1
		modifier = {
			factor = 0
			NOT = { culture = mongol }
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}

	18 = { # Papal palace
		factor = 100
		modifier = {
			factor = 0
			NOT = { has_landed_title = k_papal_state }
			NOT = { has_landed_title = d_fraticelli }
			NOT = { has_claim = k_papal_state }
			NOT = { has_claim = d_fraticelli }
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}

	19 = { # Muslim mosque
		factor = 100
		modifier = {
			factor = 0
			NOT = { religion_group = muslim }
		}
		modifier = {
			factor = 0
			OR = {
				is_ruler = no
				is_theocracy = no
			}
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}

	20 = { # Pagan human sacrifice
		factor = 1
		modifier = {
			factor = 0
			NOT = { religion = aztec }
			is_pagan_religion = no
			NOT = { death_sacrificed_trigger = yes }
		}
		modifier = {
			factor = 10
			religion = aztec
		}
		modifier = {
			factor = 1000
			death_sacrificed_trigger = yes
		}
		modifier = {
			factor = 0
			location = { OR = { terrain = ocean terrain = inland_ocean } }
		}
		modifier = {
			factor = 0
			in_command = yes
		}
		modifier = {
			factor = 10
			is_priest = yes
		}
		modifier = {
			factor = 0
			trait = saint
		}
	}
	
	21 = { # Saint background
		factor = 100
		modifier = {
			factor = 0
			NOT = { trait = saint }
		}
	}
}

# p1 hair  --- WARNING! Property 1 MUST be Hair, otherwise the hair hiding helmets wont work ---
1 = {
	0 = { # Completely bald
		factor = 1
		modifier = {
			factor = 0.1
			is_female = no
			NOT = { age = 50 }
			NOT = { trait = monk }
			NOT = { trait = desert_father }
		}
		modifier = {
			factor = 0.1
			is_female = yes
			NOT = { trait = desert_mother }
		}
		modifier = {
			factor = 2
			OR = {
				trait = desert_father
				trait = desert_mother
			}
		}
		# Does not suit African females of a Western Culture
		modifier = {
			factor = 0
			is_female = yes
			graphical_culture = westafricangfx
			NOT = { culture = manden }
			NOT = { culture = ethiopian }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 100
			is_devout_chinese_buddhist_trigger = yes
		}
		modifier = {
			factor = 0
			follows_filial_piety_trigger = yes
		}
	}

	1 = { # Black Adder
		factor = 1
		
		# Does not suit African females of a Western Culture
		modifier = {
			factor = 0
			is_female = yes
			graphical_culture = westafricangfx
			NOT = { culture = manden }
			NOT = { culture = ethiopian }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
	}
	
	2 = { # Page
		factor = 1
		
		# Does not suit Western females with African style headgear
		modifier = {
			factor = 0
			is_female = yes
			OR = {
				culture = manden
				culture = ethiopian
			}
			NOT = { graphical_culture = westafricangfx }
			NOT = { graphical_culture = muslimgfx }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
	}

	3 = { # Synth
		factor = 1
		
		# Does not suit Western females with African style headgear
		modifier = {
			factor = 0
			is_female = yes
			OR = {
				culture = manden
				culture = ethiopian
			}
			NOT = { graphical_culture = westafricangfx }
			NOT = { graphical_culture = muslimgfx }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
	}

	4 = { # Long Straight
		factor = 1
		
		# Does not suit Western females with African style headgear
		modifier = {
			factor = 0
			is_female = yes
			OR = {
				culture = manden
				culture = ethiopian
			}
			NOT = { graphical_culture = westafricangfx }
			NOT = { graphical_culture = muslimgfx }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
	}

	5 = { # Long Curly
		factor = 1
		
		# Does not suit African females of a Western Culture
		modifier = {
			factor = 0
			is_female = yes
			graphical_culture = westafricangfx
			NOT = { culture = manden }
			NOT = { culture = ethiopian }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
	}

	6 = {  # Tonsure
		factor = 1
		modifier = {
			factor = 0
			is_female = no
			higher_tier_than = unlanded
		}
		modifier = {
			factor = 0
			is_female = no
			NOT = { religion_group = christian }
		}
		modifier = {
			factor = 0
			is_female = no
			NOT = { trait = detached_priest }
			NOT = { trait = martial_cleric }
			NOT = { trait = scholarly_theologian }
			NOT = { trait = mastermind_theologian }
			NOT = { has_job_title = job_spiritual }
			NOT = { trait = monk }
			NOT = { trait = desert_father }
		}

		modifier = {
			factor = 50
			is_female = no
		}
		
		# Does not suit Western females with African style headgear
		modifier = {
			factor = 0
			is_female = yes
			OR = {
				culture = manden
				culture = ethiopian
			}
			NOT = { graphical_culture = westafricangfx }
			NOT = { graphical_culture = muslimgfx }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		
		# Does not suit African females of a Western Culture
		modifier = {
			factor = 0
			is_female = yes
			graphical_culture = westafricangfx
			NOT = { culture = manden }
			NOT = { culture = ethiopian }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
	}
	
	7 = {  # Short
		factor = 1
		
		# Does not suit Western females with African style headgear
		modifier = {
			factor = 0
			is_female = yes
			OR = {
				culture = manden
				culture = ethiopian
			}
			NOT = { graphical_culture = westafricangfx }
			NOT = { graphical_culture = muslimgfx }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		
		# Does not suit African females of a Western Culture
		modifier = {
			factor = 0
			is_female = yes
			graphical_culture = westafricangfx
			NOT = { culture = manden }
			NOT = { culture = ethiopian }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
	}
	
	8 = { # Short Curly
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
	}
	
	9 = {  # Short Uncouth
		factor = 1
		modifier = {
			factor = 5
			is_pagan_religion = yes
		}
		
		# Does not suit Western females with African style headgear
		modifier = {
			factor = 0
			is_female = yes
			OR = {
				culture = manden
				culture = ethiopian
			}
			NOT = { graphical_culture = westafricangfx }
			NOT = { graphical_culture = muslimgfx }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
		modifier = {
			factor = 0
			is_female = yes
			follows_filial_piety_trigger = yes
		}
	}
	
	10 = {  # Long Uncouth
		factor = 1
		
		modifier = {
			factor = 5
			is_pagan_religion = yes
		}
		
		# Does not suit Western females with African style headgear
		modifier = {
			factor = 0
			is_female = yes
			OR = {
				culture = manden
				culture = ethiopian
			}
			NOT = { graphical_culture = westafricangfx }
			NOT = { graphical_culture = muslimgfx }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
		modifier = {
			factor = 0
			is_female = yes
			follows_filial_piety_trigger = yes
		}
	}
	
	11 = { # Balding
		factor = 1
		modifier = {
			factor = 0.1
			is_female = no
			NOT = { age = 50 }
			NOT = { trait = monk }
			NOT = { trait = desert_father }
		}
		modifier = {
			factor = 0
			is_female = yes
			follows_filial_piety_trigger = yes
		}
	}
	
	12 = { # Marine
		factor = 1
		
		# Does not suit Western females with African style headgear
		modifier = {
			factor = 0
			is_female = yes
			OR = {
				culture = manden
				culture = ethiopian
			}
			NOT = { graphical_culture = westafricangfx }
			NOT = { graphical_culture = muslimgfx }
			OR = {
				higher_real_tier_than = count
				spouse = { higher_real_tier_than = count }
				has_minor_title = title_prince
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
		modifier = {
			factor = 0
			is_female = yes
			follows_filial_piety_trigger = yes
		}
		modifier = {
			factor = 2
			filial_piety_maiden_trigger = yes
		}
	}
	
	13 = { # Mohawk
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
		modifier = {
			factor = 0
			is_female = yes
			follows_filial_piety_trigger = yes
		}
		modifier = {
			factor = 2
			filial_piety_maiden_trigger = yes
		}
	}
	
	14 = { # Mohawk
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
		modifier = {
			factor = 0
			is_female = yes
			follows_filial_piety_trigger = yes
		}
		modifier = {
			factor = 2
			filial_piety_maiden_trigger = yes
		}
	}
	
	15 = { # Mohawk
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = monk
				trait = desert_father
				trait = desert_mother
			}
		}
	}	
}

# p2 base
2 = {
}

# p3 clothes
3 = {
	
	0 = { # Royal clothes 1
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
			NOT = { is_offmap_tag_including_dead = offmap_china }
		}
		modifier = {
			factor = 0
			NOT = { real_tier = king }
			NOT = { real_tier = emperor }
			NOT = { spouse = { real_tier = king } }
			NOT = { spouse = { real_tier = emperor } }
			NOT = { has_minor_title = title_prince }
			NOT = { is_offmap_tag_including_dead = offmap_china }
		}
	}
	
	1 = { # Royal clothes 2
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
			NOT = { is_offmap_tag_including_dead = offmap_china }
		}
		modifier = {
			factor = 0
			NOT = { real_tier = king }
			NOT = { real_tier = emperor }
			NOT = { spouse = { real_tier = king } }
			NOT = { spouse = { real_tier = emperor } }
			NOT = { has_minor_title = title_prince }
			NOT = { is_offmap_tag_including_dead = offmap_china }
		}
	}
	
	2 = { # Royal clothes 3
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
			NOT = { is_offmap_tag_including_dead = offmap_china }
		}
		modifier = {
			factor = 0
			NOT = { real_tier = king }
			NOT = { real_tier = emperor }
			NOT = { spouse = { real_tier = king } }
			NOT = { spouse = { real_tier = emperor } }
			NOT = { has_minor_title = title_prince }
			NOT = { is_offmap_tag_including_dead = offmap_china }
		}
	}
	
	3 = { # Noble clothes 1
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
		}
		modifier = {
			factor = 0
			NOT = { real_tier = duke }
			NOT = { real_tier = count }
			NOT = { real_tier = baron }
			NOT = { spouse = { real_tier = duke } }
			NOT = { spouse = { real_tier = count } }
			NOT = { spouse = { real_tier = baron } }
			NOT = { has_minor_title = title_prince }
		}
	}
	
	4 = { # Noble clothes 2
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
		}
		modifier = {
			factor = 0
			NOT = { real_tier = duke }
			NOT = { real_tier = count }
			NOT = { real_tier = baron }
			NOT = { spouse = { real_tier = duke } }
			NOT = { spouse = { real_tier = count } }
			NOT = { spouse = { real_tier = baron } }
			NOT = { has_minor_title = title_prince }
		}
	}
	
	5 = { # Noble clothes 3
		factor = 1
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
		}
		modifier = {
			factor = 0
			NOT = { real_tier = duke }
			NOT = { real_tier = count }
			NOT = { real_tier = baron }
			NOT = { spouse = { real_tier = duke } }
			NOT = { spouse = { real_tier = count } }
			NOT = { spouse = { real_tier = baron } }
			NOT = { has_minor_title = title_prince }
		}
	}
	
	6 = { # Modest clothes 1
		factor = 1
		modifier = {
			factor = 0
			NOT = { trait = peasant_leader }
			NOT = { trait = heresiarch }
			OR = {
				is_ruler = yes
				
				has_minor_title = title_prince
				spouse = { real_tier = emperor }
				spouse = { real_tier = king }
				spouse = { real_tier = duke }
			}
		}
		modifier = {
			factor = 10
			is_ruler = yes
			is_theocracy = yes
			is_pagan_religion = yes
		}
	}
	7 = { # Modest clothes 2
		factor = 1
		modifier = {
			factor = 0
			NOT = { trait = peasant_leader }
			NOT = { trait = heresiarch }
			OR = {
				is_or_was_offmap_power_ruler = yes
				is_ruler = yes
				has_minor_title = title_prince
				spouse = { real_tier = emperor }
				spouse = { real_tier = king }
				spouse = { real_tier = duke }
			}
		}
	}
	
	8 = { # Modest clothes 3
		factor = 1
		modifier = {
			factor = 0
			NOT = { trait = peasant_leader }
			NOT = { trait = heresiarch }
			OR = {
				is_or_was_offmap_power_ruler = yes
				is_ruler = yes
				has_minor_title = title_prince
				spouse = { real_tier = emperor }
				spouse = { real_tier = king }
				spouse = { real_tier = duke }
			}
		}
	}
	9 = { # Shady clothes
		factor = 100
		modifier = {
			factor = 0
			higher_real_tier_than = duke
		}		
		modifier = {
			factor = 0
			NOT = { has_job_title = job_spymaster }
		}
	}
	
	# Martial
	10 = {
		factor = 100
		modifier = {
			factor = 0
			NOT = { trait = shieldmaiden }
			NOT = { has_job_title  = job_marshal }
			NOT = { in_command = yes }
			NOT = {
				primary_title = {
					OR = {
						mercenary = yes
						holy_order = yes
						title = e_china_west_governor
					}
				}
			}
		}
		modifier = {
			factor = 0
			OR = {
				AND = {
					is_female = yes
					NOT = { trait = shieldmaiden }
				}
				real_tier = king
				real_tier = emperor
				AND = {
					real_tier = duke
					any_demesne_title = {
						real_tier = baron
					}
					NOT = {
						primary_title = {
							OR = {
								title = d_knights_hospitaler
								title = d_knights_templar
								title = d_teutonic_order
								title = e_china_west_governor
							}
						}
					}
				}
				AND = {
					religion_group = christian
					OR = {
						AND = {
							is_ruler = yes
							is_theocracy = yes
						}
						has_job_title = job_spiritual
					}
				}
			}
		}
		modifier = {
			factor = 0.99
			chinese_martial_modifier_trigger = yes
		}
		modifier = {
			factor = 100 # This ensures that the reverse order check stays matched
			has_portrait_property = { layer = 5 index = 10 }
		}
	}
	
	# Ragged prison clothes
	11 = {
		factor = 100
		modifier = {
			factor = 0
			prisoner = no
		}
	}
	
	# Chinese Martial Extension 1
	12 = {
		factor = 99
		modifier = {
			factor = 0
			chinese_generals_modifier_trigger = no
		}
		modifier = {
			factor = 100 # This ensures that the reverse order check stays matched
			has_portrait_property = { layer = 5 index = 12 }
		}
	}
	
	# Chinese Martial Extension 2
	13 = {
		factor = 99
		modifier = {
			factor = 0
			chinese_martial_modifier_trigger = no
		}
		modifier = {
			factor = 100 # This ensures that the reverse order check stays matched
			has_portrait_property = { layer = 5 index = 13 }
		}
	}
	
	# Chinese Martial Extension 3
	14 = {
		factor = 99
		modifier = {
			factor = 0
			chinese_generals_modifier_trigger = no
		}
		modifier = {
			factor = 100 # This ensures that the reverse order check stays matched
			has_portrait_property = { layer = 5 index = 14 }
		}
	}
}

# p4 beard
4 = {
	0 = {
		factor = 1
		modifier = {
			factor = 0
			OR = {
				religion_group = muslim
				religion = arab_pagan
				religion = berber_pagan
			}
			NOT = { graphical_culture = muslimgfx }
		}
		modifier = {
			factor = 30
			religion_group = christian
			OR = {
				culture = greek
				culture = italian
			}
			OR = {
				graphical_culture = southerngfx
				graphical_culture = byzantinegfx
			}
		}
		modifier = {
			factor = 15
			religion_group = christian
			culture_group = iberian
			OR = {
				graphical_culture = southerngfx
				graphical_culture = byzantinegfx
			}
		}
		modifier = {
			factor = 100
			is_devout_chinese_buddhist_trigger = yes
		}
	}
	1 = {
		factor = 1
	}
	2 = {
		factor = 1
	}
	3 = {
		factor = 1
	}
	4 = {
		factor = 1
	}
	5 = {
		factor = 1
	}
	6 = {
		factor = 1
	}
	7 = {
		factor = 1
	}
	8 = {
		factor = 1
	}
	9 = {
		factor = 1
		modifier = {
			factor = 5
			religion_group = christian
			culture_group = iberian
			OR = {
				graphical_culture = southerngfx
				graphical_culture = byzantinegfx
			}
		}
	}
	10 = {
		factor = 1
		modifier = {
			factor = 0
			OR = {
				religion_group = muslim
				religion = arab_pagan
				religion = berber_pagan
			}
			NOT = { graphical_culture = muslimgfx }
		}
		modifier = {
			factor = 20
			religion_group = christian
			culture_group = iberian
			OR = {
				graphical_culture = southerngfx
				graphical_culture = byzantinegfx
			}
		}
		modifier = {
			factor = 60
			religion_group = christian
			OR = {
				culture = greek
				culture = italian
			}
			OR = {
				graphical_culture = southerngfx
				graphical_culture = byzantinegfx
			}
		}
	}
}

# p5 headgear
5 = {
	# Imperial crown/Caliph turban
	0 = {
		factor = 100
		modifier = {
			factor = 0
			NOT = { real_tier = emperor }
			NOT = { spouse = { real_tier = emperor } }
			NOT = { is_offmap_tag_including_dead = offmap_china }
		}
		modifier = {
			factor = 0
			primary_title = {
				OR = {
					title = e_great_britain
					title = e_yugoslavia
				}
			}
		}
		modifier = {
			factor = 0
			is_feudal = no
			NOT = { is_offmap_tag_including_dead = offmap_china }
		}
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
			NOT = { is_offmap_tag_including_dead = offmap_china }
		}
		modifier = {
			factor = 0
			song_dynasty_futou_trigger = yes
		}
		modifier = {
			factor = 0
			has_landed_title = e_china_west_governor # Uses martial clothing instead
		}
	}
	
	# Royal crown/turban 1
	1 = {
		factor = 1
		modifier = {
			factor = 0
			NOT = { real_tier = king }
			NOT = { spouse = { real_tier = king } }
		}
		modifier = {
			factor = 0
			is_feudal = no
		}
		modifier = {
			factor = 0
			independent = no
			spouse = { independent = no }
		}
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
		}
	}

	# Royal crown/turban 2
	2 = {
		factor = 1
		modifier = {
			factor = 0
			NOT = { real_tier = king }
			NOT = { spouse = { real_tier = king } }
		}
		modifier = {
			factor = 0
			is_feudal = no
		}
		modifier = {
			factor = 0
			independent = no
			spouse = { independent = no }
		}
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
		}
	}

	# Royal crown/turban 3
	3 = {
		factor = 1
		modifier = {
			factor = 0
			NOT = { real_tier = king }
			NOT = { spouse = { real_tier = king } }
			NOT = { song_dynasty_futou_trigger = yes }
		}
		modifier = {
			factor = 0
			is_feudal = no
			NOT = { song_dynasty_futou_trigger = yes }
		}
		modifier = {
			factor = 0
			independent = no
			spouse = { independent = no }
		}
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
			NOT = { song_dynasty_futou_trigger = yes }
		}
		modifier = {
			factor = 100
			song_dynasty_futou_trigger = yes
		}
	}

	# Simple golden band/turban
	4 = {
		factor = 1
		modifier = {
			factor = 0
			is_feudal = yes
			lower_real_tier_than = DUKE
			NOT = { spouse = { real_tier = duke } }
			NOT = { has_minor_title = title_prince }
		}
		modifier = {
			factor = 0
			real_tier = EMPEROR
		}
		modifier = {
			factor = 0
			is_republic = yes
			NOT = { real_tier = duke }
			NOT = { real_tier = king }
			NOT = { real_tier = emperor }
			NOT = { has_minor_title = title_prince }
			NOT = { spouse = { real_tier = emperor } }
			NOT = { spouse = { real_tier = king } }
			NOT = { spouse = { real_tier = duke } }
		}
		modifier = {
			factor = 0
			is_feudal = yes
			AND = {
				real_tier = king
				independent = yes
			}
		}
		modifier = {
			factor = 0
			OR = {
				trait = peasant_leader
				trait = heresiarch
				trait = monk
				trait = nun
				trait = desert_mother
				trait = desert_father
				trait = perfecti
			}
		}
	}

	# Common headgear 1 - hood
	5 = {
		factor = 1
		modifier = {
			factor = 0
			NOT = { trait = peasant_leader }
			NOT = { trait = heresiarch }
			NOT = { trait = druze_uqqal }
			NOT = { trait = druze_ajawid }
			OR = {
				is_or_was_offmap_power_ruler = yes
				is_ruler = yes
				has_minor_title = title_prince
				spouse = { real_tier = emperor }
				spouse = { real_tier = king }
				spouse = { real_tier = duke }
			}
		}
		modifier = {
			factor = 100
			OR = {
				trait = druze_uqqal
				trait = druze_ajawid
			}
		}
		modifier = {
			factor = 10
			is_ruler = yes
			is_theocracy = yes
			is_pagan_religion = yes
		}
	}
	
	# Common headgear 2 - hood
	6 = {
		factor = 1
		modifier = {
			factor = 0
			NOT = { trait = peasant_leader }
			NOT = { trait = heresiarch }
			NOT = { trait = monk }
			NOT = { trait = desert_father }
			NOT = { trait = perfecti }
			OR = {
				is_or_was_offmap_power_ruler = yes
				is_ruler = yes
				has_minor_title = title_prince
				spouse = { real_tier = emperor }
				spouse = { real_tier = king }
				spouse = { real_tier = duke }
			}
		}
		modifier = {
			factor = 100
			OR = {
				trait = monk
				trait = desert_father
			}
		}
		modifier = {
			factor = 100
			trait = perfecti
			is_female = no
		}
	}

	# Common headgear 3 - Red hat
	7 = {
		factor = 1
		modifier = {
			factor = 0
			NOT = { trait = peasant_leader }
			NOT = { trait = heresiarch }
			OR = {
				NOT = { religion = orthodox }
				is_or_was_offmap_power_ruler = yes
				is_ruler = yes
				has_minor_title = title_prince
				spouse = { real_tier = emperor }
				spouse = { real_tier = king }
				spouse = { real_tier = duke }
			}
		}
	}
	
	# Common headgear 4 - hood
	8 = {
		factor = 1
		modifier = {
			factor = 0
			NOT = { trait = peasant_leader }
			NOT = { trait = heresiarch }
			NOT = { trait = nun }
			NOT = { trait = desert_mother }
			NOT = { trait = perfecti }
			OR = {
				is_or_was_offmap_power_ruler = yes
				is_ruler = yes
				has_minor_title = title_prince
				spouse = { real_tier = emperor }
				spouse = { real_tier = king }
				spouse = { real_tier = duke }
			}
		}
		modifier = {
			factor = 100
			OR = {
				trait = nun
				trait = desert_mother
			}
		}
		modifier = {
			factor = 100
			trait = perfecti
			is_female = yes
		}
	}

	# Shady headgear
	9 = {
		factor = 100
		modifier = {
			factor = 0
			higher_real_tier_than = count
		}
		modifier = {
			factor = 0
			NOT = { has_job_title = job_spymaster }
		}
	}

	# Martial headgear
	10 = {
		factor = 100
		modifier = {
			factor = 0
			NOT = { has_portrait_property = { layer = 3 index = 10 } }
		}
	}

	# Blank
	11 = {
		factor = 3
		modifier = {
			factor = 20000
			trait = shieldmaiden
			NOT = { has_minor_title = title_commander }
		}
		modifier = {
			factor = 0
			OR = {
				real_tier = emperor
				real_tier = king
				real_tier = duke
				has_minor_title = title_prince
				spouse = { real_tier = emperor }
				spouse = { real_tier = king }
				spouse = { real_tier = duke }
			}
		}
	}
	
	# Chinese Martial Extension 1
	12 = {
		factor = 100
		modifier = {
			factor = 0
			NOT = { has_portrait_property = { layer = 3 index = 12 } }
		}
	}
	
	# Chinese Martial Extension 2
	13 = {
		factor = 100
		modifier = {
			factor = 0
			NOT = { has_portrait_property = { layer = 3 index = 13 } }
		}
	}
	
	# Chinese Martial Extension 3
	14 = {
		factor = 100
		modifier = {
			factor = 0
			NOT = { has_portrait_property = { layer = 3 index = 14 } }
		}
	}
}

# p6 imprisoned
6 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			prisoner = yes
		}
	}

	1 = { # prisoner
		factor = 100
		modifier = {
			factor = 0
			prisoner = no
		}
	}
}

# p7 scars
7 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			OR = {
				trait = maimed
				trait = wounded
				trait = scarred
				trait = scarred_female
				#trait = disfigured
				#trait = one_eyed
			}
		}
   	}

	1 = { # scar 1
		factor = 1
		modifier = {
			factor = 0
			NOT = { 
				OR = {
					trait = maimed
					trait = wounded
					trait = scarred
					trait = scarred_female
					#trait = disfigured
					#trait = one_eyed
				}
			}
		}
   	}

	2 = { # scar 2
		factor = 1
		modifier = {
			factor = 0
			NOT = { 
				OR = {
					trait = maimed
					trait = wounded
					trait = scarred
					trait = scarred_female
					#trait = disfigured
					#trait = one_eyed
				}
			}
		}
   	}

	3 = { # scar 3
		factor = 1
		modifier = {
			factor = 0
			NOT = { 
				OR = {
					trait = maimed
					trait = wounded
					trait = scarred
					trait = scarred_female
					#trait = disfigured
					#trait = one_eyed
				}
			}
		}
   	}

	4 = { # scar 4
		factor = 1
		modifier = {
			factor = 0
			NOT = { 
				OR = {
					trait = maimed
					trait = wounded
					trait = scarred
					trait = scarred_female
					#trait = disfigured
					#trait = one_eyed
				}
			}
		}
   	}
}

# p8 red dots
8 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			OR = {
				trait = has_measles
				trait = has_small_pox
			}
		}
 	}

	1 = { # red dots
		factor = 100
		modifier = {
			factor = 0
			OR = {
				NOT = {
					trait = has_measles
					trait = has_small_pox
				}
			}
		}
  	}
}

# p9 boils
9 = {

	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			OR = {
				trait = has_bubonic_plague
			}
		}
 	}

	1 = { # boils
		factor = 100
		modifier = {
			factor = 0
			OR = {
				NOT = {
					trait = has_bubonic_plague
				}
			}
		}
 	}
 	
}

# p10 blinded
10 = {
	0 = {
		factor = 100
		modifier = {
			factor = 0
			trait = blinded
		}
	}
	
	1 =  {
		factor = 100
		modifier = {
			factor = 0
			NOT = {
				trait = blinded
			}
		}
	}
}

# p11 player
11 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			AND = {
				ai = no
				multiplayer = yes
			}
		}
	}

	1 = { # player
		factor = 100
		modifier = {
			factor = 0
			OR = {
				ai = yes
				multiplayer = no
			}
		}
	}
}

# p12 mask for the disfigured
12 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			OR = { 
				trait = disfigured 
				has_character_modifier = attending_masquerade
				has_character_modifier = forced_mask
			}
		}
	}

	1 = { # mask 1 bone
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					OR = { 
						trait = disfigured 
						has_character_modifier = attending_masquerade
						has_character_modifier = forced_mask
					}
					NOR = {
						is_tribal = yes
						is_nomadic = yes
						is_pagan_religion = yes
					}
				}
				has_character_modifier = golden_mask
			}
		}
	}

	2 = { # mask 2 silver
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					is_landed = no
					is_married = no
				}
				AND = {
					is_landed = yes
					NOT = { higher_tier_than = DUKE }
				}
				AND = {
					is_landed = no
					is_married = yes
					spouse = { NOT = { higher_tier_than = DUKE } }
				}
				is_tribal = yes
				is_nomadic = yes
				is_pagan_religion = yes
				has_character_modifier = golden_mask
			}
		}
		modifier = {
			factor = 0
			OR = {
				culture = manden
				culture_group = amazigh	
				culture_group = maghrebi
			}
		}
	}

	3 = { # mask 3 iron
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					is_landed = yes
					higher_tier_than = DUKE
				}
				AND = {
					is_landed = no
					is_married = yes
					spouse = { higher_tier_than = DUKE }
				}
				is_tribal = yes
				is_nomadic = yes
				is_pagan_religion = yes
				has_character_modifier = golden_mask
			}
		}
	}
	
	4 = { # mask 4 bone - blue stripes
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					trait = disfigured
					NOR = {
						is_tribal = yes
						is_nomadic = yes
						is_pagan_religion = yes
					}
				}
				has_character_modifier = golden_mask
			}
		}
	}
	
	5 = { # mask 5 bone - orange stripes
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					trait = disfigured
					NOR = {
						is_tribal = yes
						is_nomadic = yes
						is_pagan_religion = yes
					}
				}
				has_character_modifier = golden_mask
			}
		}
	}
	
	6 = { # mask 6 bone - red dots
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					trait = disfigured
					NOR = {
						is_tribal = yes
						is_nomadic = yes
					}
				}
				has_character_modifier = golden_mask
			}
		}
		modifier = {
			factor = 0
			NOR = {
				is_tribal = yes
				is_nomadic = yes
			}
		}
		modifier = {
			factor = 0
			NOR = {
				religion = west_african_pagan
				religion = west_african_pagan_reformed
				culture = manden
				culture_group = east_african
			}
		}
	}
	
	7 = { # mask 7 bone - black stripes
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					trait = disfigured
					NOR = {
						is_tribal = yes
						is_nomadic = yes
					}
				}
				has_character_modifier = golden_mask
			}
		}
		modifier = {
			factor = 0
			NOR = {
				is_tribal = yes
				is_nomadic = yes
			}
		}
		modifier = {
			factor = 0
			NOR = {
				religion = west_african_pagan
				religion = west_african_pagan_reformed
				culture = manden
				culture_group = east_african
			}
		}
	}
	
	8 = { # mask 8 bone - red stripes/eyes
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					trait = disfigured
					NOR = {
						is_tribal = yes
						is_nomadic = yes
						is_pagan_religion = yes
					}
				}
				has_character_modifier = golden_mask
			}
		}
	}
	
	9 = { # mask 9 bone - black eyes/lightning
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					trait = disfigured
					NOR = {
						is_tribal = yes
						is_nomadic = yes
						is_pagan_religion = yes
					}
				}
				has_character_modifier = golden_mask
			}
		}
	}
	
	10 = { # mask 10 - decorated silver
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					is_landed = no
					is_married = no
				}
				AND = {
					is_landed = yes
					NOT = { higher_tier_than = DUKE }
				}
				AND = {
					is_landed = no
					is_married = yes
					spouse = { NOT = { higher_tier_than = DUKE } }
				}
				is_tribal = yes
				is_nomadic = yes
				is_pagan_religion = yes
				has_character_modifier = golden_mask
			}
		}
		modifier = {
			factor = 0
			OR = {
				culture = manden
				culture_group = amazigh	
				culture_group = maghrebi
			}
		}
	}
	
	11 = { # mask 11 - decorated gold
		factor = 2
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					is_landed = no
					is_married = no
				}
				AND = {
					is_landed = yes
					NOT = { higher_tier_than = DUKE }
				}
				AND = {
					is_landed = no
					is_married = yes
					spouse = { NOT = { higher_tier_than = DUKE } }
				}
				is_tribal = yes
				is_nomadic = yes
				is_pagan_religion = yes
			}
			NOT = { has_character_modifier = golden_mask }
		}
		modifier = {
			factor = 0
			NOR = {
				trait = greedy
				trait = proud
				trait = ambitious
				trait = envious
				culture = manden
				culture_group = amazigh	
				culture_group = maghrebi
			}
			NOT = { has_character_modifier = golden_mask }
		}
		modifier = {
			factor = 5
			has_landed_title = k_papal_state
		}
		modifier = {
			factor = 1000
			has_character_modifier = golden_mask
		}
	}
	
	12 = { # mask 12 - full mask 1 leather
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					is_landed = no
					is_married = no
				}
				AND = {
					is_landed = yes
					NOT = { higher_tier_than = DUKE }
				}
				AND = {
					is_landed = no
					is_married = yes
					spouse = { NOT = { higher_tier_than = DUKE } }
				}
				is_pagan_religion = yes
				has_character_modifier = golden_mask
			}
		}
	}
	
	13 = { # mask 13 - full mask 2 bone
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOR = { 
					trait = disfigured 
					has_character_modifier = attending_masquerade
					has_character_modifier = forced_mask
				}
				AND = {
					is_landed = no
					is_married = no
				}
				AND = {
					is_landed = yes
					NOT = { higher_tier_than = DUKE }
				}
				AND = {
					is_landed = no
					is_married = yes
					spouse = { NOT = { higher_tier_than = DUKE } }
				}
				is_pagan_religion = yes
				has_character_modifier = golden_mask
			}
		}
	}
}

# p13 eyepatch for one_eyed
13 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			trait = one_eyed
			NOT = { has_character_modifier = glass_eye }
		}
	}

	1 = { # eyepatch 1
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOT = { trait = one_eyed }
				has_character_modifier = glass_eye
			}
		}
	}
	
	2 = { # eyepatch 2 - red leather
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOT = { trait = one_eyed }
				has_character_modifier = glass_eye
			}
		}
	}
	
	3 = { # eyepatch 3 - painted eye
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NAND = {
					trait = one_eyed
					OR = {
						trait = paranoid
						trait = possessed
					}
				}
				has_character_modifier = glass_eye
			}
		}
		modifier = {
			factor = 2
			OR = {
				trait = paranoid
				trait = possessed
			}
		}
	}
	
	4 = { # eyepatch 4 - red
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOT = { trait = one_eyed }
				has_character_modifier = glass_eye
			}
		}
	}
	
	5 = { # eyepatch 5 - white rag
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOT = { trait = one_eyed }
				has_character_modifier = glass_eye
			}
		}
		modifier = {
			factor = 3
			AND = {
				religion = catholic
				is_theocracy = yes
			}
		}
	}
	
	6 = { # eyepatch 6 - blue rag
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOT = { trait = one_eyed }
				has_character_modifier = glass_eye
			}
		}
		modifier = {
			factor = 2
			OR = {
				religion = tengri_pagan
				religion = tengri_pagan_reformed
			}
		}
	}
	
	7 = { # eyepatch 7 - green rag
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOT = { trait = one_eyed }
				has_character_modifier = glass_eye
			}
		}
		modifier = {
			factor = 2
			religion_group = muslim
		}
	}
	
	8 = { # eyepatch 8 - red rag
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NOT = { trait = one_eyed }
				has_character_modifier = glass_eye
			}
		}
	}
	
	9 = { # eyepatch 9 - bloodied rag
		factor = 1
		modifier = {
			factor = 0
			OR = {
				NAND = {
					trait = one_eyed
					OR = {
						trait = wroth
						trait = cruel
						has_minor_title = title_commander
					}
				}
				has_character_modifier = glass_eye
			}
		}
		modifier = {
			factor = 2
			OR = {
				trait = wroth
				trait = cruel
				has_minor_title = title_commander
			}
		}
		modifier = {
			factor = 2
			martial = 12
		}
	}
	
	10 = { # eyepatch 10 - tartan rag
		factor = 3
		modifier = {
			factor = 0
			OR = {
				NAND = {
					trait = one_eyed
					culture_group = celtic
				}
				has_character_modifier = glass_eye
			}
		}
	}
	
	11 = { # eyepatch 11 - scarred eye 1
		factor = 1
		modifier = {
			factor = 0
			NOT = { trait = one_eyed }
		}
		modifier = {
			factor = 0
			trait = shy
		}
		modifier = {
			factor = 4
			OR = {
				is_tribal = yes
				is_nomadic = yes
				trait = stubborn
			}
		}
	}
	
	12 = { # eyepatch 12 - scarred eye 2
		factor = 1
		modifier = {
			factor = 0
			NOT = { trait = one_eyed }
		}
		modifier = {
			factor = 0
			trait = shy
		}
		modifier = {
			factor = 4
			OR = {
				is_tribal = yes
				is_nomadic = yes
				trait = stubborn
			}
		}
	}
}

# p14 chinese makeup
14 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			chinese_makeup_trigger = yes
		}
	}

	1 = { # white powder
		factor = 1
	}
	
	2 = { # rouge a only
		factor = 1
	}
	
	3 = { # white powder and rouge a
		factor = 1
	}
	
	4 = { # rouge b only
		factor = 1
	}

	5 = { # white powder and rouge b
		factor = 1
	}
}

# p15 chinese makeup 2
15 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			chinese_makeup_trigger = yes
		}
	}

	1 = { # full lips
		factor = 1
	}
	
	2 = { # top lip
		factor = 1
	}
	
	3 = { # 'heart' lips
		factor = 1
	}
}

# p16 chinese empress jewelry
16 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			chinese_empress_jewelry_trigger = yes
		}
	}

	1 = { # Full face pearls and earrings
		factor = 1
	}
	
	2 = { # pearl earrings only
		factor = 1
	}
	
	3 = { # full face pearls and earrings 2
		factor = 1
	}
}

# p17 immortality
17 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			immortal = yes
		}
	}
	1 = {
		factor = 100
	}
}
