﻿headgear_armor = {

	usage = game
	selection_behavior = weighted_random
	priority = 4

	## DDE HRE ##

	dde_hre_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = dde_hre_war
				accessory = m_headgear_sec_dde_hre_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 70 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = dde_hre
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = dde_hre
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = dde_hre
					}
				}
			}
		}
	}

	dde_hre_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = dde_hre_war
				accessory = m_headgear_sec_dde_hre_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 70 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = dde_hre
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = dde_hre
				}
			}
		}
	}

	dde_hre_war_royalty = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = dde_hre_war
				accessory = m_headgear_sec_dde_hre_war_nob_01_roy
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 130 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = dde_hre
				}
				OR = {  portrait_royalty_armor_trigger = {
                    CULTURE_INPUT = dde_hre
                }
                	AND = { portrait_high_nobles_armor_trigger = {
                    		CULTURE_INPUT = dde_hre
               				 }
				highest_held_title_tier >= tier_kingdom 
				}
		}
			}
		}
	}

## Western ##

	western_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = western_war
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 20
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
			}
			modifier = {
				factor = 0	   # Should NOT show up if EP2 is active and we're not in the right era
				has_ep2_dlc_trigger = yes
				portrait_era1_armor_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western 
				}
				portrait_wear_closed_helmet_trigger = yes
			}
		}
	}

	ep2_western_era1_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era1_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				has_ep2_dlc_trigger = yes
				portrait_era1_armor_trigger = yes
			}
		}
	}

	ep2_western_era2_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era2_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				has_ep2_dlc_trigger = yes
				OR = {
					portrait_era2_armor_trigger = yes
				}
			}
		}
	}
	ep2_western_era3_era4_war= {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era2_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 30
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western 
				}
				                OR = {
					portrait_commoner_armor_trigger = {
							CULTURE_INPUT = western 
						}
						portrait_low_nobles_armor_trigger = {
							CULTURE_INPUT = western 
						}
							}
				has_ep2_dlc_trigger = yes
				portrait_era3_armor_trigger = yes
			}
		}
	}

	ep2_western_era3_war_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era3_war_nobility
				range = { 0 0.32 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 5
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				OR = {
                    portrait_commoner_armor_trigger = { 
                        CULTURE_INPUT = western
                    }
		 portrait_low_nobles_armor_trigger = { 
                                CULTURE_INPUT = western
                            }			
                   
                }
				has_ep2_dlc_trigger = yes
				OR = {portrait_era3_armor_trigger = yes 
									portrait_era4_armor_trigger = yes
										} # not using the armor trigger here because that was changed to be less historically accurate
			}
		}
	}

	ep2_western_era3_war_low_nobles = { # Greathelm
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era3_war_nobility
				range = { 0.34 0.65 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 20
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				portrait_low_nobles_armor_trigger = {
					CULTURE_INPUT = western
				}
				portrait_wear_closed_helmet_trigger = yes
				has_ep2_dlc_trigger = yes
				portrait_era3_armor_trigger = yes  # not using the armor trigger here because that was changed to be less historically accurate
			}
		}
	}

	ep2_western_era3_war_high_nobles = { # Greathelm with torse, mantle and crest
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era3_war_nobility
				range = { 0.67 1 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = western
				}
				  portrait_wear_closed_helmet_trigger = yes
				has_ep2_dlc_trigger = yes
				OR = {portrait_era3_armor_trigger = yes 
									portrait_era4_armor_trigger = yes
										} # not using the armor trigger here because that was changed to be less historically accurate
			}
		}
	}
	
	ep2_western_era3_war_high_nobles_coa = { # Greathelm with torse, mantle and crest
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era3_war_nobility
				range = { 0.67 1 }
			}
			accessory = {
                mode = add
                gene = additive_headgear
                template = coa_crest
                value = { 0 1 }
            }
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 80
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = western
				}
				  portrait_wear_closed_helmet_trigger = yes
				has_ep2_dlc_trigger = yes
				portrait_wear_helmet_ruler_acco_trigger = yes
				OR = {portrait_era3_armor_trigger = yes 
									portrait_era4_armor_trigger = yes
										} # not using the armor trigger here because that was changed to be less historically accurate
			}
			modifier = {
				add = 20
	
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western 
				}
		                portrait_high_nobles_armor_trigger = {
		                    CULTURE_INPUT = western
		                }
				portrait_wear_closed_helmet_trigger = yes
                portrait_wear_helmet_ruler_acco_trigger = yes
				has_ep2_dlc_trigger = yes
				OR = {portrait_era3_armor_trigger = yes 
					portrait_era4_armor_trigger = yes
						}
				highest_held_title_tier >= tier_kingdom 
			}
			modifier = {
				factor = 0
					   portrait_bandage_trigger = yes
			}
		}
	}

	ep2_western_era4_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era4_war_nobility
				range = { 0 0.32 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				has_ep2_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}
	
	ep2_western_era4_war2 = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era4_war_nobility
				range = {0.67 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				has_ep2_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}
	
	ep2_western_era4_war_fullplate = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era4_war_nobility
				range = {0.34 0.65}  # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				has_ep2_dlc_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	crusades_western_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = crusades_western_war
				range = { 0 0.49 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 110
				portrait_wear_helmet_trigger = yes
				portrait_western_crusades_trigger = yes
			}
			modifier = {
				add = 110
				portrait_wear_helmet_trigger = yes
				portrait_ep2_disguised_woman_trigger = yes
			}
			modifier = {
				factor = 0
				highest_held_title_tier >= tier_kingdom 
			}
		}
	}
	
	crusades_western_war_fullplate = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = crusades_western_war
				range = {0.51 1}  # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 110
				portrait_wear_helmet_trigger = yes
				portrait_western_crusades_trigger = yes
				  portrait_wear_closed_helmet_trigger = yes
			}
			modifier = {
				add = 110
				portrait_wear_helmet_trigger = yes
				portrait_ep2_disguised_woman_trigger = yes
			}
			modifier = {
				factor = 0
				highest_held_title_tier >= tier_kingdom 
			}
		}
	}

## Byzantine ##

	byzantine_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = byzantine_war
				accessory = m_headgear_sec_byzantine_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = byzantine
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = byzantine
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = byzantine
					}
				}
			}
		}
	}

	byzantine_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = byzantine_war
				accessory = m_headgear_sec_byzantine_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = byzantine
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = byzantine
				}
			}
		}
	}

	byzantine_war_royalty = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = byzantine_war
				accessory = m_headgear_sec_byzantine_war_nob_01_roy
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 110 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = byzantine
				}
				OR = {  portrait_royalty_armor_trigger = {
                    CULTURE_INPUT = byzantine
                }
                	AND = { portrait_high_nobles_armor_trigger = {
                    		CULTURE_INPUT = byzantine
               				 }
				highest_held_title_tier >= tier_kingdom 
				}
				}
			}
		}
	}

	ep2_byzantine_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_byzantine_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 60
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = byzantine
				}
				has_ep2_dlc_trigger = yes
			}
			modifier = {
				factor = 0		# Not used if EP3 is active and we're in the wrong era
				has_ep3_dlc_trigger = yes
				OR = {
					portrait_era1_armor_trigger = yes
					portrait_era2_armor_trigger = yes
				}
			}
		}
	}

	ep3_byzantine_era1_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep3_byzantine_era1_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 60
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = byzantine
				}
				has_ep3_dlc_trigger = yes
				OR = {
					portrait_era1_armor_trigger = yes
					portrait_era2_armor_trigger = yes
				}
			}
		}
	}

	ep3_byzantine_era2_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep3_byzantine_era2_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 60
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = byzantine
				}
				has_ep3_dlc_trigger = yes
				OR = {
					portrait_era3_armor_trigger = yes
					portrait_era4_armor_trigger = yes
				}
			}
		}
	}

	## Indian ##

	indian_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = indian_war
				accessory = m_headgear_sec_indian_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = indian
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = indian
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = indian
					}
				}
			}
		}
	}

	indian_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = indian_war
				accessory = m_headgear_sec_indian_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = indian
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = indian
				}
			}
		}
	}

	indian_war_royalty = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = indian_war
				accessory = m_headgear_sec_indian_war_nob_01_roy
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 110
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = indian
				}
				OR = {  portrait_royalty_armor_trigger = {
                    CULTURE_INPUT = indian
                }
                	AND = { portrait_high_nobles_armor_trigger = {
                    		CULTURE_INPUT = indian
               				 }
				highest_held_title_tier >= tier_kingdom 
				}
				}
			}
		}
	}

	ep2_indian_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_indian_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 60
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = indian
				}
				has_ep2_dlc_trigger = yes
			}
		}
	}

	## MENA ##

	mena_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = mena_war
				range = { 0 0.49 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = mena
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = mena
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = mena
					}
				}
			}
		}
	}

	mena_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = mena_war
				range = { 0.51 1 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 70
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = mena
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = mena
				}
			}
		}
	}

	ep2_mena_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_mena_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = mena
				}
				has_ep2_dlc_trigger = yes
			}
		}
	}

	## DDE Abbasid ##

	dde_abbasid_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = dde_abbasid_war
				accessory = m_headgear_sec_dde_abbasid_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 70
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = dde_abbasid
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = dde_abbasid
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = dde_abbasid
					}
				}
			}
		}
	}

	dde_abbasid_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = dde_abbasid_war
				accessory = m_headgear_sec_dde_abbasid_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = dde_abbasid
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = dde_abbasid
				}
			}
		}
	}

	## Steppe ##

	steppe_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = steppe_war
				accessory = m_headgear_sec_steppe_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = steppe
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = steppe
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = steppe
					}
				}
			}
			modifier = { # For Chinese, Japanese and Korean characters for players without AUH
				add = 50
				OR = {
					portrait_war_nobles_helmet_trigger = {
						CULTURE_INPUT = chinese
					}
					portrait_war_nobles_helmet_trigger = {
						CULTURE_INPUT = chinese
					}
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = chinese
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = chinese
					}
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = japanese
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = japanese
					}
				}
				has_tgp_dlc_trigger = no
			}
		}
	}

	steppe_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = steppe_war
				accessory = m_headgear_sec_steppe_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
						CULTURE_INPUT = steppe
					}
				portrait_high_nobles_armor_trigger = {
						CULTURE_INPUT = fp3_turkic
					}				
			}
			modifier = { # For Chinese, Japanese and Korean characters for players without AUH
				add = 50
				OR = {
					portrait_war_nobles_helmet_trigger = {
						CULTURE_INPUT = chinese
					}
					portrait_war_nobles_helmet_trigger = {
						CULTURE_INPUT = japanese
					}
				}
				OR = {
					portrait_high_nobles_armor_trigger = {
						CULTURE_INPUT = chinese
					}
					portrait_high_nobles_armor_trigger = {
						CULTURE_INPUT = japanese
					}
					portrait_high_nobles_armor_in_army_trigger = {
						CULTURE_INPUT = chinese
					}
					portrait_high_nobles_armor_in_army_trigger = {
						CULTURE_INPUT = japanese
					}
				}
				has_tgp_dlc_trigger = no
			}
		}
	}

	ep2_steppe_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_steppe_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = steppe
				}
				portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = steppe
                }
				has_ep2_dlc_trigger = yes
			}
		}
	}

	mpo_mongol_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = mpo_mongol_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 80
				OR = {
					portrait_war_nobles_helmet_trigger = {
						CULTURE_INPUT = steppe
					}
					portrait_high_nobles_armor_trigger = {
						CULTURE_INPUT = steppe
					}
				}
				has_mpo_dlc_trigger = yes
			}
			modifier = { # Not used by Turkic peoples of the Western steppes
				factor = 0
				OR = {
					portrait_war_nobles_helmet_trigger = {
						CULTURE_INPUT = fp3_turkic
					}
					portrait_high_nobles_armor_trigger = {
						CULTURE_INPUT = steppe
					}
				}
				OR = {
					has_fp3_dlc_trigger = yes
					has_mpo_dlc_trigger = yes
				}
			}
			modifier = { # For Chinese, Japanese and Korean characters for players without AUH
				add = 80
				OR = {
					portrait_war_nobles_helmet_trigger = {
						CULTURE_INPUT = chinese
					}
					portrait_high_nobles_armor_trigger = {
						CULTURE_INPUT = chinese
					}
					portrait_war_nobles_helmet_trigger = {
						CULTURE_INPUT = japanese
					}
					portrait_high_nobles_armor_trigger = {
						CULTURE_INPUT = japanese
					}
				}
				has_mpo_dlc_trigger = yes
				has_tgp_dlc_trigger = no
			}
		}
	}

	## Northern ##

	northern_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = northern_war
				accessory = m_headgear_sec_northern_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = northern
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = northern
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = northern
					}
					has_character_flag = is_currently_varangian
				}
			}
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = sami
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = sami
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = sami
					}
				}
			}
		}
	}

	northern_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = northern_war
				accessory = m_headgear_sec_northern_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = northern
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = northern
				}
			}
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = sami
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = sami
				}
			}
		}
	}

## FP2 Fate of Iberia ##

	fp2_iberian_muslim_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = fp2_muslim_war_nobility
				accessory = m_headgear_sec_fp2_iberian_muslim_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90 # slightly higher
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = fp2_iberian_muslim
				}
				OR = {
						portrait_commoner_armor_trigger = {
							CULTURE_INPUT = fp2_iberian_muslim
						}
						portrait_low_nobles_armor_trigger = {
							CULTURE_INPUT = fp2_iberian_muslim
						}
				}
			}
		}
	}

	fp2_iberian_muslim_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = fp2_muslim_war_nobility
				accessory = m_headgear_sec_fp2_iberian_muslim_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90 # slightly higher
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = fp2_iberian_muslim
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = fp2_iberian_muslim
				}
			}
		}
	}

	fp2_iberian_christian_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = fp2_christian_war_nobility
				accessory = m_headgear_sec_fp2_iberian_christian_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = fp2_iberian_christian
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = fp2_iberian_christian
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = fp2_iberian_christian
					}
				}
			}
		}
	}

	fp2_iberian_christian_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = fp2_christian_war_nobility
				accessory = m_headgear_sec_fp2_iberian_christian_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 70 # larger than the western war headgear
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = fp2_iberian_christian
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = fp2_iberian_christian
				}
			}
		}
	}

	## FP1 Norse ##

	fp1_norse_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = fp1_war
				range = { 0 0.49 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 80 # slightly higher than northern
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = fp1_norse
				}
				portrait_wear_closed_helmet_trigger = yes
            portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = fp1_norse
                }
			}
		}
	}

	fp1_norse_war_common = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = fp1_war_common
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 70
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = fp1_norse
				}
				portrait_wear_closed_helmet_trigger = yes
		         OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = fp1_norse
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = fp1_norse
                    }
                }
			}
		}
	}

	## Sub-Saharan Africans ##

	sub_saharan_war_low = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = mena_war
				range = { 0 0.49 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = african
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = african
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = african
                    }
                }
            }
		}
	}
	
	sub_saharan_war_high = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = mena_war
				range = { 0.51 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
                add = 70
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = african
                }
		portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = african
                }		
            }
		}
	}

	## AFR ##

	afr_berber_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = afr_war
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 101 # slightly higher than mena
				portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = afr_berber
                    }
			}
		}
	}

	## POL ##

	pol_west_slavic_era1_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
				accessory = m_headgear_sec_pol_era1_war_nob_01
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 101
				OR = {
					portrait_era1_armor_trigger = yes
					portrait_era2_armor_trigger = yes
				}
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = west_slavic
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = west_slavic
				}
			}
		}
	}

	pol_west_slavic_era3_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
				accessory = m_headgear_sec_pol_era3_war_nob_01
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 100
				portrait_era3_armor_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = west_slavic
				}
			}
		}
	}

	pol_west_slavic_era3_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
				accessory = m_headgear_sec_pol_era3_war_nob_01
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = pol_crest
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 101
				portrait_era3_armor_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = west_slavic
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = west_slavic
				}
			}
		}
	}

	pol_west_slavic_era4_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
				accessory = m_headgear_sec_pol_era4_war_nob_01
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 102
				portrait_era4_armor_trigger = yes
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = west_slavic
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = west_slavic
				}
			}
		}
	}

	pol_west_slavic_era4_war_royalty = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
				accessory = m_headgear_sec_pol_era4_war_nob_01
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = pol_crown
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 103
				portrait_era4_armor_trigger = yes
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = west_slavic
				}
				portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = west_slavic
                }
                OR = {  portrait_royalty_armor_trigger = {
                    CULTURE_INPUT = west_slavic
                }
                	AND = { portrait_high_nobles_armor_trigger = {
                    		CULTURE_INPUT = west_slavic
               				 }
				highest_held_title_tier >= tier_kingdom 
				}
		}
			}
		}
	}



	## FP3 Iranian ##

	fp3_iranian_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = fp3_iranian_war
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 60 # slightly higher than mena
				portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = fp3_iranian
                    }
				portrait_wear_helmet_ruler_acco_trigger = yes
				has_fp3_dlc_trigger = yes
			}
			modifier = {
		add = 40
		 portrait_high_nobles_armor_trigger = {
                        CULTURE_INPUT = fp3_iranian
                    }
		portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = fp3_iranian
                    }
	}
		}
	}

	## CCP4

	ccp4_khanty_war_com = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ccp4_khanty_war
                range = { 0 0.3 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 101
		portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = ugro_permian
                    }		
                portrait_commoner_armor_trigger = {
                    CULTURE_INPUT = ugro_permian
                }
            }
        }
    }

    ccp4_khanty_war_low_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ccp4_khanty_war
                range = { 0.1 0.6 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 101
		portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = ugro_permian
                    }		
                portrait_low_nobles_armor_trigger = {
                    CULTURE_INPUT = ugro_permian
                }
            }
        }
    }

    ccp4_khanty_war_high_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ccp4_khanty_war
                range = { 0.7 1.0 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 101
		portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = ugro_permian
                    }		
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = ugro_permian
                }
            }
        }
    }

	ce2_cumanian_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = special_headgear_face_mask
				template = fp3_iranian_face_mask_open
				range = { 0.51 1 } 
			}
			accessory = {
				mode = add
				gene = headgear
				template = mpo_mongol_war_nobility
				value = 1
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 70
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = turkic
				}	
				has_mpo_dlc_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_wear_no_headgear_trigger = yes
			}
		}
	}
	
	ce2_cumanian_war_close = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = special_headgear_face_mask
				template = fp3_iranian_face_mask_open
				range = { 0 0.49 }
			}
			accessory = {
				mode = add
				gene = headgear
				template = mpo_mongol_war_nobility
				value = 1
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 80
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = turkic
				}	
				portrait_wear_closed_helmet_trigger = yes
				has_mpo_dlc_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_wear_no_headgear_trigger = yes
			}
		}
	}

	## TGP Chinese ##

	tgp_chinese_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = tgp_chinese_era1_war_nobility
				accessory = m_headgear_sec_tgp_chinese_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = chinese
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = chinese
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = chinese
					}
				}
				has_tgp_dlc_trigger = yes
			}
		}
	}
	tgp_chinese_war_high_nobles_01 = { # Tang era helmets
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = tgp_chinese_era1_war_nobility
				accessory = m_headgear_sec_tgp_chinese_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 25 
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = chinese
				}
				portrait_low_nobles_armor_trigger = {
					CULTURE_INPUT = chinese
				}
				has_tgp_dlc_trigger = yes
			}
		}
	}
	tgp_chinese_war_high_nobles_02 = { # Song era helmets
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = tgp_chinese_era2_war_nobility
				range = { 0 0.49 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90 
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = chinese
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = chinese
				}
				has_tgp_dlc_trigger = yes
			}
		}
	}
	
	tgp_chinese_war_high_nobles_02_mask = { # Song era helmets
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = tgp_chinese_era2_war_nobility
				range = { 0.51 1 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90 
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = chinese
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = chinese
				}
				has_tgp_dlc_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
			}
		}
	}

	## TGP Japanese ##

	tgp_japanese_war_low_nobles = { 
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = tgp_japanese_war_nobility
				range = { 0 1 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 100
				portrait_wear_helmet_trigger = yes
				portrait_armor_generic_trigger = yes
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = japanese
					} 
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = japanese
					}								  
				}
				has_tgp_dlc_trigger = yes
			}
		}
	}

	tgp_japanese_war_high_nobles = { 
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = tgp_japanese_war_high_nobility
				range = { 0 1 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = japanese
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = japanese
				}
				has_tgp_dlc_trigger = yes
			}
		}
	}

	tgp_southeast_war_low_nobles = { 
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = indian_war
				range = { 0 1 }
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 100
				portrait_wear_helmet_trigger = yes
				portrait_armor_generic_trigger = yes
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = southeast_asian
					} 
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = southeast_asian
					}								  
				}
				# has_tgp_dlc_trigger = yes
			}
		}
	}
	
	ccp5_german_era3_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_german_era3_war_nobility
				range = {0 0.49}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90 ##
				OR = {
					AND = {
						portrait_war_nobles_helmet_ccp5_trigger = {
							CULTURE_INPUT = dde_hre
						}
						portrait_low_nobles_armor_trigger = {
							CULTURE_INPUT = dde_hre
						}
					}
					AND = {
						portrait_war_nobles_helmet_ccp5_trigger = {
							CULTURE_INPUT = swabian
						}
						portrait_low_nobles_armor_trigger = {
							CULTURE_INPUT = swabian
						}
					}
				}
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era3_armor_trigger = yes
			}
		}
	}

	ccp5_german_era3_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_german_era3_war_nobility
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90 ##
				OR = {
					AND = {
						portrait_war_nobles_helmet_ccp5_trigger = {
							CULTURE_INPUT = dde_hre
						}
						portrait_high_nobles_armor_trigger = {
							CULTURE_INPUT = dde_hre
						}
					}
					AND = {
						portrait_war_nobles_helmet_ccp5_trigger = {
							CULTURE_INPUT = swabian
						}
						portrait_high_nobles_armor_trigger = {
							CULTURE_INPUT = swabian
						}
					}  
				}
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era3_armor_trigger = yes
			}
		}
	}

	ccp5_french_era3_war_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_french_era3_war_com
				range = {0 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90 ##
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = french
					}
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = norman
					}
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = breton
					}
				}
				has_cp5_dlc_trigger = yes
				OR = {
					portrait_era3_armor_trigger = yes
					portrait_era4_armor_trigger = yes
				}
			}
		}
	}

	ccp5_french_era3_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_french_era3_war_nobility
				range = {0 0.49}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_ccp5_french_culture_group_low_nobles_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era3_armor_trigger = yes
			}
		}
	}

	ccp5_french_era3_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_french_era3_war_nobility
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_ccp5_french_culture_group_high_nobles_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era3_armor_trigger = yes
			}
		}
	}

	ccp5_english_era3_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_english_era3_war_nobility
				range = {0 0.49}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_ccp5_english_culture_group_low_nobles_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era3_armor_trigger = yes
			}
		}
	}

	ccp5_english_era3_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_english_era3_war_nobility
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_ccp5_english_culture_group_high_nobles_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era3_armor_trigger = yes
			}
		}
	}

	##ERA 4, Sugarloafs
	ccp5_english_era4_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_english_era4_war_nobility
				range = {0 0.49}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_ccp5_english_culture_group_low_nobles_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	ccp5_english_era4_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_english_era4_war_nobility
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_ccp5_english_culture_group_high_nobles_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	ccp5_french_era4_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_french_era4_war_nobility
				range = {0 0.49}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_ccp5_french_culture_group_low_nobles_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	ccp5_french_era4_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_french_era4_war_nobility
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_ccp5_french_culture_group_high_nobles_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	ccp5_german_era4_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_german_era4_war_nobility
				range = {0 0.49}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_ccp5_trigger = {
					CULTURE_INPUT = dde_hre
				}
				portrait_low_nobles_armor_trigger = {
					CULTURE_INPUT = dde_hre
				}
				NOT = {
					portrait_war_nobles_helmet_ccp5_trigger = {
						CULTURE_INPUT = swabian
					}
					portrait_low_nobles_armor_trigger = {
						CULTURE_INPUT = swabian
					}
				}
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	ccp5_german_era4_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_german_era4_war_nobility
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_ccp5_trigger = {
					CULTURE_INPUT = dde_hre
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = dde_hre
				}
				NOT = {
					portrait_war_nobles_helmet_ccp5_trigger = {
						CULTURE_INPUT = swabian
					}
					portrait_high_nobles_armor_trigger = {
						CULTURE_INPUT = swabian
					}
				}
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	ccp5_pommeranian_era4_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_german_era4_war_nobility
				value = 0
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_ccp5_trigger = {
					CULTURE_INPUT = pommeranian
				}
				portrait_low_nobles_armor_trigger = {
					CULTURE_INPUT = pommeranian
				}
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	ccp5_pommeranian_era4_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_german_era4_war_nobility
				range = { 0.53 0.91 }
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_ccp5_trigger = {
					CULTURE_INPUT = pommeranian
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = pommeranian
				}
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	ccp5_swabian_era4_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_swabian_era4_war_nobility
				range = {0 0.49}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_ccp5_trigger = {
					CULTURE_INPUT = swabian
				}
				portrait_low_nobles_armor_trigger = {
					CULTURE_INPUT = swabian
				}
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	ccp5_swabian_era4_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_swabian_era4_war_nobility
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_ccp5_trigger = {
					CULTURE_INPUT = swabian
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = swabian
				}
				portrait_wear_closed_helmet_trigger = yes
				has_cp5_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}
	##Era 3 War Priest
	##For unrelenting faith - warrior priests
	ccp5_german_era3_war_priest = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_german_era3_war_nobility
				range = {0.0 1}
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = ccp5_bishop_mitre
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 500
				portrait_ccp5_is_any_war_noble_trigger = {
					CULTURE_INPUT = dde_hre
				}
				portrait_religious_high_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_era3_armor_trigger = yes
				has_cp5_dlc_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_iconoclast_high_trigger = yes
			}
		}
	}

	 ##For unrelenting faith - warrior priests
	ccp5_french_era3_war_priest = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_french_era3_war_nobility
				range = {0.0 1}
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = ccp5_bishop_mitre
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 500
				OR = {
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = french
					}
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = norman
					}
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = breton
					}
				}
				OR = {
					portrait_religious_head_trigger = yes
					portrait_religious_high_trigger = yes
				}
				portrait_religious_christian_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_era3_armor_trigger = yes
				has_cp5_dlc_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_iconoclast_high_trigger = yes
			}
		}
	}

	##For unrelenting faith - warrior priests
	ccp5_english_era3_war_priest = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_english_era3_war_nobility
				range = {0.0 1}
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = ccp5_bishop_mitre
				range = {0.5 1}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 500
				OR = {
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = english
					}
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = english
					}
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = welsh
					}
				}
				portrait_religious_high_trigger = yes
				portrait_religious_christian_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_era3_armor_trigger = yes
				has_cp5_dlc_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_iconoclast_high_trigger = yes
			}
		}
	}

	##For unrelenting faith - warrior priests
	ccp5_swabian_era4_war_priest = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_swabian_era4_war_nobility
				range = {0.0 1}
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = ccp5_bishop_mitre
				range = {0.0 0.5}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 500
				portrait_ccp5_is_any_war_noble_trigger = {
					CULTURE_INPUT = swabian
				}
				portrait_religious_high_trigger = yes
				portrait_religious_christian_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_era4_armor_trigger = yes
				has_cp5_dlc_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_iconoclast_high_trigger = yes
			}
		}
	}
	##For unrelenting faith - warrior priests
	ccp5_german_era4_war_priest = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_german_era4_war_nobility
				range = {0.0 1}
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = ccp5_bishop_mitre
				range = {0.0 0.5}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 500
				portrait_ccp5_is_any_war_noble_trigger = {
					CULTURE_INPUT = dde_hre
				}
				portrait_religious_high_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_era4_armor_trigger = yes
				has_cp5_dlc_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_iconoclast_high_trigger = yes
			}
		}
	}

	 ##For unrelenting faith - warrior priests
	ccp5_french_era4_war_priest = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_french_era4_war_nobility
				range = {0.0 1}
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = ccp5_bishop_mitre
				range = {0.0 0.5}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 500
				OR = {
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = french
					}
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = norman
					}
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = breton
					}
				}
				OR = {
					portrait_religious_head_trigger = yes
					portrait_religious_high_trigger = yes
				}
				portrait_religious_christian_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_era4_armor_trigger = yes
				has_cp5_dlc_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_iconoclast_high_trigger = yes
			}
		}
	}

	##For unrelenting faith - warrior priests
	ccp5_english_era4_war_priest = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_english_era4_war_nobility
				range = {0.0 1}
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = ccp5_bishop_mitre
				range = {0.0 0.5}
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 500
				OR = {
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = english
					}
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = english
					}
					portrait_ccp5_is_any_war_noble_trigger = {
						CULTURE_INPUT = welsh
					}
				}
				portrait_religious_high_trigger = yes
				portrait_religious_christian_trigger = yes
				portrait_wear_closed_helmet_trigger = yes
				portrait_era4_armor_trigger = yes
				has_cp5_dlc_trigger = yes
			}
			modifier = {
				factor = 0
				portrait_iconoclast_high_trigger = yes
			}
		}
	}

	ccp5_western_war_nobility = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_western_war_nobility
				range = { 0.0 0.66 }
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				OR = {
					portrait_commoner_armor_trigger = {
						CULTURE_INPUT = western
					}
					AND = {
						OR = {
							portrait_low_nobles_armor_trigger = {
								CULTURE_INPUT = western
							}
							portrait_high_nobles_armor_trigger = {
								CULTURE_INPUT = western
							}
						}
						portrait_wear_closed_helmet_trigger = no
					}
				}
				has_cp5_dlc_trigger = yes
				OR = { portrait_era3_armor_trigger = yes
				portrait_era4_armor_trigger = yes
				}
			}
		}
	}

	ccp5_western_war_nobility_commoner = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ccp5_western_war_nobility
				range = { 0.0 1 }
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				portrait_commoner_armor_trigger = {
					CULTURE_INPUT = western
				}
				portrait_wear_closed_helmet_trigger = no
				has_cp5_dlc_trigger = yes
				OR = { portrait_era3_armor_trigger = yes
				portrait_era4_armor_trigger = yes
				}
			}
		}
	}
}

