﻿
beards = {

	usage = game

    selection_behavior = weighted_random


    east_asian_beard = {
         dna_modifiers = {
             accessory = {
                 mode = replace
                 gene = beards
                 template = steppe_beards
                 range = { 0 1 } # For the randomness to work correctly
             }
		}   
        weight = {
            base = 0
            modifier = {
                add = 20
                east_asian_hair_trigger = yes
            }
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
        }
    }
    central_asian_beard = {
         dna_modifiers = {
             accessory = {
                 mode = replace
                 gene = beards
                 template = steppe_beards
                 range = { 0 1 } # For the randomness to work correctly
             }
		}   
        weight = {
            base = 0
            modifier = {
                add = 20
                central_asian_hair_trigger = yes
            }
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
        }
    }
    northern_beard = {
         dna_modifiers = {
             accessory = {
                 mode = replace
                 gene = beards
                 template = northern_beards
                 range = { 0 1 } # For the randomness to work correctly
             }
		}   
        weight = {
            base = 0
            modifier = {
                add = 20
                northern_hair_trigger = yes
            }
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
        }
    }
    western_beard = {
         dna_modifiers = {
             accessory = {
                 mode = replace
                 gene = beards
                 template = western_beards
                 range = { 0 1 } # For the randomness to work correctly
             }
		}   
        weight = {
            base = 0
            modifier = {
                add = 20
                western_hair_trigger = yes
            }
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
        }
    }
    mena_beard = {
         dna_modifiers = {
             accessory = {
                 mode = replace
                 gene = beards
                 template = mena_beards
                 range = { 0 1 } # For the randomness to work correctly
             }
		}   
        weight = {
            base = 0
            modifier = {
                add = 20
                mena_hair_trigger = yes
            }
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
        }
    }
    byzantine_beard = {
         dna_modifiers = {
             accessory = {
                 mode = replace
                 gene = beards
                 template = western_beards
                 range = { 0 1 } # For the randomness to work correctly
             }
		}   
        weight = {
            base = 0
            modifier = {
                add = 20
                byzantine_hair_trigger = yes
            }
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
        }
    }
    indian_beard = {
         dna_modifiers = {
             accessory = {
                 mode = replace
                 gene = beards
                 template = indian_beards
                 range = { 0 1 } # For the randomness to work correctly
             }
		}   
        weight = {
            base = 0
            modifier = {
                add = 20
                indian_hair_trigger = yes
            }
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
        }
    }
    subsaharan_beard = {
         dna_modifiers = {
             accessory = {
                 mode = replace
                 gene = beards
                 template = sub_saharan_beards
                 range = { 0 1 } # For the randomness to work correctly
             }
		}   
        weight = {
            base = 0
            modifier = {
                add = 20
                subsaharan_hair_trigger = yes
            }
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
        }
    }
    circumpolar_beard = {
         dna_modifiers = {
             accessory = {
                 mode = replace
                 gene = beards
                 template = steppe_beards
                 range = { 0 1 } # For the randomness to work correctly
             }
		}   
        weight = {
            base = 0
            modifier = {
                add = 20
                circumpolar_hair_trigger = yes
            }
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
        }
    }
    
	no_beard_for_children = {
        dna_modifiers = {
            accessory = {
                mode = replace
                gene = beards
                template = no_beard
                range = { 0 1 } # For the randomness to work correctly
            }
        }   
        weight = {
            base = 0
            modifier = {
                add = 100
                age < 18
            }
        }
    }

    has_no_beard = { # This is to give a random chance of a clean shaven look
        dna_modifiers = {
            accessory = {
                mode = replace
                gene = beards
                template = no_beard
                range = { 0 1 } # For the randomness to work correctly
            }
        }   
        weight = {
            base = 30 
            modifier = {
                add = -50
                has_character_flag = has_scripted_appearance
            }
            modifier = { # Different likelyhood of a clean shaven look in different cultures
                add = 0
                portrait_western_clothing_trigger = yes
            }
            modifier = { # Different likelyhood of a clean shaven look in different cultures
                add = -10
                portrait_northern_clothing_trigger = yes
            }
            modifier = { # Different likelyhood of a clean shaven look in different cultures
                add = -10
                portrait_steppe_clothing_trigger = yes
            }
            modifier = { # Different likelyhood of a clean shaven look in different cultures
                add = -50
                portrait_mena_clothing_trigger = yes
            }
        }
    }
    has_beard = { # Will always give a beard
        # dna_modifiers = {
        #     accessory = {
        #         mode = replace
        #         gene = beards
        #         template = no_beard
        #         range = { 0 1 } # For the randomness to work correctly
        #     }
        # }   
        weight = {
            base = 70
            modifier = { # Muslims should always have a beard
                add = 100
                religion = religion:islam_religion
            }
            modifier = {
                add = -100
                has_character_flag = has_scripted_appearance
            }
        }
    }

    # muslim_western_beard = {
    #     dna_modifiers = {
    #         accessory = {
    #             mode = replace
    #             gene = beards
    #             template = western_beards_religious
    #             range = { 0 1 } # For the randomness to work correctly
    #         }
    #     }   
    #     # outfit_tags = { no_clothes }
    #     weight = {
    #         base = 0
    #     modifier = {
    #         faith = { religion_tag = christianity_religion }
    #         has_gene = {
    #             category = beards
    #             template = western_beards
    #         }
    #     add = 100
    #     }

    #     }
    # }

}
