namespace = z_character_trait
character_event = { 
	id = z_character_trait.1
	hide_window = yes

	is_triggered_only = yes

	trigger = {
		NOT = { trait = adopted }
		NOR = {
			trait = avatar
			trait = creature_monster
			trait = creature_human
			trait = creature_drow
			trait = creature_elf
			trait = creature_sea_elf
			trait = creature_dwarf
			trait = creature_goblin
			trait = creature_orc
			trait = creature_halfling
			trait = creature_giant
			trait = creature_treant
			trait = creature_ogre
			trait = creature_half_orc
			trait = creature_half_elf
			trait = creature_half_ogre
			trait = creature_half_dwarf
			trait = creature_ogrillon
			trait = creature_yikarian
			trait = creature_pureblood
			trait = creature_malison
			trait = creature_abomination
			trait = creature_centaur
			trait = creature_wemic
			trait = creature_lizardfolk
			trait = creature_naga
			trait = creature_gith
			trait = creature_hobgoblin
			trait = creature_bugbear
			trait = creature_gnoll
			trait = creature_tengu
			trait = creature_tiefling
			trait = creature_devil
			trait = creature_genasi
			trait = creature_genie
			trait = creature_dragonborn
			trait = creature_gnome
			trait = creature_aasimar
			trait = creature_daemon
			trait = creature_demon
			trait = creature_tanarukk
			trait = creature_dragon
			trait = creature_saurial
			trait = creature_pterafolk
			trait = creature_minotaur
			trait = creature_illithid
			trait = creature_beholder
			trait = creature_kobold
			trait = creature_half_giant
			trait = creature_eladrin
			trait = creature_sarrukh
			trait = creature_troll
			trait = creature_hag
			trait = creature_feyri
			trait = creature_angel
			trait = creature_goliath
			trait = creature_aarakocra
			trait = creature_sahuagin
			trait = creature_lamia
			trait = creature_kuotoa
			trait = creature_hagspawn
			has_character_flag = faerun_generated
		}
	}
	immediate = {
		if = {
			limit = {
				OR = {
					trait = adopted
					trait = avatar
					trait = creature_monster
					trait = creature_human
					trait = creature_drow
					trait = creature_elf
					trait = creature_sea_elf
					trait = creature_dwarf
					trait = creature_goblin
					trait = creature_orc
					trait = creature_halfling
					trait = creature_giant
					trait = creature_treant
					trait = creature_ogre
					trait = creature_half_orc
					trait = creature_half_elf
					trait = creature_half_ogre
					trait = creature_half_dwarf
					trait = creature_ogrillon
					trait = creature_yikarian
					trait = creature_pureblood
					trait = creature_malison
					trait = creature_abomination
					trait = creature_centaur
					trait = creature_wemic
					trait = creature_lizardfolk
					trait = creature_naga
					trait = creature_gith
					trait = creature_hobgoblin
					trait = creature_bugbear
					trait = creature_gnoll
					trait = creature_tengu
					trait = creature_tiefling
					trait = creature_devil
					trait = creature_genasi
					trait = creature_genie
					trait = creature_dragonborn
					trait = creature_gnome
					trait = creature_aasimar
					trait = creature_daemon
					trait = creature_demon
					trait = creature_tanarukk
					trait = creature_dragon
					trait = creature_saurial
					trait = creature_pterafolk
					trait = creature_minotaur
					trait = creature_illithid
					trait = creature_beholder
					trait = creature_kobold
					trait = creature_half_giant
					trait = creature_eladrin
					trait = creature_sarrukh
					trait = creature_troll
					trait = creature_hag
					trait = creature_feyri
					trait = creature_angel
					trait = creature_goliath
					trait = creature_aarakocra
					trait = creature_sahuagin
					trait = creature_lamia
					trait = creature_kuotoa
					trait = creature_hagspawn
				}
			}
			break = yes
		}
		if = {
			limit = {
				is_ruler = no
				liege = {
					OR = {
						has_character_flag = local_court
						is_dragon = yes
						trait = creature_sarrukh
						culture = planar
						trait = avatar
						culture = oeridian
						culture = wildspacer
					}
				}
			}
			location = {
				ROOT = {
					culture = PREV
					religion = PREV
					set_graphical_culture = PREV
				}
			}
		}
		if = {
			limit = {
				OR = {
					trait = rd_half_moon_elf
					trait = rd_half_sun_elf
					trait = rd_half_green_elf
					trait = rd_half_wood_elf
					trait = rd_half_drow
					trait = rd_half_orc
					trait = rd_tanarukk
					trait = rd_half_fiend
					trait = rd_half_dragon
					trait = rd_half_ogre
					trait = rd_hagspawn
					trait = rd_ogrillon
					trait = rd_spirit_folk
					trait = rd_malison
					trait = rd_abomination
					trait = rd_tiefling
					trait = rd_aasimar
					trait = rd_air_genasi
					trait = rd_fire_genasi
					trait = rd_water_genasi
					trait = rd_earth_genasi
					trait = rd_half_feyri
					trait = rd_half_giant
				}
			}
			if = {
				limit = {
					trait = rd_half_moon_elf
				}
				set_graphical_culture = moon_elf
				add_trait = creature_half_elf
			}
			if = {
				limit = {
					trait = rd_half_sun_elf
				}
				set_graphical_culture = sun_elf
				add_trait = creature_half_elf
			}
			if = {
				limit = {
					trait = rd_half_green_elf
				}
				set_graphical_culture = green_elf
				add_trait = creature_half_elf
			}
			if = {
				limit = {
					trait = rd_half_wood_elf
				}
				set_graphical_culture = wood_elf
				add_trait = creature_half_elf
			}
			if = {
				limit = {
					trait = rd_half_drow
				}
				set_graphical_culture = crinti
				add_trait = creature_half_elf
			}
			if = {
				limit = {
					trait = rd_half_orc
				}
				set_graphical_culture = orc
				add_trait = creature_half_orc
			}
			if = {
				limit = {
					trait = rd_tanarukk
				}
				set_graphical_culture = tanarukk
				add_trait = creature_tanarukk
			}
			if = {
				limit = {
					trait = rd_half_fiend
				}
				add_trait = half_fiend
			}
			if = {
				limit = {
					trait = rd_half_dragon
				}
				add_trait = half_dragon
			}
			if = {
				limit = {
					trait = rd_half_ogre
				}
				set_graphical_culture = ogre
				add_trait = creature_half_ogre
			}
			if = {
				limit = {
					trait = rd_ogrillon
				}
				set_graphical_culture = ogre
				add_trait = creature_ogrillon
			}
			if = {
				limit = {
					trait = rd_hagspawn
				}
				set_graphical_culture = hag
				add_trait = creature_hagspawn
			}
			if = {
				limit = {
					trait = rd_malison
				}
				set_graphical_culture = malison
				add_trait = creature_malison
			}
			if = {
				limit = {
					trait = rd_abomination
				}
				set_graphical_culture = abomination
				add_trait = creature_abomination
			}
			if = {
				limit = {
					trait = rd_tiefling
				}
				set_graphical_culture = tiefling
				add_trait = creature_tiefling
			}
			if = {
				limit = {
					trait = rd_aasimar
				}
				set_graphical_culture = aasimar
				add_trait = creature_aasimar
			}
			if = {
				limit = {
					trait = rd_air_genasi
				}
				set_graphical_culture = airgenasi
				add_trait = creature_genasi
			}
			if = {
				limit = {
					trait = rd_earth_genasi
				}
				set_graphical_culture = earthgenasi
				add_trait = creature_genasi
			}
			if = {
				limit = {
					trait = rd_fire_genasi
				}
				set_graphical_culture = firegenasi
				add_trait = creature_genasi
			}
			if = {
				limit = {
					trait = rd_water_genasi
				}
				set_graphical_culture = watergenasi
				add_trait = creature_genasi
			}
			if = {
				limit = {
					trait = rd_half_feyri
				}
				set_graphical_culture = feyri
				add_trait = creature_half_elf
			}
			if = {
				limit = {
					trait = rd_half_giant
				}
				add_trait = creature_half_giant
			}
		}
		if = { # Cannot be ELSE_IF because of half-fiends/dragons and spirit folk
			limit = {
				NOR = {
					trait = rd_half_moon_elf
					trait = rd_half_sun_elf
					trait = rd_half_green_elf
					trait = rd_half_wood_elf
					trait = rd_half_drow
					trait = rd_half_orc
					trait = rd_tanarukk
					#trait = rd_half_fiend
					#trait = rd_half_dragon
					trait = rd_half_ogre
					trait = rd_hagspawn
					trait = rd_ogrillon
					#trait = rd_spirit_folk
					trait = rd_malison
					trait = rd_abomination
					trait = rd_tiefling
					trait = rd_aasimar
					trait = rd_air_genasi
					trait = rd_fire_genasi
					trait = rd_water_genasi
					trait = rd_earth_genasi
					trait = rd_half_feyri
					trait = rd_half_giant
				}
			}
			trigger_switch = {
				on_trigger = graphical_culture
				westerngfx 		= { 
					add_trait = creature_human 
					#break = yes
				}
				easterngfx 		= { 
					add_trait = creature_human 
					#break = yes					
				} 
				muslimgfx 		= { 
					add_trait = creature_human 
					#break = yes					
				} 
				frankishgfx		= {
					if = {
						limit = {
							culture = cormyrian
						}
						random_list = {
							85 = {
								add_trait = creature_human
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = moon_elf
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								set_graphical_culture = moon_elf
								culture = moon_elf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = elven_pantheon
									}
									1 = {
										
									}
								}
							}
						}
					}
					else_if = {
						limit = {
							culture = sembite
						}
						random_list = {
							96 = {
								add_trait = creature_human
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
						}
					}
					else_if = {
						limit = {
							culture = highcoaster
						}
						random_list = {
							65 = {
								add_trait = creature_human
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = shield_dwarf
								culture = shield_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
									
									}
								}
							}
							6 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								random_list = {
									5 = {
										set_graphical_culture = wood_elf
										culture = wood_elf
									}
									3 = {
										set_graphical_culture = moon_elf
										culture = moon_elf
									}
									1 = {
										set_graphical_culture = sun_elf
										culture = sun_elf
									}
								}
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = elven_pantheon
									}
									1 = {
									
									}
								}
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_gnome
								set_graphical_culture = gnome
								culture = gnome
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = gnome_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								random_list = {
									5 = {
										set_graphical_culture = wood_elf
									}
									3 = {
										set_graphical_culture = moon_elf
									}
									1 = {
										set_graphical_culture = sun_elf
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_aasimar
								set_graphical_culture = aasimar
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									25 = { set_graphical_culture = firegenasi }
									25 = { set_graphical_culture = earthgenasi }
									25 = { set_graphical_culture = airgenasi }
									25 = { set_graphical_culture = watergenasi }
								}
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes
				} 
				englishgfx 		= {
					if = {
						limit = {
							culture = dalesman
						}
						random_list = {
							86 = {
								add_trait = creature_human
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								random_list = {
									10 = {
										set_graphical_culture = sun_elf
									}
									10 = {
										set_graphical_culture = moon_elf
									}
									10 = {
										set_graphical_culture = wood_elf
									}
									10 = {
										set_graphical_culture = green_elf
									}
									1 = {
										set_graphical_culture = crinti
									}
								}
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								random_list = {
									1 = {
										set_graphical_culture = wood_elf
										culture = wood_elf
										random_list = {
											10 = {
												trigger = {
													is_ruler = no
													holy_order = no
												}
												religion = elven_pantheon
											}
											1 = {
											
											}
										}
									}
									1 = {
										set_graphical_culture = moon_elf
										culture = moon_elf
										random_list = {
											10 = {
												trigger = {
													is_ruler = no
													holy_order = no
												}
												religion = elven_pantheon
											}
											1 = {
											
											}
										}
									}
									1 = {
										set_graphical_culture = sun_elf
										culture = sun_elf
										random_list = {
											10 = {
												trigger = {
													is_ruler = no
													holy_order = no
												}
												religion = elven_pantheon
											}
											1 = {
											
											}
										}
									}
									1 = {
										set_graphical_culture = green_elf
										culture = green_elf
										random_list = {
											10 = {
												trigger = {
													is_ruler = no
													holy_order = no
												}
												religion = elven_pantheon
											}
											1 = {
											
											}
										}
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_gnome
								set_graphical_culture = gnome
								culture = gnome
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = gnome_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = shield_dwarf
								culture = shield_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
									
									}
								}
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes				
				} 
				germangfx 		= {
					if = {
						limit = {
							culture = impilturan
						}
						random_list = {
							90 = {
								add_trait = creature_human
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = shield_dwarf
								culture = shield_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
									
									}
								}
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
						}
					}
					else_if = {
						limit = {
							culture = draeven
						}
						random_list = {
							78 = {
								add_trait = creature_human
							}
							7 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								random_list = {
									2 = {
										set_graphical_culture = wood_elf
										culture = wood_elf
										random_list = {
											10 = {
												trigger = {
													is_ruler = no
													holy_order = no
												}
												religion = elven_pantheon
											}
											1 = {
											
											}
										}
									}
									1 = {
										set_graphical_culture = moon_elf
										culture = moon_elf
										random_list = {
											10 = {
												trigger = {
													is_ruler = no
													holy_order = no
												}
												religion = elven_pantheon
											}
											1 = {
											
											}
										}
									}
								}
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								random_list = {
									2 = {
										set_graphical_culture = wood_elf
									}
									1 = {
										set_graphical_culture = moon_elf
									}
								}
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							3 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_gnome
								set_graphical_culture = gnome
								culture = gnome
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = gnome_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = shield_dwarf
								culture = shield_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
								
									}
								}
							}
						}
					}
					else_if = {
						limit = {
							culture = reacher
						}
						random_list = {
							96 = {
								add_trait = creature_human
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									15 = { set_graphical_culture = firegenasi }
									15 = { set_graphical_culture = earthgenasi }
									15 = { set_graphical_culture = airgenasi }
									55 = { set_graphical_culture = watergenasi }
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes
				} 
				occitangfx 		= { 
					add_trait = creature_human 
					#break = yes
				} 
				southerngfx		= {
					if = {
						limit = {
							culture = lantanna
						}
						random_list = {
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_gnome
								set_graphical_culture = gnome
							}
							1 = {
								add_trait = creature_human
							}
						}
					}
					else = {
						add_trait = creature_human
					} 
					#break = yes
				}
				celticgfx 		= {
					if = {
						limit = {
							culture = ffolk
						}
						random_list = {
							89 = {
								add_trait = creature_human
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							3 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								set_graphical_culture = sun_elf
								culture = sun_elf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = elven_pantheon
									}
									1 = {
								
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = shield_dwarf
								culture = shield_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
								
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = sun_elf
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes
				} 
				saxongfx 		= { 
					add_trait = creature_human 
					#break = yes
				}
				shadovargfx		=  {
					add_trait = creature_human
				}
				norsegfx 		= {
					if = {
						limit = {
							culture = illuskan
						}
						random_list = {
							91 = {
								add_trait = creature_human
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								random_list = {
									1 = {
										set_graphical_culture = sun_elf
									}
									1 = {
										set_graphical_culture = moon_elf
									}
									1 = {
										set_graphical_culture = wood_elf
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								modifier = {
									factor = 15
									OR = {
										has_landed_title = c_hartsvale
										location = {
											title = c_hartsvale
										}
									}
								}
								add_trait = creature_half_giant
							}
						}
					}
					else_if = {
						limit = {
							culture = uthgardt
							any_liege = {
								has_landed_title = d_tree_ghost
							}
						}
						random_list = {
							92 = {
								add_trait = creature_human
							}
							8 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = wood_elf
							}
						}
					}
					else_if = {
						limit = {
							culture = uthgardt
							any_liege = {
								has_landed_title = d_blue_bear
								religion = abyssal_cult
							}
						}
						random_list = {
							92 = {
								add_trait = creature_human
							}
							8 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								random_list = {
									10 = {
										set_graphical_culture = tiefling
									}
									15 = {
										set_graphical_culture = cambion
									}
								}
							}
						}
					}
					else_if = {
						limit = { culture = northlander }
						random_list = {
							100 = {
								add_trait = creature_human
							}
							3 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_ogre
								set_graphical_culture = ogre
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										OR = {
										ai = no
										is_patrician = yes
									}
										is_patrician = yes
									}
								}
								add_trait = creature_tengu
								culture = kenku
								set_graphical_culture = kenku
							}
						}
					}
					else = {
						add_trait = creature_human
					}
					#break = yes					
				} 
				sudenburgergfx	= { 
					add_trait = creature_wemic 
					#break = yes					
				}
				easternslavicgfx = { 
					add_trait = creature_centaur 
					#break = yes					
				} 
				indiangfx 		= {
					if = {
						limit = {
							culture = durpari
						}
						random_list = {
							70 = {
								add_trait = creature_human
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = gold_dwarf
								culture = gold_dwarf
								random_list = {
									2 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
								
									}
								}
							}
							8 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								set_graphical_culture = sun_elf
								random_list = {
									2 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = elven_pantheon
									}
									1 = {
								
									}
								}
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = sun_elf
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = gray_orc
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_aasimar
								set_graphical_culture = aasimar
							}
						}
					}
					else_if = {
						limit = {
							OR = {
								culture = calishite
								culture = shoon
							}
						}
						random_list = {
							94 = {
								add_trait = creature_human
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = sun_elf
							}
							3 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									40 = { set_graphical_culture = firegenasi }
									10 = { set_graphical_culture = earthgenasi }
									40 = { set_graphical_culture = airgenasi }
									10 = { set_graphical_culture = watergenasi }
								}
							}
						}
					}
					else = {
						add_trait = creature_human
					}
					#break = yes
				}
				southindiangfx	= { 
					add_trait = creature_human 
					#break = yes					
				}
				westernslavicgfx = { 
					if = {
						limit = {
							OR = {
								dynasty = 8011 # Silver of Aglarond
								religion = yuir
								religion = yuir_reformed
							}
						}
						add_trait = creature_half_elf
					}
					else_if = {
						limit = {
							culture = aglarondan
						}
						random_list = {
							78 = {
								add_trait = creature_human
							}
							60 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								set_graphical_culture = green_elf
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								set_graphical_culture = green_elf
								culture = green_elf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = elven_pantheon
									}
									1 = {
								
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
						}
					}
					else = {
						add_trait = creature_human
					}
					#break = yes
				} 
				byzantinegfx 	= {
					if = {
						limit = {
							culture = chondathan
						}
						random_list = {
							96 = {
								add_trait = creature_human
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								culture = green_elf
								set_graphical_culture = green_elf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = elven_pantheon
									}
									1 = {
								
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								culture = shield_dwarf
								set_graphical_culture = shield_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
								
									}
								}
							}
						}
					}
					else if = {
						limit = {
							culture = airspur
						}
						random_list = {
							42 = {
								add_trait = creature_human
							}
              30 = {
                modifier = {
                  factor = 0
                  OR = {
                    ai = no
                    is_patrician = yes
                  }
                }
                add_trait = creature_half_orc
                set_graphical_culture = orc
              }
              20 = {
                modifier = {
                  factor = 0
                  OR = {
                    ai = no
                    is_patrician = yes
                  }
                }
                add_trait = creature_orc
                set_graphical_culture = orc
              }
              6 = {
                modifier = {
                  factor = 0
                  OR = {
                    ai = no
                    is_patrician = yes
                  }
                }
                add_trait = creature_halfling
                set_graphical_culture = lightfoot
                culture = lightfoot
                random_list = {
                  10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
                    religion = halfling_pantheon
                  }
                  1 = {

                  }
                }
              }
              1 = {
                modifier = {
                  factor = 0
                  OR = {
                    ai = no
                    is_patrician = yes
                  }
                }
                add_trait = creature_tiefling
                set_graphical_culture = tiefling
              }
              1 = {
                modifier = {
                  factor = 0
                  OR = {
                    ai = no
                    is_patrician = yes
                  }
                }
                add_trait = creature_genasi
                random_list = {
                  15 = { set_graphical_culture = firegenasi }
                  15 = { set_graphical_culture = earthgenasi }
                  15 = { set_graphical_culture = airgenasi }
                  55 = { set_graphical_culture = watergenasi }
                }
              }
            }
					}
					else_if = {
						limit = {
							culture = chessentan
						}
						random_list = {
							82 = {
								add_trait = creature_human
							}
							6 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									15 = { set_graphical_culture = firegenasi }
									15 = { set_graphical_culture = earthgenasi }
									15 = { set_graphical_culture = airgenasi }
									55 = { set_graphical_culture = watergenasi }
								}
							}
						}
					}
					else = {
						add_trait = creature_human
					}
					#break = yes
				} 
				ugricgfx 		= {
					if = {
						limit = {
							culture = damaran
						}
						random_list = {
							87 = {
								add_trait = creature_human
							}
							6 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = shield_dwarf
								culture = shield_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
								
									}
								}
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
						}
					}
					else_if = {
						limit = {
							culture = vaasan
						}
						random_list = {
							60 = {
								add_trait = creature_human
							}
							30 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = shield_dwarf
								culture = shield_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
								
									}
								}
							}
							9 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
						}
					}
					else_if = {
						limit = {
							culture = nar
						}
						random_list = {
							96 = {
								add_trait = creature_human
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
						}
					}
					else_if = {
						limit = {
							culture = arkaiun
						}
						random_list = {
							96 = {
								add_trait = creature_human
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = crinti
							}
						}
					}
					else_if = {
						limit = {
							culture = rashemi
						}
						random_list = {
							99 = {
								add_trait = creature_human
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_hagspawn
								set_graphical_culture = hag
							}
						}
					}
					else_if = {
						limit = {
							culture = raumviran
						}
						random_list = {
							98 = {
								add_trait = creature_human
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
						}
					}
					else = {
						add_trait = creature_human
					}
					#break = yes
				} 
				arabicgfx 		= {
					if = {
						limit = {
							OR = {
								culture = hadhar
								culture = qarsan
							}
						}
						random_list = {
							80 = {
								add_trait = creature_human
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								random_list ={
									1 = {
										set_graphical_culture = shield_dwarf
									}
									1 = {
										set_graphical_culture = gold_dwarf
									}
								}
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								set_graphical_culture = sun_elf
							}
							8 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_orc
								set_graphical_culture = orc
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = sun_elf
							}
							3 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_ogre
								set_graphical_culture = ogre
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_giant
								random_list = {
									5 = {
										set_graphical_culture = hill_giant
										add_trait = lifespan_giant_hill
									}
									5 = {
										set_graphical_culture = fire_giant
										add_trait = lifespan_giant_fire
									}
									1 = {
										set_graphical_culture = storm_giant
										add_trait = lifespan_giant_storm
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genie
								set_graphical_culture = jann
								culture = jann
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_goblin
								set_graphical_culture = goblin
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_hobgoblin
								set_graphical_culture = hobgoblin
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes					
				}
				dtariggfx		= {
					add_trait = creature_half_dwarf
					#break = yes
				}
				turkishgfx 		= {
					if = {
						limit = {
							culture = murghomi
						}
						random_list = {
							98 = {
								add_trait = creature_human
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_aasimar
								set_graphical_culture = aasimar
							}
						}
					}
					else = { add_trait = creature_human } 
					#break = yes
				}
				mongolgfx 		= {
					if = {
						limit = {
							culture = gugari
						}
						add_trait = creature_human
						add_trait = spirit_folk
					}
					else = { add_trait = creature_human }
					#break = yes
				} 
				africangfx 		= {
					if = {
						limit = { culture = turmic }
						random_list = {
							93 = {
								add_trait = creature_human
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = shield_dwarf
								culture = shield_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
								
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_gnome
								set_graphical_culture = gnome
								culture = gnome
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = gnome_pantheon
									}
									1 = {
										
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = wood_elf
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								set_graphical_culture = wood_elf
								culture = wood_elf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = elven_pantheon
									}
									1 = {
								
									}
								}
							}
							
						}
					}
					else = { add_trait = creature_human }
					#break = yes					
				} 
				westafricangfx	= {
					if = {
						limit = {
							culture = chultan
						}
						random_list = {
							90 = {
								add_trait = creature_human
							}
							5 = {
								add_trait = creature_pureblood
								random_list = {
									2 = {
									}
									3 = {
										religion = abyssal_cult
									}
								}
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = wild_dwarf
								random_list = {
									1 = {
									}
									2 = {
										culture = wild_dwarf
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_lizardfolk
								set_graphical_culture = lizardfolk
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_pterafolk
								set_graphical_culture = pterafolk
							}							
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									15 = { set_graphical_culture = firegenasi }
									15 = { set_graphical_culture = earthgenasi }
									15 = { set_graphical_culture = airgenasi }
									55 = { set_graphical_culture = watergenasi }
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tengu
								culture = kenku
								set_graphical_culture = kenku
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes					
				}
				mesoamericangfx	= { 
					add_trait = creature_human 
					#break = yes					
				}
				andalusiangfx	= {
					if = {
						limit = {
							culture = halruaan
						}
						random_list = {
							90 = {
								modifier = {
									factor = 0
									location = {
										de_jure_liege_or_above = k_nimbral
									}
								}
								add_trait = creature_human
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								modifier = {
									factor = 0
									location = {
										de_jure_liege_or_above = k_nimbral
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = gold_dwarf
								culture = gold_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
										
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								modifier = {
									factor = 0
									location = {
										de_jure_liege_or_above = k_nimbral
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								modifier = {
									factor = 0
									location = {
										de_jure_liege_or_above = k_nimbral
									}
								}
								add_trait = creature_elf
								set_graphical_culture = moon_elf
								culture = moon_elf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								modifier = {
									factor = 10
									location = {
										de_jure_liege_or_above = k_nimbral
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = moon_elf
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes
				} 
				persiangfx 		= {
					if = {
						limit = {
							culture = thayan
						}
						random_list = {
							62 = {
								add_trait = creature_human
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_gnoll
								set_graphical_culture = gnoll
								culture = gnoll
								random_list = {
									3 = {
										
									}
									1 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = abyssal_cult
									}
								}
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_orc
								set_graphical_culture = orc
								culture = orc
								random_list = {
									3 = {
										
									}
									1 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = orc_pantheon
									}
								}
							}
							8 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = gold_dwarf
								culture = gold_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
								
									}
								}
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_goblin
								set_graphical_culture = goblin
								culture = goblin
								random_list = {
									3 = {
										
									}
									1 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = goblin_pantheon
									}
								}
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							3 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									25 = { set_graphical_culture = firegenasi }
									25 = { set_graphical_culture = earthgenasi }
									25 = { set_graphical_culture = airgenasi }
									25 = { set_graphical_culture = watergenasi }
								}
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes
				}
				kurgangfx 		= { 
					add_trait = creature_gith 
					#break = yes					
				} 
				nehekkagfx 		= { 
					add_trait = creature_human  # fixme
					#break = yes					
				} 
				cumangfx 		= { 
					add_trait = creature_human 
					#break = yes
				} 
				italiangfx 		= {
					if = {
						limit = {
							culture = amnian
						}
						random_list = {
							83 = {
								add_trait = creature_human
							}
							15 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
						}
					}
					else_if = {
						limit = {
							culture = tethyrian
						}
						random_list = {
							76 = {
								add_trait = creature_human
							}
							20 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							3 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_elf
								random_list = {
									4 = {
										set_graphical_culture = wood_elf
										culture = wood_elf
									}
									1 = {
										set_graphical_culture = green_elf
										culture = green_elf
									}
								}
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = elven_pantheon
									}
									1 = {
								
									}
								}
							}
						}
					}
					else_if = {
						limit = {
							culture = nelanthern
						}
						random_list = {
							30 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_orc
								set_graphical_culture = orc
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = orc_pantheon
									}
									1 = {
								
									}
								}
							}
							20 = {
								add_trait = creature_human
							}
							15 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
								random_list = {
									1 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = orc_pantheon
									}
									1 = {
								
									}
								}
							}
							15 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_lizardfolk
								set_graphical_culture = lizardfolk
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_ogre
								set_graphical_culture = ogre
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = abyssal_cult
									}
									1 = {
								
									}
								}
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_minotaur
								set_graphical_culture = minotaur
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = abyssal_cult
									}
									1 = {
								
									}
								}
							}
							4 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									15 = { set_graphical_culture = firegenasi }
									15 = { set_graphical_culture = earthgenasi }
									15 = { set_graphical_culture = airgenasi }
									55 = { set_graphical_culture = watergenasi }
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tengu
								culture = kenku
								set_graphical_culture = kenku
							}
						}
					}
					else_if = {
						limit = {
							culture = borderer
						}
						random_list = {
							75 = {
								add_trait = creature_human
							}
							75 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_human
								set_graphical_culture = calishite
							}
							75 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_human
								set_graphical_culture = arnadar
							}
							75 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_human
								set_graphical_culture = tashalan
							}
							75 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_human
								set_graphical_culture = chondathan
							}
							50 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_human
								set_graphical_culture = shaaran
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_elf
								set_graphical_culture = sun_elf
							}
							3 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									40 = { set_graphical_culture = firegenasi }
									10 = { set_graphical_culture = earthgenasi }
									40 = { set_graphical_culture = airgenasi }
									10 = { set_graphical_culture = watergenasi }
								}
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes
				} 
				chinesegfx = {
					random_list = {
						100 = {
							add_trait = creature_human
							random_list = {
								5 = {
									modifier = {
										factor = 0
										OR = {
										ai = no
										is_patrician = yes
									}
									}
									add_trait = spirit_folk
								}
								95 = {
								}
							}
						}
						5 = {
							modifier = {
								factor = 0
								OR = {
										ai = no
										is_patrician = yes
									}
							}
							add_trait = creature_half_elf
							set_graphical_culture = moon_elf
						}
						1 = {
							modifier = {
								factor = 0
								OR = {
										ai = no
										is_patrician = yes
									}
							}
							add_trait = creature_tengu
							set_graphical_culture = tengu
							culture = tengu
						}
					}
					#break = yes
				}
				bodpagfx = {
					random_list = {
						100 = {
							add_trait = creature_human
							random_list = {
								5 = {
									modifier = {
										factor = 0
										OR = {
										ai = no
										is_patrician = yes
									}
									}
									add_trait = spirit_folk
								}
								95 = {
								}
							}
						}
						2 = {
							modifier = {
								factor = 0
								OR = {
										ai = no
										is_patrician = yes
									}
							}
							add_trait = creature_aasimar
							set_graphical_culture = aasimar
						}
						1 = {
							modifier = {
								factor = 0
								OR = {
										ai = no
										is_patrician = yes
									}
							}
							add_trait = creature_tengu
							set_graphical_culture = tengu
							culture = tengu
						}
					}
					#break = yes
				}
				blooddragonsgfx = { 
					add_trait = creature_human # fixme
					#break = yes					
				} 
				livingjadegfx 	= { 
					add_trait = creature_human # fixme
					#break = yes
				} 
				normangfx		= {
					if = {
						limit = {
							culture = tharian
						}
						random_list = {
							69 = {
								add_trait = creature_human
							}
							10 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								modifier = {
									NOT = {
										any_liege = {
											has_landed_title = k_zhentarim
										}
									}
									factor = 0
								}
								add_trait = creature_orc
								culture = orc
								set_graphical_culture = orc
								random_list = {
									3 = {
										
									}
									1 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = orc_pantheon
									}
								}
							}
							6 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								modifier = {
									NOT = {
										any_liege = {
											has_landed_title = k_zhentarim
										}
									}
									factor = 1.6
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							5 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = shield_dwarf
								culture = shield_dwarf
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								modifier = {
									NOT = {
										any_liege = {
											has_landed_title = k_zhentarim
										}
									}
									factor = 0
								}
								add_trait = creature_ogre
								set_graphical_culture = ogre
								culture = ogre
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_gnome
								set_graphical_culture = gnome
								culture = gnome
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = gnome_pantheon
									}
									1 = {
										
									}
								}
							}
						}
					}
					else = {
						add_trait = creature_human
					}
					#break = yes
				}
				outremergfx     = {
					if = {
						limit = {
							culture = reacher
						}
						random_list = {
							96 = {
								add_trait = creature_human
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									15 = { set_graphical_culture = firegenasi }
									15 = { set_graphical_culture = earthgenasi }
									15 = { set_graphical_culture = airgenasi }
									55 = { set_graphical_culture = watergenasi }
								}
							}
							2 = {
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes
				}
				egyptiangfx     = {
					if = {
						limit = {
							culture = mulhorandi
						}
						random_list = {
							96 = {
								add_trait = creature_human
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_half_orc
								set_graphical_culture = orc
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_aasimar
								set_graphical_culture = aasimar
							}
							1 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									15 = { set_graphical_culture = firegenasi }
									55 = { set_graphical_culture = earthgenasi }
									15 = { set_graphical_culture = airgenasi }
									15 = { set_graphical_culture = watergenasi }
								}
							}
						}
					}
					else_if = {
						limit = {
							culture = untheric
						}
						random_list = {
							94 = {
								add_trait = creature_human
							}
							3 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_dwarf
								set_graphical_culture = gold_dwarf
								culture = gold_dwarf
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = dwarven_pantheon
									}
									1 = {
								
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_halfling
								set_graphical_culture = lightfoot
								culture = lightfoot
								random_list = {
									10 = {
										trigger = {
											is_ruler = no
											holy_order = no
										}
										religion = halfling_pantheon
									}
									1 = {
										
									}
								}
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_aasimar
								set_graphical_culture = aasimar
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_tiefling
								set_graphical_culture = tiefling
							}
							2 = {
								modifier = {
									factor = 0
									OR = {
										ai = no
										is_patrician = yes
									}
								}
								add_trait = creature_genasi
								random_list = {
									55 = { set_graphical_culture = firegenasi }
									15 = { set_graphical_culture = earthgenasi }
									15 = { set_graphical_culture = airgenasi }
									15 = { set_graphical_culture = watergenasi }
								}
							}
						}
					}
					else = { add_trait = creature_human }
					#break = yes
				}
				asurgfx 		= {
					add_trait = creature_elf 
					#break = yes
				}
				feyrigfx	    = {
					add_trait = creature_feyri 
					#break = yes
				}
				nagarythiangfx 	= { 
					add_trait = creature_elf 
					#break = yes
				} 
				caledoriangfx 	= { 
					if = {
						limit = {
							culture = djinn
						}
						add_trait = creature_genie
					}
					else = { add_trait = creature_genasi }
				} 
				asraigfx 		= { 
					add_trait = creature_elf 
					#break = yes
				}
				greenelfgfx		= {
					add_trait = creature_elf
					#break = yes
				}
				drowgfx 		= { 
					add_trait = creature_drow 
					#break = yes				
				} 
				moonelfgfx 		= { 
					add_trait = creature_elf 
					#break = yes					
				}
				seaelfgfx		= {
					add_trait = creature_sea_elf
					#break = yes
				}
				snowelfgfx		= {
					add_trait = creature_elf
				}
				dwarfgfx 		= { 
					add_trait = creature_dwarf 
					#break = yes				
				}
				duergargfx		= { 
					add_trait = creature_dwarf 
					#break = yes
				}
				norsedwarfgfx  = { 
					add_trait = creature_dwarf 
					#break = yes					
				}
				golddwarfgfx	= { 
					add_trait = creature_dwarf 
					#break = yes
				}
				wilddwarfgfx	= { 
					add_trait = creature_dwarf 
					#break = yes
				}			
				goblingfx 		= {
					add_trait = creature_goblin 
					#break = yes
				}
				forestgoblingfx 		= {
					add_trait = creature_goblin 
					#break = yes
				}
				gnollgfx 		= {
					if = {
						limit = {
							culture = gnoll
							OR = {
								AND = {
									true_father_even_if_dead = { trait = creature_gnoll }
									mother_even_if_dead = { NOT = { trait = creature_gnoll } }
								}
								AND = {
									true_father_even_if_dead = { NOT = { trait = creature_gnoll } }
									mother_even_if_dead = { trait = creature_gnoll }
								}
							}
						}
						add_trait = creature_half_gnoll
					}
					else_if = {
						limit = {
							culture = gnoll
						}
						add_trait = creature_gnoll
					}			
				}
				humanoidgfx 	= {
					if = {
						limit = {
							OR = {
								culture = goblin
								culture = hobgoblin
							}
						}
						add_trait = creature_hobgoblin
					}

					else_if = {
						limit = {
							culture = bugbear
						}
						add_trait = creature_bugbear
					}
					#break = yes
				}
				highorcgfx 		= { 
					add_trait = creature_orc 
					#break = yes
				} 
				grayorcgfx 		= { 
					add_trait = creature_orc 
					#break = yes
				} 
				ondontigfx 		= { 
					add_trait = creature_orc 
					#break = yes
				} 
				hobbitsgfx 		= { 
					add_trait = creature_halfling 
					#break = yes
				} 
				trollgfx 		= { 
					add_trait = creature_giant
					#break = yes
				} 
				firegiantgfx	= { 
					add_trait = creature_giant
					#break = yes
				}
				frostgiantgfx	= { 
					add_trait = creature_giant
					#break = yes
				}
				stonegiantgfx	= { 
					add_trait = creature_giant
					#break = yes
				}
				stormgiantgfx	= { 
					add_trait = creature_giant
					#break = yes
				}
				cloudgiantgfx	= { 
					add_trait = creature_giant
					#break = yes
				}
				fomoriangfx		= {
					add_trait = creature_giant
					#break = yes
				}
				goliathgfx		= {
					add_trait = creature_goliath
					#break = yes
				}
				treemangfx 		= { 
					add_trait = creature_treant 
					#break = yes					
				} 
				ogresgfx 		= {
					add_trait = creature_ogre
					random = {
						chance = 2
						set_graphical_culture = ogre_magi
					}
					#break = yes
				}
				onigfx			= {
					add_trait = creature_ogre
					if = {
						limit = {
							ai = no
						}
						culture = ogre
					}
					if = {
						limit = {
							is_ruler = yes
						}
						if = {
							limit = {
								is_landed = yes
							}
							location = {
								ROOT = {
									culture = PREV
								}
							}
						}
						if = {
							limit = {
								is_landed = no
							}
							culture = ogre
						}
					}
					if = {
						limit = {
							is_ruler = no
						}
						culture = ogre
					}
					#break = yes
				}
				yikariangfx		= { 
					add_trait = creature_yikarian 
					#break = yes					
				}
				beastmangfx 	= {	
					add_trait = creature_minotaur 
					#break = yes
				}
				lahmiangfx		= {
					if = {
						limit = { is_female = yes }
						add_trait = creature_hag
					}
					else = {
						add_trait = creature_hagspawn
					}
				}
				slaaneshprincegfx		= {
					add_trait = creature_tiefling
				}
				yuantigfx = { 
					random_list = {
						75 = {
							add_trait = creature_pureblood
						}
						20 = {
							modifier = {
								factor = 0
								OR = {
										ai = no
										is_patrician = yes
									}
							}
							add_trait = creature_malison
							set_graphical_culture = malison
						}
						5 = {
							modifier = {
								factor = 0
								OR = {
										ai = no
										is_patrician = yes
									}
							}
							add_trait = creature_abomination
							set_graphical_culture = abomination
						}
					}
					#break = yes
				}
				malisongfx		= { 
					add_trait = creature_malison # fixme
					#break = yes					
				}
				hybridgfx 		= { 
					#if = {
					#	limit = {
					#		culture = lamia
					#	}
					#	add_trait = creature_naga
					#}
					#else = {
						add_trait = creature_malison 
					#}
					#break = yes					
				}
				lamiagfx = {
					add_trait = creature_lamia
				}
				abominationgfx	= { 
					add_trait = creature_abomination 
					#break = yes					
				}
				lizardfolkgfx 	= {	
					add_trait = creature_lizardfolk 
					#break = yes
				}
				lizardmangfx	= {
					add_trait = creature_lizardfolk
					#break = yes
				}
				pterafolkgfx 	= { 
					add_trait = creature_pterafolk 
					#break = yes					
				}
				saurialgfx		= {
					add_trait = creature_saurial 
					#break = yes
				}
				druchiigfx		= { 
					add_trait = creature_half_elf
					#break = yes
				}
				maviddigfx		= { 
					add_trait = creature_half_elf
					#break = yes
				}
				slanngfx = {
					add_trait = creature_kuotoa
				}
				nagagfx 		= {
					if = {
						limit = {
							NOT = { culture = sarrukh }
						}
						add_trait = creature_naga
					}
					if = {
						limit = {
							culture = sarrukh
						}
						add_trait = creature_sarrukh
					}
					#break = yes
				}
				githyankigfx	= { 
					add_trait = creature_gith 
					#break = yes
				}
				tengugfx		= { 
					add_trait = creature_tengu 
					#break = yes
				}
				kenkugfx		= { 
					if = {
						limit = {
							NOT = { culture = aarakocra }
						}
						add_trait = creature_tengu
					}
					else_if = {
						limit = {
							culture = aarakocra
						}
						add_trait = creature_aarakocra
					}
					#break = yes
				}
				sahuagingfx		= {
					add_trait = creature_sahuagin
				}
				aasimargfx = {
					add_trait = creature_aasimar
					#break = yes
				}
				angelgfx = {
					add_trait = creature_angel
					#break = yes
				}
				demongfx		= { 
					add_trait = creature_tiefling 
					#break = yes					
				}
				tieflinggfx		= { 
					add_trait = creature_tiefling 
					#break = yes					
				}
				bloodlettergfx ={
					add_trait = creature_devil
					#break = yes
				}
				gelugongfx = {
					add_trait = creature_devil
					add_trait = greater_fiend
				}
				khorneprincegfx = {
					add_trait = creature_devil
					random_list = {
						65 = {
							set_graphical_culture = cornugon
						}
						20 = {
							add_trait = greater_fiend
						}
						10 = {
							set_graphical_culture = gelugon
							add_trait = greater_fiend
						}
						5 = {
							set_graphical_culture = tiefling # a few look like humans # Changed it to avoid confusion amongst users -T
						}
					}
					#break = yes					
				}
				firegenasigfx 	= {
					if = {
						limit = {
							culture = efreet
						}
						add_trait = creature_genie
					}
					else = { add_trait = creature_genasi }
				}
				watergenasigfx 	= { 
					if = {
						limit = {
							culture = marid
						}
						add_trait = creature_genie
					}
					else = { add_trait = creature_genasi }
				}
				earthgenasigfx 	= { 
					if = {
						limit = {
							culture = dao
						}
						add_trait = creature_genie
					}
					else = { add_trait = creature_genasi }
				}
				nomadgfx 		= {
					add_trait = creature_genie 
					#break = yes
				}
				dragonborngfx 	= { 
					add_trait = creature_dragonborn 
					#break = yes
				}
				gnomesgfx 		= { 
					add_trait = creature_gnome 
					#break = yes
				}
				nycalothgfx		= { 
					add_trait = creature_daemon 
					#break = yes					
				}
				daemonettegfx = {
					add_trait = creature_demon
					#break = yes 
				}
				nurgleprincegfx = {
					add_trait = creature_demon
				}
				tzeentchprincegfx = {
					add_trait = creature_demon
					random_list = {
						65 = {
							# do nothing - vrock gfx is correct
						}
						20 = {
							set_graphical_culture = succubus
						}
						10 = {
							set_graphical_culture = nalfeshnee
							add_trait = greater_fiend
						}
						10 = {
							set_graphical_culture = succubus
							add_trait = greater_fiend # marilith
						}						
						2 = {
							set_graphical_culture = baatezu # balors look a lot like pit fiends
							add_trait = greater_fiend
						}
						2 = {
							set_graphical_culture = yugoloth # or nycaloths
							add_trait = greater_fiend
						}
						2 = {
							set_graphical_culture = cambion
						}
						#1 = { # People have already got confused about cases like this, unfortunately -T
						#	set_graphical_culture = nar # a few look like humans
						#}
					}
					#break = yes
				}
				tanarukkgfx 	= { 
					add_trait = creature_tanarukk 
					#break = yes					
				}
				beholdergfx 	= { 
					add_trait = creature_beholder 
					#break = yes					
				}
				koboldgfx		= { #
					add_trait = creature_kobold 
					#break = yes					
				}
				orcgfx			= { #
					add_trait = creature_troll 
					#break = yes					
				}
				dracolichgfx		= {
					add_trait = creature_dragon
					add_trait = lich
					add_artifact = lich_phylactery_artf
					#break = yes
				}
				dragongfx		= {
					add_trait = creature_dragon
					random_list = {
						1 = {
							add_trait = creature_red_dragon
						}
						1 = {
							add_trait = creature_black_dragon
						}
						1 = {
							add_trait = creature_blue_dragon
						}
						1 = {
							add_trait = creature_green_dragon
						}
						1 = {
							add_trait = creature_white_dragon
						}
						1 = {
							add_trait = creature_amethyst_dragon
						}
						1 = {
							add_trait = creature_crystal_dragon
						}
						1 = {
							add_trait = creature_emerald_dragon
						}
						1 = {
							add_trait = creature_sapphire_dragon
						}
						1 = {
							add_trait = creature_topaz_dragon
						}
						1 = {
							add_trait = creature_brass_dragon
						}
						1 = {
							add_trait = creature_bronze_dragon
						}
						1 = {
							add_trait = creature_copper_dragon
						}
						1 = {
							add_trait = creature_gold_dragon
						}
						1 = {
							add_trait = creature_silver_dragon
						}
					}
					#break = yes
				}
				eladringfx			= { #
					add_trait = creature_eladrin
					#break = yes
				}
				necrarchgfx			= { #
					add_trait = creature_human
					random_list = {
						70 = { add_trait = undead }
						30 = {
							add_trait = lich
							add_artifact = lich_phylactery_artf
						}
					}
					#break = yes
				}
				strigoigfx		= { #
					add_trait = undead
					if = {
						limit = {
							culture_group = goblinoid_group
						}
						if = {
							limit = {
								culture = hobgoblin
							}
							add_trait = creature_hobgoblin
						}
						else_if = {
							limit = {
								culture = bugbear
							}
							add_trait = creature_bugbear
						}
						else = { add_trait = creature_goblin }
					}
					else_if = {
						limit = {
							culture_group = gnoll_group
						}
						add_trait = creature_gnoll
					}
					else_if = {
						limit = {
							culture = sahuagin
						}
						add_trait = creature_sahuagin
					}
					else_if = {
						limit = {
							culture = malenti
						}
						add_trait = creature_malenti
					}
					else_if = {
						limit = {
							culture = saurial
						}
						add_trait = creature_saurial
					}
					else_if = {
						limit = {
							culture_group = scaly_group
						}
						add_trait = creature_lizardfolk
					}
					else_if = {
						limit = {
							culture = kobold
						}
						add_trait = creature_kobold
					}
					else_if = {
						limit = {
							culture_group = draconic_group
						}
						add_trait = creature_dragonborn
					}
					else = { add_trait = creature_orc }
				}
				nehekharangfx		= {
					add_trait = creature_human
					add_trait = undead
					#break = yes
				}
				dracolichgfx		= { #
					add_trait = creature_dragon
					random_list = {
						70 = { add_trait = undead }
						30 = {
							add_trait = lich
							add_artifact = lich_phylactery_artf
						}
					}
					#break = yes
				}
				jadegfx 		= {
					if = {
						limit = {
							NOT = { culture = sarrukh }
						}
						add_trait = creature_naga
					}
					if = {
						limit = {
							culture = sarrukh
						}
						add_trait = creature_sarrukh
					}
					random_list = {
						70 = { add_trait = undead }
						30 = {
							add_trait = lich
							add_artifact = lich_phylactery_artf
						}
					}
					#break = yes
				}
				carsteingfx 		= { #
					add_trait = creature_human
					random_list = {
						70 = { add_trait = vampire_spawn }
						30 = { add_trait = vampire }
					}
					#break = yes
				}
				undeadelfgfx		= {
					add_trait = creature_elf
					add_trait = undead
					#break = yes
				}
				lichelfgfx		= {
					add_trait = creature_elf
					add_trait = lich
					add_artifact = lich_phylactery_artf
					#break = yes
				}
				undeadogregfx		= {
					add_trait = creature_ogre
					add_trait = undead
					#break = yes
				}
				chaosdwarfgfx 		= { #
					add_trait = creature_dwarf
					random_list = {
						70 = { add_trait = vampire_spawn }
						30 = { add_trait = vampire }
					}
					#break = yes
				}
				wraithgfx			= { #
					add_trait = creature_human
					add_trait = undead
					#break = yes
				}
				mindflayergfx		= { #
					add_trait = creature_illithid
					#break = yes
				}
				blackorcgfx			= { #
					add_trait = creature_monster
					#break = yes
				}
				flamergfx			= { #
					add_trait = creature_monster
					#break = yes
				}
			}
			if = {
				limit = {
					liege = {
						has_character_flag = vampire_court
					}
					NOR = {
						trait = creature_hag
						trait = creature_treant
						trait = creature_devil
						trait = creature_genie
						trait = creature_daemon
						trait = creature_demon
						trait = creature_angel
					}
				}
				random_list = {
					40 = {
						if = {
							limit = {
								z_has_class = no
							}
							add_trait = vampire_spawn
						}
						turn_vampire_effect = yes
					}
					50 = {
						turn_undead_effect = yes
					}
					10 = {

					}
				}
			}
			if = {
				limit = {
					liege = {
						has_character_flag = undead_court
					}
					NOR = {
						trait = creature_hag
						trait = creature_treant
						trait = creature_devil
						trait = creature_genie
						trait = creature_daemon
						trait = creature_demon
						trait = creature_angel
					}
				}
				if = {
					limit = {
						OR = {
							trait = master_wizard
							trait = renowned_wizard
							trait = legendary_wizard
							trait = master_sorcerer
							trait = renowned_sorcerer
							trait = legendary_sorcerer
						}
					}
					turn_lich_effect = yes
				}
				else = {
					turn_undead_effect = yes
				}
			}
			if = {
				limit = {
					liege = {
						has_character_flag = lycan_court
					}
				}
				if = {
					limit = {
						liege = { trait = werewolf }
					}
					add_trait = werewolf
					add_trait = natural_lycanthrope
				}
				if = {
					limit = {
						liege = { trait = wererat }
					}
					add_trait = wererat
					add_trait = natural_lycanthrope
				}
				if = {
					limit = {
						liege = { trait = weretiger }
					}
					add_trait = weretiger
					add_trait = natural_lycanthrope
				}
			}
			if = {
				limit = {
					liege = {
						has_character_flag = yuanti_court
					}
				}
				random_list = {
					40 = {
						modifier = {
							factor = 0
							NOT = { trait = creature_human }
						}
						remove_trait = creature_human
						add_trait = creature_pureblood
						set_graphical_culture = yuanti
					}
					20 = {
						modifier = {
							factor = 0
							NOT = { trait = creature_human }
						}
						remove_trait = creature_human
						add_trait = creature_pureblood
					}
					40 = {
						# kept intentionally empty
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					trait = creature_naga
					trait = creature_abomination
					trait = creature_sarrukh
				}
				OR = {
					trait = undead
					trait = lich
					trait = vampire
					trait = vampire_spawn
				}
			}
			set_graphical_culture = bone_naga
		}
		if = {
			limit = {
				OR = {
					trait = creature_elf
					trait = creature_sea_elf
					trait = creature_eladrin
					trait = creature_drow
					trait = creature_feyri
					trait = creature_half_elf
					trait = creature_malison
					trait = creature_pureblood
				}
				OR = {
					trait = undead
					trait = vampire
					trait = vampire_spawn
				}
			}
			set_graphical_culture = undeadelf
		}
		if = {
			limit = {
				OR = {
					trait = creature_dwarf
					trait = creature_half_dwarf
				}
				OR = {
					trait = undead
					trait = lich
					trait = vampire
					trait = vampire_spawn
				}
			}
			set_graphical_culture = dwarfvampire
		}
		if = {
			limit = {
				OR = {
					trait = creature_ogre
					trait = creature_half_ogre
					trait = creature_ogrillon
				}
				OR = {
					trait = undead
					trait = lich
					trait = vampire
					trait = vampire_spawn
				}
			}
			set_graphical_culture = undeadogre
		}

		if = {
			limit = {
				OR = {
					trait = creature_human
					trait = creature_aasimar
					trait = creature_tiefling
					trait = creature_half_giant
					trait = creature_genasi
					trait = creature_gith
					trait = creature_gnome
					trait = creature_halfling
					trait = creature_centaur
					trait = creature_wemic
				}
				OR = {
					trait = vampire
					trait = vampire_spawn
				}
			}
			set_graphical_culture = vampire
		}
		if = {
			limit = {
				OR = {
					trait = creature_human
					trait = creature_aasimar
					trait = creature_tiefling
					trait = creature_half_giant
					trait = creature_genasi
					trait = creature_gith
					trait = creature_gnome
					trait = creature_halfling
					trait = creature_centaur
					trait = creature_wemic
				}
				trait = undead
			}
			set_graphical_culture = undead_human
		}
		if = {
			limit = {
				OR = {
					trait = creature_human
					trait = creature_elf
					trait = creature_sea_elf
					trait = creature_eladrin
					trait = creature_drow
					trait = creature_feyri
					trait = creature_half_elf
					trait = creature_aasimar
					trait = creature_tiefling
					trait = creature_half_giant
					trait = creature_genasi
					trait = creature_gith
					trait = creature_gnome
					trait = creature_halfling
					trait = creature_centaur
					trait = creature_wemic
				}
				trait = lich
			}
			set_graphical_culture = lich
		}
		if = {
			limit = {
				trait = creature_dragon
				OR = {
					trait = undead
					trait = lich
				}
			}
			set_graphical_culture = dracolich
		}
		if = {
			limit = {
				trait = creature_giant
			}
			if = {
				limit = {
					graphical_culture = stonegiantgfx
				}
				add_trait = lifespan_giant_stone
			}
			if = {
				limit = {
					graphical_culture = stormgiantgfx
				}
				add_trait = lifespan_giant_storm
			}
			if = {
				limit = {
					graphical_culture = cloudgiantgfx
				}
				add_trait = lifespan_giant_cloud
			}
			if = {
				limit = {
					graphical_culture = firegiantgfx
				}
				add_trait = lifespan_giant_fire
			}
			if = {
				limit = {
					graphical_culture = frostgiantgfx
				}
				add_trait = lifespan_giant_frost
			}
			if = {
				limit = {
					graphical_culture = trollgfx
					NOT = { culture = mountain_giant }
				}
				add_trait = lifespan_giant_hill
			}
			if = {
				limit = {
					graphical_culture = fomoriangfx
				}
				add_trait = lifespan_giant_hill
			}
		}
		remove_trait = rd_half_moon_elf
		remove_trait = rd_half_sun_elf
		remove_trait = rd_half_green_elf
		remove_trait = rd_half_wood_elf
		remove_trait = rd_half_drow
		remove_trait = rd_half_orc
		remove_trait = rd_tanarukk
		remove_trait = rd_half_fiend
		remove_trait = rd_half_dragon
		remove_trait = rd_half_ogre
		remove_trait = rd_hagspawn
		remove_trait = rd_ogrillon
		remove_trait = rd_spirit_folk
		remove_trait = rd_malison
		remove_trait = rd_abomination
		remove_trait = rd_tiefling
		remove_trait = rd_aasimar
		remove_trait = rd_air_genasi
		remove_trait = rd_earth_genasi
		remove_trait = rd_fire_genasi
		remove_trait = rd_water_genasi
		remove_trait = rd_half_feyri
		remove_trait = rd_half_giant
		character_event = { id = KekvitMaint.6 }
	}
}

character_event = { # Experimental species trait distribution on startup
	id = z_character_trait.2
	hide_window = yes
	is_triggered_only = yes # Only on startup, because this is so system-intensive
	#has_global_flag = creature_traits_assigned # pre-trigger
	immediate = {
		any_character = {
			limit = {
				NOR = {
					trait = creature_monster
					trait = creature_human
					trait = creature_drow
					trait = creature_elf
					trait = creature_dwarf
					trait = creature_goblin
					trait = creature_orc
					trait = creature_halfling
					trait = creature_giant
					trait = creature_treant
					trait = creature_ogre
					trait = creature_half_orc
					trait = creature_half_elf
					trait = creature_half_ogre
					trait = creature_ogrillon
					trait = creature_yikarian
					trait = creature_pureblood
					trait = creature_malison
					trait = creature_abomination
					trait = creature_centaur
					trait = creature_wemic
					trait = creature_lizardfolk
					trait = creature_naga
					trait = creature_gith
					trait = creature_hobgoblin
					trait = creature_bugbear
					trait = creature_gnoll
					trait = creature_tengu
					trait = creature_tiefling
					trait = creature_devil
					trait = creature_genasi
					trait = creature_genie
					trait = creature_dragonborn
					trait = creature_aasimar
					trait = creature_gnome
					trait = creature_daemon
					trait = creature_demon
					trait = creature_tanarukk
					trait = creature_minotaur
					trait = creature_saurial
					trait = creature_pterafolk
					trait = creature_beholder
					trait = creature_kobold
					trait = creature_half_giant
					trait = creature_eladrin
					trait = creature_sarrukh
					trait = creature_troll
					trait = creature_hag
					trait = creature_feyri
					trait = adopted
				}
			}
			character_event = { id = z_character_trait.1 }
		}
	}
	after = {
		set_global_flag = creature_traits_assigned
	}
}

character_event = {
	id = z_character_trait.3
	hide_window = yes

	is_triggered_only = yes

	trigger = {
		trait = creature_giant
		NOR = {
			trait = lifespan_giant_stone
			trait = lifespan_giant_storm
			trait = lifespan_giant_cloud
			trait = lifespan_giant_fire
			trait = lifespan_giant_frost
			trait = lifespan_giant_hill
		}
		OR = {
			graphical_culture = stonegiantgfx
			graphical_culture = stormgiantgfx
			graphical_culture = cloudgiantgfx
			graphical_culture = firegiantgfx
			graphical_culture = frostgiantgfx
			graphical_culture = trollgfx
			graphical_culture = fomoriangfx
		}
		NOT = { culture = mountain_giant }
	}

	immediate = {
		if = {
			limit = {
				age = 16
			}
			if = {
				limit = {
					graphical_culture = stonegiantgfx
				}
				add_trait = lifespan_giant_stone
			}
			if = {
				limit = {
					graphical_culture = stormgiantgfx
				}
				add_trait = lifespan_giant_storm
			}
			if = {
				limit = {
					graphical_culture = cloudgiantgfx
				}
				add_trait = lifespan_giant_cloud
			}
			if = {
				limit = {
					graphical_culture = firegiantgfx
				}
				add_trait = lifespan_giant_fire
			}
			if = {
				limit = {
					graphical_culture = frostgiantgfx
				}
				add_trait = lifespan_giant_frost
			}
			if = {
				limit = {
					graphical_culture = trollgfx
				}
				add_trait = lifespan_giant_hill
			}
			if = {
				limit = {
					graphical_culture = fomoriangfx
				}
				add_trait = lifespan_giant_hill
			}
		}
		else_if = {
			limit = {
				NOT = { age = 16 }
			}
			repeat_event = { id = z_character_trait.3 months = 120 }
		}
	}
}
