﻿historical_figure_clear_trait_effect = {

	clear_traits = yes
	force_character_skill_recalculation = yes

}


historical_figure_temporary_save_trait_effect = {

	save_scope_as = temporary_target
	random_province = {
		save_scope_as = birthplace
	}
	create_character = {
		age = adulthood_start_age
		gender = scope:temporary_target
		location = scope:birthplace
		template_character = scope:temporary_target
		save_scope_as = temporary_save
	}
	scope:temporary_save = {
		clear_traits = yes
		copy_traits = scope:temporary_target
	}

}


historical_figure_temporary_load_trait_effect = {

	copy_traits = scope:temporary_save
	force_character_skill_recalculation = yes

	scope:temporary_save = {
		death = { death_reason = death_vanished }
	}

}


historical_figure_save_education_trait_effect = {

	historical_figure_save_each_education_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = diplomacy }
	historical_figure_save_each_education_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = martial }
	historical_figure_save_each_education_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = stewardship }
	historical_figure_save_each_education_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = intrigue }
	historical_figure_save_each_education_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = learning }

	historical_figure_save_each_extra_education_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = martial_prowess }
	historical_figure_save_each_extra_education_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = republican_knowledge }

}


historical_figure_save_each_education_trait_effect = {

	historical_figure_save_each_education_trait_with_rank_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = $TYPE$ RANK = 1 }
	historical_figure_save_each_education_trait_with_rank_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = $TYPE$ RANK = 2 }
	historical_figure_save_each_education_trait_with_rank_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = $TYPE$ RANK = 3 }
	historical_figure_save_each_education_trait_with_rank_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = $TYPE$ RANK = 4 }
	historical_figure_save_each_education_trait_with_rank_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = $TYPE$ RANK = 5 }

}


historical_figure_save_each_extra_education_trait_effect = {

	historical_figure_save_each_education_trait_with_rank_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = $TYPE$ RANK = 1 }
	historical_figure_save_each_education_trait_with_rank_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = $TYPE$ RANK = 2 }
	historical_figure_save_each_education_trait_with_rank_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = $TYPE$ RANK = 3 }
	historical_figure_save_each_education_trait_with_rank_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = $TYPE$ RANK = 4 }

}


historical_figure_save_each_education_trait_with_rank_effect = {

	if = {
		limit = {
			$TEMP$  = { has_trait = education_$TYPE$_$RANK$ }
			$TEMP2$ = { has_trait = education_$TYPE$_$RANK$ }
			$TEMP3$ = { has_trait = education_$TYPE$_$RANK$ }
		}
		add_character_flag = historical_figure_education_$TYPE$_$RANK$
	}

}


historical_figure_load_education_trait_effect = {

	historical_figure_load_each_education_trait_effect = { TYPE = diplomacy }
	historical_figure_load_each_education_trait_effect = { TYPE = martial }
	historical_figure_load_each_education_trait_effect = { TYPE = stewardship }
	historical_figure_load_each_education_trait_effect = { TYPE = intrigue }
	historical_figure_load_each_education_trait_effect = { TYPE = learning }

	add_character_flag = historical_figure_processing_martial_prowess
	historical_figure_load_each_extra_education_trait_effect = { TYPE = martial_prowess }
	remove_character_flag = historical_figure_processing_martial_prowess

	add_character_flag = historical_figure_processing_republican_knowledge
	historical_figure_load_each_extra_education_trait_effect = { TYPE = republican_knowledge }
	remove_character_flag = historical_figure_processing_republican_knowledge

}


historical_figure_load_each_education_trait_effect = {

	historical_figure_load_each_education_trait_with_rank_effect = { TYPE = $TYPE$ RANK = 1 }
	historical_figure_load_each_education_trait_with_rank_effect = { TYPE = $TYPE$ RANK = 2 }
	historical_figure_load_each_education_trait_with_rank_effect = { TYPE = $TYPE$ RANK = 3 }
	historical_figure_load_each_education_trait_with_rank_effect = { TYPE = $TYPE$ RANK = 4 }
	historical_figure_load_each_education_trait_with_rank_effect = { TYPE = $TYPE$ RANK = 5 }

}


historical_figure_load_each_extra_education_trait_effect = {

	historical_figure_load_each_education_trait_with_rank_effect = { TYPE = $TYPE$ RANK = 1 }
	historical_figure_load_each_education_trait_with_rank_effect = { TYPE = $TYPE$ RANK = 2 }
	historical_figure_load_each_education_trait_with_rank_effect = { TYPE = $TYPE$ RANK = 3 }
	historical_figure_load_each_education_trait_with_rank_effect = { TYPE = $TYPE$ RANK = 4 }

}


historical_figure_load_each_education_trait_with_rank_effect = {

	if = {
		limit = {
			has_character_flag = historical_figure_education_$TYPE$_$RANK$
		}
		remove_character_flag = historical_figure_education_$TYPE$_$RANK$
		if = {
			limit = {
				NOT = {
					has_trait_rank = {
						trait = education_$TYPE$
						rank > $RANK$
					}
				}
			}
			if = {
				limit = {
					has_character_flag = historical_figure_processing_martial_prowess
				}
				historical_figure_clear_martial_prowess_trait_effect = yes
			}
			else_if = {
				limit = {
					has_character_flag = historical_figure_processing_republican_knowledge
				}
				historical_figure_clear_republican_knowledge_trait_effect = yes
			}
			else = {
				historical_figure_clear_education_trait_effect = yes
			}
			add_trait = education_$TYPE$_$RANK$
		}
	}

}


historical_figure_save_commander_trait_effect = {

	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = logistician }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = military_engineer }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = aggressive_attacker }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = unyielding_defender }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = forder }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = flexible_leader }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = desert_warrior }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = jungle_stalker }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = reaver }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = reckless }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = holy_warrior }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = open_terrain_expert }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = rough_terrain_expert }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = forest_fighter }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = cautious_leader }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = organizer }
	historical_figure_save_each_commander_trait_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ TYPE = winter_soldier }

	historical_figure_save_commander_trait_extra_effect = { TEMP = $TEMP$ TEMP2 = $TEMP2$ TEMP3 = $TEMP3$ }

}


historical_figure_save_each_commander_trait_effect = {

	if = {
		limit = {
			$TEMP$  = { has_trait = $TYPE$ }
			$TEMP2$ = { has_trait = $TYPE$ }
			$TEMP3$ = { has_trait = $TYPE$ }
		}
		add_character_flag = historical_figure_$TYPE$
	}

}


historical_figure_clear_education_trait_effect = {

	remove_trait = education_diplomacy_1
	remove_trait = education_diplomacy_2
	remove_trait = education_diplomacy_3
	remove_trait = education_diplomacy_4
	remove_trait = education_diplomacy_5
	remove_trait = education_martial_1
	remove_trait = education_martial_2
	remove_trait = education_martial_3
	remove_trait = education_martial_4
	remove_trait = education_martial_5
	remove_trait = education_stewardship_1
	remove_trait = education_stewardship_2
	remove_trait = education_stewardship_3
	remove_trait = education_stewardship_4
	remove_trait = education_stewardship_5
	remove_trait = education_intrigue_1
	remove_trait = education_intrigue_2
	remove_trait = education_intrigue_3
	remove_trait = education_intrigue_4
	remove_trait = education_intrigue_5
	remove_trait = education_learning_1
	remove_trait = education_learning_2
	remove_trait = education_learning_3
	remove_trait = education_learning_4
	remove_trait = education_learning_5

}


historical_figure_clear_martial_prowess_trait_effect = {

	remove_trait = education_martial_prowess_1
	remove_trait = education_martial_prowess_2
	remove_trait = education_martial_prowess_3
	remove_trait = education_martial_prowess_4

}


historical_figure_clear_republican_knowledge_trait_effect = {

	remove_trait = education_republican_knowledge_1
	remove_trait = education_republican_knowledge_2
	remove_trait = education_republican_knowledge_3
	remove_trait = education_republican_knowledge_4

}


historical_figure_clear_personality_trait_effect = {

	remove_trait = lustful
	remove_trait = chaste
	remove_trait = gluttonous
	remove_trait = temperate
	remove_trait = greedy
	remove_trait = generous
	remove_trait = lazy
	remove_trait = diligent
	remove_trait = wrathful
	remove_trait = calm
	remove_trait = patient
	remove_trait = impatient
	remove_trait = arrogant
	remove_trait = humble
	remove_trait = deceitful
	remove_trait = honest
	remove_trait = craven
	remove_trait = brave
	remove_trait = shy
	remove_trait = gregarious
	remove_trait = ambitious
	remove_trait = content
	remove_trait = arbitrary
	remove_trait = just
	remove_trait = cynical
	remove_trait = zealous
	remove_trait = paranoid
	remove_trait = trusting
	remove_trait = compassionate
	remove_trait = callous
	remove_trait = sadistic
	remove_trait = stubborn
	remove_trait = fickle
	remove_trait = eccentric
	remove_trait = vengeful
	remove_trait = forgiving
	remove_trait = rowdy
	remove_trait = charming
	remove_trait = curious
	remove_trait = pensive
	remove_trait = bossy

}


historical_figure_clear_lifestyle_trait_effect = {

	remove_trait = diplomat
	remove_trait = family_first
	remove_trait = august
	remove_trait = lifestyle_reveler
	remove_trait = lifestyle_blademaster
	remove_trait = lifestyle_hunter
	remove_trait = strategist
	remove_trait = overseer
	remove_trait = gallant
	remove_trait = architect
	remove_trait = administrator
	remove_trait = avaricious
	remove_trait = schemer
	remove_trait = seducer
	remove_trait = torturer
	remove_trait = whole_of_body
	remove_trait = scholar
	remove_trait = theologian
	remove_trait = lifestyle_mystic
	remove_trait = lifestyle_physician
	remove_trait = lifestyle_herbalist
	remove_trait = lifestyle_gardener
	remove_trait = lifestyle_traveler
	remove_trait = tourney_participant
	remove_trait = celibate
	remove_trait = lifestyle_wayfarer
	remove_trait = lifestyle_voyager
	remove_trait = lifestyle_surveyor
	remove_trait = nomadic_philosophy
	remove_trait = lifestyle_seasoned_pastor

}


historical_figure_clear_court_trait_effect = {

	remove_trait = diplomatic_court_1
	remove_trait = diplomatic_court_2
	remove_trait = warlike_court_1
	remove_trait = warlike_court_2
	remove_trait = administrative_court_1
	remove_trait = administrative_court_2
	remove_trait = intrigue_court_1
	remove_trait = intrigue_court_2
	remove_trait = scholarly_court_1
	remove_trait = scholarly_court_2

}


historical_figure_clear_coping_trait_effect = {

	remove_trait = drunkard
	remove_trait = hashishiyah
	remove_trait = rakish
	remove_trait = reclusive
	remove_trait = irritable
	remove_trait = flagellant
	remove_trait = profligate
	remove_trait = improvident
	remove_trait = contrite
	remove_trait = comfort_eater
	remove_trait = inappetetic
	remove_trait = journaller
	remove_trait = confider
	remove_trait = athletic

}


historical_figure_clear_congenital_trait_effect = {

	remove_trait = depressed_1
	remove_trait = depressed_genetic
	remove_trait = lunatic_1
	remove_trait = lunatic_genetic
	remove_trait = possessed_1
	remove_trait = possessed_genetic
	remove_trait = beauty_bad_1
	remove_trait = beauty_bad_2
	remove_trait = beauty_bad_3
	remove_trait = beauty_good_1
	remove_trait = beauty_good_2
	remove_trait = beauty_good_3
	remove_trait = intellect_bad_1
	remove_trait = intellect_bad_2
	remove_trait = intellect_bad_3
	remove_trait = intellect_good_1
	remove_trait = intellect_good_2
	remove_trait = intellect_good_3
	remove_trait = physique_bad_1
	remove_trait = physique_bad_2
	remove_trait = physique_bad_3
	remove_trait = physique_good_1
	remove_trait = physique_good_2
	remove_trait = physique_good_3
	remove_trait = pure_blooded
	remove_trait = fecund
	remove_trait = clubfooted
	remove_trait = hunchbacked
	remove_trait = lisping
	remove_trait = stuttering
	remove_trait = dwarf
	remove_trait = giant
	remove_trait = spindly
	remove_trait = scaly
	remove_trait = albino
	remove_trait = wheezing
	remove_trait = bleeder
	remove_trait = infertile
	remove_trait = inbred

}


historical_figure_clear_health_trait_effect = {

	remove_trait = strong
	remove_trait = shrewd
	remove_trait = scarred
	remove_trait = one_eyed
	remove_trait = one_legged
	remove_trait = disfigured
	remove_trait = weak
	remove_trait = dull
	remove_trait = impotent
	remove_trait = ill
	remove_trait = pneumonic
	remove_trait = great_pox
	remove_trait = early_great_pox
	remove_trait = lovers_pox
	remove_trait = leper
	remove_trait = wounded_1
	remove_trait = wounded_2
	remove_trait = wounded_3
	remove_trait = maimed
	remove_trait = infirm
	remove_trait = incapable
	remove_trait = gout_ridden
	remove_trait = consumption
	remove_trait = cancer
	remove_trait = typhus
	remove_trait = bubonic_plague
	remove_trait = smallpox
	remove_trait = measles
	remove_trait = dysentery
	remove_trait = ergotism
	remove_trait = sickly
	remove_trait = eunuch_1
	remove_trait = beardless_eunuch
	remove_trait = blind

}


historical_figure_clear_dynasty_trait_effect = {

	remove_trait = bastard
	remove_trait = bastard_founder
	remove_trait = born_in_the_purple
	remove_trait = child_of_concubine_female
	remove_trait = child_of_concubine_male
	remove_trait = denounced
	remove_trait = disinherited
	remove_trait = disputed_heritage
	remove_trait = legitimized_bastard
	remove_trait = reincarnation
	remove_trait = twin
	remove_trait = wild_oat
	remove_trait = sayyid
	remove_trait = saoshyant_descendant
	remove_trait = consecrated_blood
	remove_trait = divine_blood
	remove_trait = blood_of_prophet

}


historical_figure_clear_infamous_trait_effect = {

	remove_trait = kinslayer_1
	remove_trait = kinslayer_2
	remove_trait = kinslayer_3
	remove_trait = deviant
	remove_trait = cannibal
	remove_trait = sodomite
	remove_trait = incestuous
	remove_trait = adulterer
	remove_trait = fornicator
	remove_trait = murderer
	remove_trait = witch

}


historical_figure_clear_commander_trait_effect = {

	remove_trait = logistician
	remove_trait = military_engineer
	remove_trait = aggressive_attacker
	remove_trait = unyielding_defender
	remove_trait = forder
	remove_trait = flexible_leader
	remove_trait = desert_warrior
	remove_trait = jungle_stalker
	remove_trait = reaver
	remove_trait = reckless
	remove_trait = holy_warrior
	remove_trait = open_terrain_expert
	remove_trait = rough_terrain_expert
	remove_trait = forest_fighter
	remove_trait = cautious_leader
	remove_trait = organizer
	remove_trait = winter_soldier

}


historical_figure_clear_misc_trait_effect = {

	remove_trait = pilgrim
	remove_trait = excommunicated
	remove_trait = devoted
	remove_trait = saoshyant
	remove_trait = savior
	remove_trait = faith_warrior
	remove_trait = saint
	remove_trait = historical_character
	remove_trait = legend
	remove_trait = order_member
	remove_trait = berserker
	remove_trait = shieldmaiden
	remove_trait = varangian
	remove_trait = poet
	remove_trait = augustus
	remove_trait = viking
	remove_trait = adventurer
	remove_trait = adventurer_follower
	remove_trait = heresiarch
	remove_trait = peasant_leader
	remove_trait = populist_leader
	remove_trait = crusader_king
	remove_trait = chakravarti
	remove_trait = greatest_of_khans
	remove_trait = conqueror
	remove_trait = paragon
	remove_trait = loyal
	remove_trait = disloyal
	remove_trait = gallowsbait
	remove_trait = decadent
	remove_trait = extolled
	remove_trait = gallivanter
	remove_trait = fp3_struggle_detractor
	remove_trait = fp3_struggle_supporter
	remove_trait = charioteer_blue
	remove_trait = charioteer_green
	remove_trait = charioteer_white
	remove_trait = charioteer_red
	remove_trait = governor
	remove_trait = despoiler_of_byzantium
	remove_trait = campeador
	remove_trait = violet_poet
	remove_trait = knight_errant
	remove_trait = the_wake
	remove_trait = immortal
	remove_trait = golden_lineage

}


historical_figure_clear_trait_without_special_trait_effect = {

	historical_figure_clear_congenital_trait_effect = yes
	historical_figure_clear_trait_without_congenital_trait_effect = yes

}


historical_figure_clear_trait_without_congenital_trait_effect = {

	historical_figure_clear_personality_trait_effect = yes
	historical_figure_clear_trait_without_congenital_and_personality_trait_effect = yes

}


historical_figure_clear_trait_without_congenital_and_personality_trait_effect = {

	historical_figure_clear_education_trait_effect = yes
	historical_figure_clear_martial_prowess_trait_effect = yes
	historical_figure_clear_republican_knowledge_trait_effect = yes
	historical_figure_clear_lifestyle_trait_effect = yes
	historical_figure_clear_court_trait_effect = yes
	historical_figure_clear_coping_trait_effect = yes
	historical_figure_clear_infamous_trait_effect = yes
	historical_figure_clear_commander_trait_effect = yes
	historical_figure_clear_misc_trait_effect = yes
	historical_figure_clear_trait_without_congenital_trait_extra_effect = yes

}


historical_figure_copy_congenital_and_personality_trait_effect = {

	# Leveled Congenital

	if = {
		limit = { $TEMP$ = { has_trait = beauty_bad_1 } }
		if = {
			limit = {
				NOT = { has_trait = beauty_good_1 }
				NOT = { has_trait = beauty_good_2 }
				NOT = { has_trait = beauty_good_3 }
				NOT = { has_trait = beauty_bad_1 }
				NOT = { has_trait = beauty_bad_2 }
				NOT = { has_trait = beauty_bad_3 }
			}
			add_trait = beauty_bad_1
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = beauty_bad_2 } }
		if = {
			limit = {
				NOT = { has_trait = beauty_good_1 }
				NOT = { has_trait = beauty_good_2 }
				NOT = { has_trait = beauty_good_3 }
				NOT = { has_trait = beauty_bad_2 }
				NOT = { has_trait = beauty_bad_3 }
			}
			remove_trait = beauty_bad_1
			add_trait = beauty_bad_2
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = beauty_bad_3 } }
		if = {
			limit = {
				NOT = { has_trait = beauty_good_1 }
				NOT = { has_trait = beauty_good_2 }
				NOT = { has_trait = beauty_good_3 }
				NOT = { has_trait = beauty_bad_3 }
			}
			remove_trait = beauty_bad_1
			remove_trait = beauty_bad_2
			add_trait = beauty_bad_3
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = beauty_good_1 } }
		if = {
			limit = {
				NOT = { has_trait = beauty_good_1 }
				NOT = { has_trait = beauty_good_2 }
				NOT = { has_trait = beauty_good_3 }
			}
			remove_trait = beauty_bad_1
			remove_trait = beauty_bad_2
			remove_trait = beauty_bad_3
			add_trait = beauty_good_1
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = beauty_good_2 } }
		if = {
			limit = {
				NOT = { has_trait = beauty_good_2 }
				NOT = { has_trait = beauty_good_3 }
			}
			remove_trait = beauty_bad_1
			remove_trait = beauty_bad_2
			remove_trait = beauty_bad_3
			remove_trait = beauty_good_1
			add_trait = beauty_good_2
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = beauty_good_3 } }
		if = {
			limit = {
				NOT = { has_trait = beauty_good_3 }
			}
			remove_trait = beauty_bad_1
			remove_trait = beauty_bad_2
			remove_trait = beauty_bad_3
			remove_trait = beauty_good_1
			remove_trait = beauty_good_2
			add_trait = beauty_good_3
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = intellect_bad_1 } }
		if = {
			limit = {
				NOT = { has_trait = intellect_good_1 }
				NOT = { has_trait = intellect_good_2 }
				NOT = { has_trait = intellect_good_3 }
				NOT = { has_trait = intellect_bad_1 }
				NOT = { has_trait = intellect_bad_2 }
				NOT = { has_trait = intellect_bad_3 }
			}
			add_trait = intellect_bad_1
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = intellect_bad_2 } }
		if = {
			limit = {
				NOT = { has_trait = intellect_good_1 }
				NOT = { has_trait = intellect_good_2 }
				NOT = { has_trait = intellect_good_3 }
				NOT = { has_trait = intellect_bad_2 }
				NOT = { has_trait = intellect_bad_3 }
			}
			remove_trait = intellect_bad_1
			add_trait = intellect_bad_2
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = intellect_bad_3 } }
		if = {
			limit = {
				NOT = { has_trait = intellect_good_1 }
				NOT = { has_trait = intellect_good_2 }
				NOT = { has_trait = intellect_good_3 }
				NOT = { has_trait = intellect_bad_3 }
			}
			remove_trait = intellect_bad_1
			remove_trait = intellect_bad_2
			add_trait = intellect_bad_3
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = intellect_good_1 } }
		if = {
			limit = {
				NOT = { has_trait = intellect_good_1 }
				NOT = { has_trait = intellect_good_2 }
				NOT = { has_trait = intellect_good_3 }
			}
			remove_trait = intellect_bad_1
			remove_trait = intellect_bad_2
			remove_trait = intellect_bad_3
			add_trait = intellect_good_1
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = intellect_good_2 } }
		if = {
			limit = {
				NOT = { has_trait = intellect_good_2 }
				NOT = { has_trait = intellect_good_3 }
			}
			remove_trait = intellect_bad_1
			remove_trait = intellect_bad_2
			remove_trait = intellect_bad_3
			remove_trait = intellect_good_1
			add_trait = intellect_good_2
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = intellect_good_3 } }
		if = {
			limit = {
				NOT = { has_trait = intellect_good_3 }
			}
			remove_trait = intellect_bad_1
			remove_trait = intellect_bad_2
			remove_trait = intellect_bad_3
			remove_trait = intellect_good_1
			remove_trait = intellect_good_2
			add_trait = intellect_good_3
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = physique_bad_1 } }
		if = {
			limit = {
				NOT = { has_trait = physique_good_1 }
				NOT = { has_trait = physique_good_2 }
				NOT = { has_trait = physique_good_3 }
				NOT = { has_trait = physique_bad_1 }
				NOT = { has_trait = physique_bad_2 }
				NOT = { has_trait = physique_bad_3 }
			}
			add_trait = physique_bad_1
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = physique_bad_2 } }
		if = {
			limit = {
				NOT = { has_trait = physique_good_1 }
				NOT = { has_trait = physique_good_2 }
				NOT = { has_trait = physique_good_3 }
				NOT = { has_trait = physique_bad_2 }
				NOT = { has_trait = physique_bad_3 }
			}
			remove_trait = physique_bad_1
			add_trait = physique_bad_2
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = physique_bad_3 } }
		if = {
			limit = {
				NOT = { has_trait = physique_good_1 }
				NOT = { has_trait = physique_good_2 }
				NOT = { has_trait = physique_good_3 }
				NOT = { has_trait = physique_bad_3 }
			}
			remove_trait = physique_bad_1
			remove_trait = physique_bad_2
			add_trait = physique_bad_3
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = physique_good_1 } }
		if = {
			limit = {
				NOT = { has_trait = physique_good_1 }
				NOT = { has_trait = physique_good_2 }
				NOT = { has_trait = physique_good_3 }
			}
			remove_trait = physique_bad_1
			remove_trait = physique_bad_2
			remove_trait = physique_bad_3
			add_trait = physique_good_1
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = physique_good_2 } }
		if = {
			limit = {
				NOT = { has_trait = physique_good_2 }
				NOT = { has_trait = physique_good_3 }
			}
			remove_trait = physique_bad_1
			remove_trait = physique_bad_2
			remove_trait = physique_bad_3
			remove_trait = physique_good_1
			add_trait = physique_good_2
		}
	}
	if = {
		limit = { $TEMP$ = { has_trait = physique_good_3 } }
		if = {
			limit = {
				NOT = { has_trait = physique_good_3 }
			}
			remove_trait = physique_bad_1
			remove_trait = physique_bad_2
			remove_trait = physique_bad_3
			remove_trait = physique_good_1
			remove_trait = physique_good_2
			add_trait = physique_good_3
		}
	}

	# Congenital

	if = {
		limit = { $TEMP$ = { has_trait = depressed_1 } }
		add_trait = depressed_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = depressed_genetic } }
		add_trait = depressed_genetic
	}
	if = {
		limit = { $TEMP$ = { has_trait = lunatic_1 } }
		add_trait = lunatic_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = lunatic_genetic } }
		add_trait = lunatic_genetic
	}
	if = {
		limit = { $TEMP$ = { has_trait = possessed_1 } }
		add_trait = possessed_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = possessed_genetic } }
		add_trait = possessed_genetic
	}
	if = {
		limit = { $TEMP$ = { has_trait = pure_blooded } }
		add_trait = pure_blooded
	}
	if = {
		limit = { $TEMP$ = { has_trait = fecund } }
		add_trait = fecund
	}
	if = {
		limit = { $TEMP$ = { has_trait = clubfooted } }
		add_trait = clubfooted
	}
	if = {
		limit = { $TEMP$ = { has_trait = hunchbacked } }
		add_trait = hunchbacked
	}
	if = {
		limit = { $TEMP$ = { has_trait = lisping } }
		add_trait = lisping
	}
	if = {
		limit = { $TEMP$ = { has_trait = stuttering } }
		add_trait = stuttering
	}
	if = {
		limit = { $TEMP$ = { has_trait = dwarf } }
		add_trait = dwarf
	}
	if = {
		limit = { $TEMP$ = { has_trait = giant } }
		add_trait = giant
	}
	if = {
		limit = { $TEMP$ = { has_trait = spindly } }
		add_trait = spindly
	}
	if = {
		limit = { $TEMP$ = { has_trait = scaly } }
		add_trait = scaly
	}
	if = {
		limit = { $TEMP$ = { has_trait = albino } }
		add_trait = albino
	}
	if = {
		limit = { $TEMP$ = { has_trait = wheezing } }
		add_trait = wheezing
	}
	if = {
		limit = { $TEMP$ = { has_trait = bleeder } }
		add_trait = bleeder
	}
	if = {
		limit = { $TEMP$ = { has_trait = inbred } }
		add_trait = inbred
	}
	if = {
		limit = { $TEMP$ = { has_trait = sayyid } }
		add_trait = sayyid
	}
	if = {
		limit = { $TEMP$ = { has_trait = saoshyant_descendant } }
		add_trait = saoshyant_descendant
	}
	if = {
		limit = { $TEMP$ = { has_trait = consecrated_blood } }
		add_trait = consecrated_blood
	}
	if = {
		limit = { $TEMP$ = { has_trait = divine_blood } }
		add_trait = divine_blood
	}
	if = {
		limit = { $TEMP$ = { has_trait = blood_of_prophet } }
		add_trait = blood_of_prophet
	}

	# Personality

	if = {
		limit = { $TEMP$ = { has_trait = lustful } }
		add_trait = lustful
	}
	if = {
		limit = { $TEMP$ = { has_trait = chaste } }
		add_trait = chaste
	}
	if = {
		limit = { $TEMP$ = { has_trait = gluttonous } }
		add_trait = gluttonous
	}
	if = {
		limit = { $TEMP$ = { has_trait = temperate } }
		add_trait = temperate
	}
	if = {
		limit = { $TEMP$ = { has_trait = greedy } }
		add_trait = greedy
	}
	if = {
		limit = { $TEMP$ = { has_trait = generous } }
		add_trait = generous
	}
	if = {
		limit = { $TEMP$ = { has_trait = lazy } }
		add_trait = lazy
	}
	if = {
		limit = { $TEMP$ = { has_trait = diligent } }
		add_trait = diligent
	}
	if = {
		limit = { $TEMP$ = { has_trait = wrathful } }
		add_trait = wrathful
	}
	if = {
		limit = { $TEMP$ = { has_trait = calm } }
		add_trait = calm
	}
	if = {
		limit = { $TEMP$ = { has_trait = patient } }
		add_trait = patient
	}
	if = {
		limit = { $TEMP$ = { has_trait = impatient } }
		add_trait = impatient
	}
	if = {
		limit = { $TEMP$ = { has_trait = arrogant } }
		add_trait = arrogant
	}
	if = {
		limit = { $TEMP$ = { has_trait = humble } }
		add_trait = humble
	}
	if = {
		limit = { $TEMP$ = { has_trait = deceitful } }
		add_trait = deceitful
	}
	if = {
		limit = { $TEMP$ = { has_trait = honest } }
		add_trait = honest
	}
	if = {
		limit = { $TEMP$ = { has_trait = craven } }
		add_trait = craven
	}
	if = {
		limit = { $TEMP$ = { has_trait = brave } }
		add_trait = brave
	}
	if = {
		limit = { $TEMP$ = { has_trait = shy } }
		add_trait = shy
	}
	if = {
		limit = { $TEMP$ = { has_trait = gregarious } }
		add_trait = gregarious
	}
	if = {
		limit = { $TEMP$ = { has_trait = ambitious } }
		add_trait = ambitious
	}
	if = {
		limit = { $TEMP$ = { has_trait = content } }
		add_trait = content
	}
	if = {
		limit = { $TEMP$ = { has_trait = arbitrary } }
		add_trait = arbitrary
	}
	if = {
		limit = { $TEMP$ = { has_trait = just } }
		add_trait = just
	}
	if = {
		limit = { $TEMP$ = { has_trait = cynical } }
		add_trait = cynical
	}
	if = {
		limit = { $TEMP$ = { has_trait = zealous } }
		add_trait = zealous
	}
	if = {
		limit = { $TEMP$ = { has_trait = paranoid } }
		add_trait = paranoid
	}
	if = {
		limit = { $TEMP$ = { has_trait = trusting } }
		add_trait = trusting
	}
	if = {
		limit = { $TEMP$ = { has_trait = compassionate } }
		add_trait = compassionate
	}
	if = {
		limit = { $TEMP$ = { has_trait = callous } }
		add_trait = callous
	}
	if = {
		limit = { $TEMP$ = { has_trait = sadistic } }
		add_trait = sadistic
	}
	if = {
		limit = { $TEMP$ = { has_trait = stubborn } }
		add_trait = stubborn
	}
	if = {
		limit = { $TEMP$ = { has_trait = fickle } }
		add_trait = fickle
	}
	if = {
		limit = { $TEMP$ = { has_trait = eccentric } }
		add_trait = eccentric
	}
	if = {
		limit = { $TEMP$ = { has_trait = vengeful } }
		add_trait = vengeful
	}
	if = {
		limit = { $TEMP$ = { has_trait = forgiving } }
		add_trait = forgiving
	}

	historical_figure_copy_congenital_and_personality_trait_extra_effect = { TEMP = $TEMP$ }

}


historical_figure_save_trait_effect = {

#	if = {
#		limit = { $TEMP$ = { has_trait = education_intrigue_1 } }
#		add_character_flag = historical_figure_education_intrigue_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_intrigue_2 } }
#		add_character_flag = historical_figure_education_intrigue_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_intrigue_3 } }
#		add_character_flag = historical_figure_education_intrigue_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_intrigue_4 } }
#		add_character_flag = historical_figure_education_intrigue_4
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_intrigue_5 } }
#		add_character_flag = historical_figure_education_intrigue_5
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_diplomacy_1 } }
#		add_character_flag = historical_figure_education_diplomacy_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_diplomacy_2 } }
#		add_character_flag = historical_figure_education_diplomacy_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_diplomacy_3 } }
#		add_character_flag = historical_figure_education_diplomacy_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_diplomacy_4 } }
#		add_character_flag = historical_figure_education_diplomacy_4
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_diplomacy_5 } }
#		add_character_flag = historical_figure_education_diplomacy_5
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_stewardship_1 } }
#		add_character_flag = historical_figure_education_stewardship_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_stewardship_2 } }
#		add_character_flag = historical_figure_education_stewardship_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_stewardship_3 } }
#		add_character_flag = historical_figure_education_stewardship_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_stewardship_4 } }
#		add_character_flag = historical_figure_education_stewardship_4
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_stewardship_5 } }
#		add_character_flag = historical_figure_education_stewardship_5
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_martial_1 } }
#		add_character_flag = historical_figure_education_martial_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_martial_2 } }
#		add_character_flag = historical_figure_education_martial_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_martial_3 } }
#		add_character_flag = historical_figure_education_martial_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_martial_4 } }
#		add_character_flag = historical_figure_education_martial_4
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_martial_5 } }
#		add_character_flag = historical_figure_education_martial_5
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_learning_1 } }
#		add_character_flag = historical_figure_education_learning_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_learning_2 } }
#		add_character_flag = historical_figure_education_learning_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_learning_3 } }
#		add_character_flag = historical_figure_education_learning_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_learning_4 } }
#		add_character_flag = historical_figure_education_learning_4
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_learning_5 } }
#		add_character_flag = historical_figure_education_learning_5
#	}
	if = {
		limit = { $TEMP$ = { has_trait = diplomat } }
		add_character_flag = historical_figure_diplomat
	}
	if = {
		limit = { $TEMP$ = { has_trait = family_first } }
		add_character_flag = historical_figure_family_first
	}
	if = {
		limit = { $TEMP$ = { has_trait = august } }
		add_character_flag = historical_figure_august
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_reveler } }
		add_character_flag = historical_figure_lifestyle_reveler
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_blademaster } }
		add_character_flag = historical_figure_lifestyle_blademaster
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_hunter } }
		add_character_flag = historical_figure_lifestyle_hunter
	}
	if = {
		limit = { $TEMP$ = { has_trait = strategist } }
		add_character_flag = historical_figure_strategist
	}
	if = {
		limit = { $TEMP$ = { has_trait = overseer } }
		add_character_flag = historical_figure_overseer
	}
	if = {
		limit = { $TEMP$ = { has_trait = gallant } }
		add_character_flag = historical_figure_gallant
	}
	if = {
		limit = { $TEMP$ = { has_trait = architect } }
		add_character_flag = historical_figure_architect
	}
	if = {
		limit = { $TEMP$ = { has_trait = administrator } }
		add_character_flag = historical_figure_administrator
	}
	if = {
		limit = { $TEMP$ = { has_trait = avaricious } }
		add_character_flag = historical_figure_avaricious
	}
	if = {
		limit = { $TEMP$ = { has_trait = schemer } }
		add_character_flag = historical_figure_schemer
	}
	if = {
		limit = { $TEMP$ = { has_trait = seducer } }
		add_character_flag = historical_figure_seducer
	}
	if = {
		limit = { $TEMP$ = { has_trait = torturer } }
		add_character_flag = historical_figure_torturer
	}
	if = {
		limit = { $TEMP$ = { has_trait = whole_of_body } }
		add_character_flag = historical_figure_whole_of_body
	}
	if = {
		limit = { $TEMP$ = { has_trait = scholar } }
		add_character_flag = historical_figure_scholar
	}
	if = {
		limit = { $TEMP$ = { has_trait = theologian } }
		add_character_flag = historical_figure_theologian
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_mystic } }
		add_character_flag = historical_figure_lifestyle_mystic
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_physician } }
		add_character_flag = historical_figure_lifestyle_physician
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_herbalist } }
		add_character_flag = historical_figure_lifestyle_herbalist
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_gardener } }
		add_character_flag = historical_figure_lifestyle_gardener
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_traveler } }
		add_character_flag = historical_figure_lifestyle_traveler
	}
	if = {
		limit = { $TEMP$ = { has_trait = tourney_participant } }
		add_character_flag = historical_figure_tourney_participant
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = lustful } }
#		add_character_flag = historical_figure_lustful
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = chaste } }
#		add_character_flag = historical_figure_chaste
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = gluttonous } }
#		add_character_flag = historical_figure_gluttonous
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = temperate } }
#		add_character_flag = historical_figure_temperate
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = greedy } }
#		add_character_flag = historical_figure_greedy
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = generous } }
#		add_character_flag = historical_figure_generous
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = lazy } }
#		add_character_flag = historical_figure_lazy
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = diligent } }
#		add_character_flag = historical_figure_diligent
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = wrathful } }
#		add_character_flag = historical_figure_wrathful
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = calm } }
#		add_character_flag = historical_figure_calm
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = patient } }
#		add_character_flag = historical_figure_patient
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = impatient } }
#		add_character_flag = historical_figure_impatient
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = arrogant } }
#		add_character_flag = historical_figure_arrogant
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = humble } }
#		add_character_flag = historical_figure_humble
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = deceitful } }
#		add_character_flag = historical_figure_deceitful
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = honest } }
#		add_character_flag = historical_figure_honest
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = craven } }
#		add_character_flag = historical_figure_craven
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = brave } }
#		add_character_flag = historical_figure_brave
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = shy } }
#		add_character_flag = historical_figure_shy
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = gregarious } }
#		add_character_flag = historical_figure_gregarious
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = ambitious } }
#		add_character_flag = historical_figure_ambitious
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = content } }
#		add_character_flag = historical_figure_content
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = arbitrary } }
#		add_character_flag = historical_figure_arbitrary
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = just } }
#		add_character_flag = historical_figure_just
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = cynical } }
#		add_character_flag = historical_figure_cynical
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = zealous } }
#		add_character_flag = historical_figure_zealous
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = paranoid } }
#		add_character_flag = historical_figure_paranoid
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = trusting } }
#		add_character_flag = historical_figure_trusting
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = compassionate } }
#		add_character_flag = historical_figure_compassionate
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = callous } }
#		add_character_flag = historical_figure_callous
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = sadistic } }
#		add_character_flag = historical_figure_sadistic
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = stubborn } }
#		add_character_flag = historical_figure_stubborn
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = fickle } }
#		add_character_flag = historical_figure_fickle
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = eccentric } }
#		add_character_flag = historical_figure_eccentric
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = vengeful } }
#		add_character_flag = historical_figure_vengeful
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = forgiving } }
#		add_character_flag = historical_figure_forgiving
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = rowdy } }
#		add_character_flag = historical_figure_rowdy
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = charming } }
#		add_character_flag = historical_figure_charming
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = curious } }
#		add_character_flag = historical_figure_curious
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = pensive } }
#		add_character_flag = historical_figure_pensive
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = bossy } }
#		add_character_flag = historical_figure_bossy
#	}
	if = {
		limit = { $TEMP$ = { has_trait = drunkard } }
		add_character_flag = historical_figure_drunkard
	}
	if = {
		limit = { $TEMP$ = { has_trait = hashishiyah } }
		add_character_flag = historical_figure_hashishiyah
	}
	if = {
		limit = { $TEMP$ = { has_trait = rakish } }
		add_character_flag = historical_figure_rakish
	}
	if = {
		limit = { $TEMP$ = { has_trait = reclusive } }
		add_character_flag = historical_figure_reclusive
	}
	if = {
		limit = { $TEMP$ = { has_trait = irritable } }
		add_character_flag = historical_figure_irritable
	}
	if = {
		limit = { $TEMP$ = { has_trait = flagellant } }
		add_character_flag = historical_figure_flagellant
	}
	if = {
		limit = { $TEMP$ = { has_trait = profligate } }
		add_character_flag = historical_figure_profligate
	}
	if = {
		limit = { $TEMP$ = { has_trait = improvident } }
		add_character_flag = historical_figure_improvident
	}
	if = {
		limit = { $TEMP$ = { has_trait = contrite } }
		add_character_flag = historical_figure_contrite
	}
	if = {
		limit = { $TEMP$ = { has_trait = comfort_eater } }
		add_character_flag = historical_figure_comfort_eater
	}
	if = {
		limit = { $TEMP$ = { has_trait = inappetetic } }
		add_character_flag = historical_figure_inappetetic
	}
	if = {
		limit = { $TEMP$ = { has_trait = journaller } }
		add_character_flag = historical_figure_journaller
	}
	if = {
		limit = { $TEMP$ = { has_trait = confider } }
		add_character_flag = historical_figure_confider
	}
	if = {
		limit = { $TEMP$ = { has_trait = athletic } }
		add_character_flag = historical_figure_athletic
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = pregnant } }
#		add_character_flag = historical_figure_pregnant
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = depressed_1 } }
#		add_character_flag = historical_figure_depressed_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = depressed_genetic } }
#		add_character_flag = historical_figure_depressed_genetic
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = lunatic_1 } }
#		add_character_flag = historical_figure_lunatic_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = lunatic_genetic } }
#		add_character_flag = historical_figure_lunatic_genetic
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = possessed_1 } }
#		add_character_flag = historical_figure_possessed_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = possessed_genetic } }
#		add_character_flag = historical_figure_possessed_genetic
#	}
	if = {
		limit = { $TEMP$ = { has_trait = ill } }
		add_character_flag = historical_figure_ill
	}
	if = {
		limit = { $TEMP$ = { has_trait = pneumonic } }
		add_character_flag = historical_figure_pneumonic
	}
	if = {
		limit = { $TEMP$ = { has_trait = great_pox } }
		add_character_flag = historical_figure_great_pox
	}
	if = {
		limit = { $TEMP$ = { has_trait = early_great_pox } }
		add_character_flag = historical_figure_early_great_pox
	}
	if = {
		limit = { $TEMP$ = { has_trait = lovers_pox } }
		add_character_flag = historical_figure_lovers_pox
	}
	if = {
		limit = { $TEMP$ = { has_trait = leper } }
		add_character_flag = historical_figure_leper
	}
	if = {
		limit = { $TEMP$ = { has_trait = wounded_1 } }
		add_character_flag = historical_figure_wounded_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = wounded_2 } }
		add_character_flag = historical_figure_wounded_2
	}
	if = {
		limit = { $TEMP$ = { has_trait = wounded_3 } }
		add_character_flag = historical_figure_wounded_3
	}
	if = {
		limit = { $TEMP$ = { has_trait = maimed } }
		add_character_flag = historical_figure_maimed
	}
	if = {
		limit = { $TEMP$ = { has_trait = one_eyed } }
		add_character_flag = historical_figure_one_eyed
	}
	if = {
		limit = { $TEMP$ = { has_trait = one_legged } }
		add_character_flag = historical_figure_one_legged
	}
	if = {
		limit = { $TEMP$ = { has_trait = disfigured } }
		add_character_flag = historical_figure_disfigured
	}
	if = {
		limit = { $TEMP$ = { has_trait = infirm } }
		add_character_flag = historical_figure_infirm
	}
	if = {
		limit = { $TEMP$ = { has_trait = incapable } }
		add_character_flag = historical_figure_incapable
	}
	if = {
		limit = { $TEMP$ = { has_trait = gout_ridden } }
		add_character_flag = historical_figure_gout_ridden
	}
	if = {
		limit = { $TEMP$ = { has_trait = consumption } }
		add_character_flag = historical_figure_consumption
	}
	if = {
		limit = { $TEMP$ = { has_trait = cancer } }
		add_character_flag = historical_figure_cancer
	}
	if = {
		limit = { $TEMP$ = { has_trait = typhus } }
		add_character_flag = historical_figure_typhus
	}
	if = {
		limit = { $TEMP$ = { has_trait = bubonic_plague } }
		add_character_flag = historical_figure_bubonic_plague
	}
	if = {
		limit = { $TEMP$ = { has_trait = smallpox } }
		add_character_flag = historical_figure_smallpox
	}
	if = {
		limit = { $TEMP$ = { has_trait = measles } }
		add_character_flag = historical_figure_measles
	}
	if = {
		limit = { $TEMP$ = { has_trait = dysentery } }
		add_character_flag = historical_figure_dysentery
	}
	if = {
		limit = { $TEMP$ = { has_trait = ergotism } }
		add_character_flag = historical_figure_ergotism
	}
	if = {
		limit = { $TEMP$ = { has_trait = sickly } }
		add_character_flag = historical_figure_sickly
	}
	if = {
		limit = { $TEMP$ = { has_trait = scarred } }
		add_character_flag = historical_figure_scarred
	}
	if = {
		limit = { $TEMP$ = { has_trait = eunuch_1 } }
		add_character_flag = historical_figure_eunuch_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = beardless_eunuch } }
		add_character_flag = historical_figure_beardless_eunuch
	}
	if = {
		limit = { $TEMP$ = { has_trait = blind } }
		add_character_flag = historical_figure_blind
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = beauty_bad_1 } }
#		add_character_flag = historical_figure_beauty_bad_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = beauty_bad_2 } }
#		add_character_flag = historical_figure_beauty_bad_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = beauty_bad_3 } }
#		add_character_flag = historical_figure_beauty_bad_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = beauty_good_1 } }
#		add_character_flag = historical_figure_beauty_good_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = beauty_good_2 } }
#		add_character_flag = historical_figure_beauty_good_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = beauty_good_3 } }
#		add_character_flag = historical_figure_beauty_good_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = intellect_bad_1 } }
#		add_character_flag = historical_figure_intellect_bad_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = intellect_bad_2 } }
#		add_character_flag = historical_figure_intellect_bad_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = intellect_bad_3 } }
#		add_character_flag = historical_figure_intellect_bad_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = intellect_good_1 } }
#		add_character_flag = historical_figure_intellect_good_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = intellect_good_2 } }
#		add_character_flag = historical_figure_intellect_good_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = intellect_good_3 } }
#		add_character_flag = historical_figure_intellect_good_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = physique_bad_1 } }
#		add_character_flag = historical_figure_physique_bad_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = physique_bad_2 } }
#		add_character_flag = historical_figure_physique_bad_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = physique_bad_3 } }
#		add_character_flag = historical_figure_physique_bad_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = physique_good_1 } }
#		add_character_flag = historical_figure_physique_good_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = physique_good_2 } }
#		add_character_flag = historical_figure_physique_good_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = physique_good_3 } }
#		add_character_flag = historical_figure_physique_good_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = pure_blooded } }
#		add_character_flag = historical_figure_pure_blooded
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = fecund } }
#		add_character_flag = historical_figure_fecund
#	}
	if = {
		limit = { $TEMP$ = { has_trait = strong } }
		add_character_flag = historical_figure_strong
	}
	if = {
		limit = { $TEMP$ = { has_trait = shrewd } }
		add_character_flag = historical_figure_shrewd
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = clubfooted } }
#		add_character_flag = historical_figure_clubfooted
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = hunchbacked } }
#		add_character_flag = historical_figure_hunchbacked
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = lisping } }
#		add_character_flag = historical_figure_lisping
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = stuttering } }
#		add_character_flag = historical_figure_stuttering
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = dwarf } }
#		add_character_flag = historical_figure_dwarf
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = giant } }
#		add_character_flag = historical_figure_giant
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = inbred } }
#		add_character_flag = historical_figure_inbred
#	}
	if = {
		limit = { $TEMP$ = { has_trait = weak } }
		add_character_flag = historical_figure_weak
	}
	if = {
		limit = { $TEMP$ = { has_trait = dull } }
		add_character_flag = historical_figure_dull
	}
	if = {
		limit = { $TEMP$ = { has_trait = impotent } }
		add_character_flag = historical_figure_impotent
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = spindly } }
#		add_character_flag = historical_figure_spindly
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = scaly } }
#		add_character_flag = historical_figure_scaly
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = albino } }
#		add_character_flag = historical_figure_albino
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = wheezing } }
#		add_character_flag = historical_figure_wheezing
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = bleeder } }
#		add_character_flag = historical_figure_bleeder
#	}
	if = {
		limit = { $TEMP$ = { has_trait = infertile } }
		add_character_flag = historical_figure_infertile
	}
	if = {
		limit = { $TEMP$ = { has_trait = celibate } }
		add_character_flag = historical_figure_celibate
	}
	if = {
		limit = { $TEMP$ = { has_trait = pilgrim } }
		add_character_flag = historical_figure_pilgrim
	}
	if = {
		limit = { $TEMP$ = { has_trait = excommunicated } }
		add_character_flag = historical_figure_excommunicated
	}
	if = {
		limit = { $TEMP$ = { has_trait = devoted } }
		add_character_flag = historical_figure_devoted
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = sayyid } }
#		add_character_flag = historical_figure_sayyid
#	}
	if = {
		limit = { $TEMP$ = { has_trait = saoshyant } }
		add_character_flag = historical_figure_saoshyant
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = saoshyant_descendant } }
#		add_character_flag = historical_figure_saoshyant_descendant
#	}
	if = {
		limit = { $TEMP$ = { has_trait = savior } }
		add_character_flag = historical_figure_savior
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = divine_blood } }
#		add_character_flag = historical_figure_divine_blood
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = blood_of_prophet } }
#		add_character_flag = historical_figure_blood_of_prophet
#	}
	if = {
		limit = { $TEMP$ = { has_trait = faith_warrior } }
		add_character_flag = historical_figure_faith_warrior
	}
	if = {
		limit = { $TEMP$ = { has_trait = saint } }
		add_character_flag = historical_figure_saint
	}
	if = {
		limit = { $TEMP$ = { has_trait = historical_character } }
		add_character_flag = historical_figure_historical_character
	}
	if = {
		limit = { $TEMP$ = { has_trait = legend } }
		add_character_flag = historical_figure_legend
	}
	if = {
		limit = { $TEMP$ = { has_trait = order_member } }
		add_character_flag = historical_figure_order_member
	}
	if = {
		limit = { $TEMP$ = { has_trait = berserker } }
		add_character_flag = historical_figure_berserker
	}
	if = {
		limit = { $TEMP$ = { has_trait = shieldmaiden } }
		add_character_flag = historical_figure_shieldmaiden
	}
	if = {
		limit = { $TEMP$ = { has_trait = varangian } }
		add_character_flag = historical_figure_varangian
	}
	if = {
		limit = { $TEMP$ = { has_trait = poet } }
		add_character_flag = historical_figure_poet
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = bastard } }
#		add_character_flag = historical_figure_bastard
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = legitimized_bastard } }
#		add_character_flag = historical_figure_legitimized_bastard
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = disputed_heritage } }
#		add_character_flag = historical_figure_disputed_heritage
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = child_of_concubine_female } }
#		add_character_flag = historical_figure_child_of_concubine_female
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = child_of_concubine_male } }
#		add_character_flag = historical_figure_child_of_concubine_male
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = wild_oat } }
#		add_character_flag = historical_figure_wild_oat
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = bastard_founder } }
#		add_character_flag = historical_figure_bastard_founder
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = twin } }
#		add_character_flag = historical_figure_twin
#	}
	if = {
		limit = { $TEMP$ = { has_trait = kinslayer_1 } }
		add_character_flag = historical_figure_kinslayer_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = kinslayer_2 } }
		add_character_flag = historical_figure_kinslayer_2
	}
	if = {
		limit = { $TEMP$ = { has_trait = kinslayer_3 } }
		add_character_flag = historical_figure_kinslayer_3
	}
	if = {
		limit = { $TEMP$ = { has_trait = deviant } }
		add_character_flag = historical_figure_deviant
	}
	if = {
		limit = { $TEMP$ = { has_trait = cannibal } }
		add_character_flag = historical_figure_cannibal
	}
	if = {
		limit = { $TEMP$ = { has_trait = sodomite } }
		add_character_flag = historical_figure_sodomite
	}
	if = {
		limit = { $TEMP$ = { has_trait = incestuous } }
		add_character_flag = historical_figure_incestuous
	}
	if = {
		limit = { $TEMP$ = { has_trait = adulterer } }
		add_character_flag = historical_figure_adulterer
	}
	if = {
		limit = { $TEMP$ = { has_trait = fornicator } }
		add_character_flag = historical_figure_fornicator
	}
	if = {
		limit = { $TEMP$ = { has_trait = murderer } }
		add_character_flag = historical_figure_murderer
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = born_in_the_purple } }
#		add_character_flag = historical_figure_born_in_the_purple
#	}
	if = {
		limit = { $TEMP$ = { has_trait = augustus } }
		add_character_flag = historical_figure_augustus
	}
	if = {
		limit = { $TEMP$ = { has_trait = viking } }
		add_character_flag = historical_figure_viking
	}
	if = {
		limit = { $TEMP$ = { has_trait = reincarnation } }
		add_character_flag = historical_figure_reincarnation
	}
	if = {
		limit = { $TEMP$ = { has_trait = adventurer } }
		add_character_flag = historical_figure_adventurer
	}
	if = {
		limit = { $TEMP$ = { has_trait = adventurer_follower } }
		add_character_flag = historical_figure_adventurer_follower
	}
	if = {
		limit = { $TEMP$ = { has_trait = heresiarch } }
		add_character_flag = historical_figure_heresiarch
	}
	if = {
		limit = { $TEMP$ = { has_trait = peasant_leader } }
		add_character_flag = historical_figure_peasant_leader
	}
	if = {
		limit = { $TEMP$ = { has_trait = populist_leader } }
		add_character_flag = historical_figure_populist_leader
	}
	if = {
		limit = { $TEMP$ = { has_trait = witch } }
		add_character_flag = historical_figure_witch
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = disinherited } }
#		add_character_flag = historical_figure_disinherited
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = denounced } }
#		add_character_flag = historical_figure_denounced
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = decadent } }
#		add_character_flag = historical_figure_decadent
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = extolled } }
#		add_character_flag = historical_figure_extolled
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = gallivanter } }
#		add_character_flag = historical_figure_gallivanter
#	}
	if = {
		limit = { $TEMP$ = { has_trait = loyal } }
		add_character_flag = historical_figure_loyal
	}
	if = {
		limit = { $TEMP$ = { has_trait = disloyal } }
		add_character_flag = historical_figure_disloyal
	}
	if = {
		limit = { $TEMP$ = { has_trait = gallowsbait } }
		add_character_flag = historical_figure_gallowsbait
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = logistician } }
#		add_character_flag = historical_figure_logistician
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = military_engineer } }
#		add_character_flag = historical_figure_military_engineer
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = aggressive_attacker } }
#		add_character_flag = historical_figure_aggressive_attacker
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = unyielding_defender } }
#		add_character_flag = historical_figure_unyielding_defender
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = forder } }
#		add_character_flag = historical_figure_forder
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = flexible_leader } }
#		add_character_flag = historical_figure_flexible_leader
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = desert_warrior } }
#		add_character_flag = historical_figure_desert_warrior
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = jungle_stalker } }
#		add_character_flag = historical_figure_jungle_stalker
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = reaver } }
#		add_character_flag = historical_figure_reaver
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = reckless } }
#		add_character_flag = historical_figure_reckless
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = holy_warrior } }
#		add_character_flag = historical_figure_holy_warrior
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = open_terrain_expert } }
#		add_character_flag = historical_figure_open_terrain_expert
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = rough_terrain_expert } }
#		add_character_flag = historical_figure_rough_terrain_expert
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = forest_fighter } }
#		add_character_flag = historical_figure_forest_fighter
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = cautious_leader } }
#		add_character_flag = historical_figure_cautious_leader
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = organizer } }
#		add_character_flag = historical_figure_organizer
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = winter_soldier } }
#		add_character_flag = historical_figure_winter_soldier
#	}
	if = {
		limit = { $TEMP$ = { has_trait = crusader_king } }
		add_character_flag = historical_figure_crusader_king
	}
	if = {
		limit = { $TEMP$ = { has_trait = chakravarti } }
		add_character_flag = historical_figure_chakravarti
	}
	if = {
		limit = { $TEMP$ = { has_trait = greatest_of_khans } }
		add_character_flag = historical_figure_greatest_of_khans
	}
	if = {
		limit = { $TEMP$ = { has_trait = conqueror } }
		add_character_flag = historical_figure_conqueror
	}
	if = {
		limit = { $TEMP$ = { has_trait = paragon } }
		add_character_flag = historical_figure_paragon
	}
	if = {
		limit = { $TEMP$ = { has_trait = consecrated_blood } }
		add_character_flag = historical_figure_consecrated_blood
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_martial_prowess_1 } }
#		add_character_flag = historical_figure_education_martial_prowess_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_martial_prowess_2 } }
#		add_character_flag = historical_figure_education_martial_prowess_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_martial_prowess_3 } }
#		add_character_flag = historical_figure_education_martial_prowess_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_martial_prowess_4 } }
#		add_character_flag = historical_figure_education_martial_prowess_4
#	}
	if = {
		limit = { $TEMP$ = { has_trait = diplomatic_court_1 } }
		add_character_flag = historical_figure_diplomatic_court_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = diplomatic_court_2 } }
		add_character_flag = historical_figure_diplomatic_court_2
	}
	if = {
		limit = { $TEMP$ = { has_trait = warlike_court_1 } }
		add_character_flag = historical_figure_warlike_court_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = warlike_court_2 } }
		add_character_flag = historical_figure_warlike_court_2
	}
	if = {
		limit = { $TEMP$ = { has_trait = administrative_court_1 } }
		add_character_flag = historical_figure_administrative_court_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = administrative_court_2 } }
		add_character_flag = historical_figure_administrative_court_2
	}
	if = {
		limit = { $TEMP$ = { has_trait = intrigue_court_1 } }
		add_character_flag = historical_figure_intrigue_court_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = intrigue_court_2 } }
		add_character_flag = historical_figure_intrigue_court_2
	}
	if = {
		limit = { $TEMP$ = { has_trait = scholarly_court_1 } }
		add_character_flag = historical_figure_scholarly_court_1
	}
	if = {
		limit = { $TEMP$ = { has_trait = scholarly_court_2 } }
		add_character_flag = historical_figure_scholarly_court_2
	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_republican_knowledge_1 } }
#		add_character_flag = historical_figure_education_republican_knowledge_1
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_republican_knowledge_2 } }
#		add_character_flag = historical_figure_education_republican_knowledge_2
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_republican_knowledge_3 } }
#		add_character_flag = historical_figure_education_republican_knowledge_3
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = education_republican_knowledge_4 } }
#		add_character_flag = historical_figure_education_republican_knowledge_4
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = fp3_struggle_detractor } }
#		add_character_flag = historical_figure_fp3_struggle_detractor
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = fp3_struggle_supporter } }
#		add_character_flag = historical_figure_fp3_struggle_supporter
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = charioteer_blue } }
#		add_character_flag = historical_figure_charioteer_blue
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = charioteer_green } }
#		add_character_flag = historical_figure_charioteer_green
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = charioteer_white } }
#		add_character_flag = historical_figure_charioteer_white
#	}
#	if = {
#		limit = { $TEMP$ = { has_trait = charioteer_red } }
#		add_character_flag = historical_figure_charioteer_red
#	}
	if = {
		limit = { $TEMP$ = { has_trait = governor } }
		add_character_flag = historical_figure_governor
	}
	if = {
		limit = { $TEMP$ = { has_trait = despoiler_of_byzantium } }
		add_character_flag = historical_figure_despoiler_of_byzantium
	}
	if = {
		limit = { $TEMP$ = { has_trait = campeador } }
		add_character_flag = historical_figure_campeador
	}
	if = {
		limit = { $TEMP$ = { has_trait = violet_poet } }
		add_character_flag = historical_figure_violet_poet
	}
	if = {
		limit = { $TEMP$ = { has_trait = knight_errant } }
		add_character_flag = historical_figure_knight_errant
	}
	if = {
		limit = { $TEMP$ = { has_trait = the_wake } }
		add_character_flag = historical_figure_the_wake
	}
	if = {
		limit = { $TEMP$ = { has_trait = immortal } }
		add_character_flag = historical_figure_immortal
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_wayfarer } }
		add_character_flag = historical_figure_lifestyle_wayfarer
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_voyager } }
		add_character_flag = historical_figure_lifestyle_voyager
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_surveyor } }
		add_character_flag = historical_figure_lifestyle_surveyor
	}
	if = {
		limit = { $TEMP$ = { has_trait = nomadic_philosophy } }
		add_character_flag = historical_figure_nomadic_philosophy
	}
	if = {
		limit = { $TEMP$ = { has_trait = lifestyle_seasoned_pastor } }
		add_character_flag = historical_figure_lifestyle_seasoned_pastor
	}
	if = {
		limit = { $TEMP$ = { has_trait = golden_lineage } }
		add_character_flag = historical_figure_golden_lineage
	}

	historical_figure_save_trait_extra_effect = { TEMP = $TEMP$ }

}


historical_figure_load_trait_effect = {

#	if = {
#		limit = { has_character_flag = historical_figure_education_intrigue_1 }
#		add_trait = education_intrigue_1
#		remove_character_flag = historical_figure_education_intrigue_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_intrigue_2 }
#		add_trait = education_intrigue_2
#		remove_character_flag = historical_figure_education_intrigue_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_intrigue_3 }
#		add_trait = education_intrigue_3
#		remove_character_flag = historical_figure_education_intrigue_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_intrigue_4 }
#		add_trait = education_intrigue_4
#		remove_character_flag = historical_figure_education_intrigue_4
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_intrigue_5 }
#		add_trait = education_intrigue_5
#		remove_character_flag = historical_figure_education_intrigue_5
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_diplomacy_1 }
#		add_trait = education_diplomacy_1
#		remove_character_flag = historical_figure_education_diplomacy_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_diplomacy_2 }
#		add_trait = education_diplomacy_2
#		remove_character_flag = historical_figure_education_diplomacy_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_diplomacy_3 }
#		add_trait = education_diplomacy_3
#		remove_character_flag = historical_figure_education_diplomacy_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_diplomacy_4 }
#		add_trait = education_diplomacy_4
#		remove_character_flag = historical_figure_education_diplomacy_4
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_diplomacy_5 }
#		add_trait = education_diplomacy_5
#		remove_character_flag = historical_figure_education_diplomacy_5
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_stewardship_1 }
#		add_trait = education_stewardship_1
#		remove_character_flag = historical_figure_education_stewardship_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_stewardship_2 }
#		add_trait = education_stewardship_2
#		remove_character_flag = historical_figure_education_stewardship_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_stewardship_3 }
#		add_trait = education_stewardship_3
#		remove_character_flag = historical_figure_education_stewardship_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_stewardship_4 }
#		add_trait = education_stewardship_4
#		remove_character_flag = historical_figure_education_stewardship_4
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_stewardship_5 }
#		add_trait = education_stewardship_5
#		remove_character_flag = historical_figure_education_stewardship_5
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_martial_1 }
#		add_trait = education_martial_1
#		remove_character_flag = historical_figure_education_martial_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_martial_2 }
#		add_trait = education_martial_2
#		remove_character_flag = historical_figure_education_martial_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_martial_3 }
#		add_trait = education_martial_3
#		remove_character_flag = historical_figure_education_martial_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_martial_4 }
#		add_trait = education_martial_4
#		remove_character_flag = historical_figure_education_martial_4
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_martial_5 }
#		add_trait = education_martial_5
#		remove_character_flag = historical_figure_education_martial_5
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_learning_1 }
#		add_trait = education_learning_1
#		remove_character_flag = historical_figure_education_learning_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_learning_2 }
#		add_trait = education_learning_2
#		remove_character_flag = historical_figure_education_learning_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_learning_3 }
#		add_trait = education_learning_3
#		remove_character_flag = historical_figure_education_learning_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_learning_4 }
#		add_trait = education_learning_4
#		remove_character_flag = historical_figure_education_learning_4
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_learning_5 }
#		add_trait = education_learning_5
#		remove_character_flag = historical_figure_education_learning_5
#	}
	if = {
		limit = { has_character_flag = historical_figure_diplomat }
		add_trait = diplomat
		remove_character_flag = historical_figure_diplomat
	}
	if = {
		limit = { has_character_flag = historical_figure_family_first }
		add_trait = family_first
		remove_character_flag = historical_figure_family_first
	}
	if = {
		limit = { has_character_flag = historical_figure_august }
		add_trait = august
		remove_character_flag = historical_figure_august
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_reveler }
		add_trait = lifestyle_reveler
		remove_character_flag = historical_figure_lifestyle_reveler
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_blademaster }
		add_trait = lifestyle_blademaster
		remove_character_flag = historical_figure_lifestyle_blademaster
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_hunter }
		add_trait = lifestyle_hunter
		remove_character_flag = historical_figure_lifestyle_hunter
	}
	if = {
		limit = { has_character_flag = historical_figure_strategist }
		add_trait = strategist
		remove_character_flag = historical_figure_strategist
	}
	if = {
		limit = { has_character_flag = historical_figure_overseer }
		add_trait = overseer
		remove_character_flag = historical_figure_overseer
	}
	if = {
		limit = { has_character_flag = historical_figure_gallant }
		add_trait = gallant
		remove_character_flag = historical_figure_gallant
	}
	if = {
		limit = { has_character_flag = historical_figure_architect }
		add_trait = architect
		remove_character_flag = historical_figure_architect
	}
	if = {
		limit = { has_character_flag = historical_figure_administrator }
		add_trait = administrator
		remove_character_flag = historical_figure_administrator
	}
	if = {
		limit = { has_character_flag = historical_figure_avaricious }
		add_trait = avaricious
		remove_character_flag = historical_figure_avaricious
	}
	if = {
		limit = { has_character_flag = historical_figure_schemer }
		add_trait = schemer
		remove_character_flag = historical_figure_schemer
	}
	if = {
		limit = { has_character_flag = historical_figure_seducer }
		add_trait = seducer
		remove_character_flag = historical_figure_seducer
	}
	if = {
		limit = { has_character_flag = historical_figure_torturer }
		add_trait = torturer
		remove_character_flag = historical_figure_torturer
	}
	if = {
		limit = { has_character_flag = historical_figure_whole_of_body }
		add_trait = whole_of_body
		remove_character_flag = historical_figure_whole_of_body
	}
	if = {
		limit = { has_character_flag = historical_figure_scholar }
		add_trait = scholar
		remove_character_flag = historical_figure_scholar
	}
	if = {
		limit = { has_character_flag = historical_figure_theologian }
		add_trait = theologian
		remove_character_flag = historical_figure_theologian
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_mystic }
		add_trait = lifestyle_mystic
		remove_character_flag = historical_figure_lifestyle_mystic
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_physician }
		add_trait = lifestyle_physician
		remove_character_flag = historical_figure_lifestyle_physician
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_herbalist }
		add_trait = lifestyle_herbalist
		remove_character_flag = historical_figure_lifestyle_herbalist
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_gardener }
		add_trait = lifestyle_gardener
		remove_character_flag = historical_figure_lifestyle_gardener
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_traveler }
		add_trait = lifestyle_traveler
		remove_character_flag = historical_figure_lifestyle_traveler
	}
	if = {
		limit = { has_character_flag = historical_figure_tourney_participant }
		add_trait = tourney_participant
		remove_character_flag = historical_figure_tourney_participant
	}
#	if = {
#		limit = { has_character_flag = historical_figure_lustful }
#		add_trait = lustful
#		remove_character_flag = historical_figure_lustful
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_chaste }
#		add_trait = chaste
#		remove_character_flag = historical_figure_chaste
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_gluttonous }
#		add_trait = gluttonous
#		remove_character_flag = historical_figure_gluttonous
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_temperate }
#		add_trait = temperate
#		remove_character_flag = historical_figure_temperate
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_greedy }
#		add_trait = greedy
#		remove_character_flag = historical_figure_greedy
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_generous }
#		add_trait = generous
#		remove_character_flag = historical_figure_generous
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_lazy }
#		add_trait = lazy
#		remove_character_flag = historical_figure_lazy
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_diligent }
#		add_trait = diligent
#		remove_character_flag = historical_figure_diligent
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_wrathful }
#		add_trait = wrathful
#		remove_character_flag = historical_figure_wrathful
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_calm }
#		add_trait = calm
#		remove_character_flag = historical_figure_calm
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_patient }
#		add_trait = patient
#		remove_character_flag = historical_figure_patient
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_impatient }
#		add_trait = impatient
#		remove_character_flag = historical_figure_impatient
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_arrogant }
#		add_trait = arrogant
#		remove_character_flag = historical_figure_arrogant
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_humble }
#		add_trait = humble
#		remove_character_flag = historical_figure_humble
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_deceitful }
#		add_trait = deceitful
#		remove_character_flag = historical_figure_deceitful
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_honest }
#		add_trait = honest
#		remove_character_flag = historical_figure_honest
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_craven }
#		add_trait = craven
#		remove_character_flag = historical_figure_craven
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_brave }
#		add_trait = brave
#		remove_character_flag = historical_figure_brave
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_shy }
#		add_trait = shy
#		remove_character_flag = historical_figure_shy
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_gregarious }
#		add_trait = gregarious
#		remove_character_flag = historical_figure_gregarious
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_ambitious }
#		add_trait = ambitious
#		remove_character_flag = historical_figure_ambitious
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_content }
#		add_trait = content
#		remove_character_flag = historical_figure_content
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_arbitrary }
#		add_trait = arbitrary
#		remove_character_flag = historical_figure_arbitrary
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_just }
#		add_trait = just
#		remove_character_flag = historical_figure_just
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_cynical }
#		add_trait = cynical
#		remove_character_flag = historical_figure_cynical
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_zealous }
#		add_trait = zealous
#		remove_character_flag = historical_figure_zealous
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_paranoid }
#		add_trait = paranoid
#		remove_character_flag = historical_figure_paranoid
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_trusting }
#		add_trait = trusting
#		remove_character_flag = historical_figure_trusting
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_compassionate }
#		add_trait = compassionate
#		remove_character_flag = historical_figure_compassionate
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_callous }
#		add_trait = callous
#		remove_character_flag = historical_figure_callous
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_sadistic }
#		add_trait = sadistic
#		remove_character_flag = historical_figure_sadistic
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_stubborn }
#		add_trait = stubborn
#		remove_character_flag = historical_figure_stubborn
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_fickle }
#		add_trait = fickle
#		remove_character_flag = historical_figure_fickle
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_eccentric }
#		add_trait = eccentric
#		remove_character_flag = historical_figure_eccentric
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_vengeful }
#		add_trait = vengeful
#		remove_character_flag = historical_figure_vengeful
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_forgiving }
#		add_trait = forgiving
#		remove_character_flag = historical_figure_forgiving
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_rowdy }
#		add_trait = rowdy
#		remove_character_flag = historical_figure_rowdy
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_charming }
#		add_trait = charming
#		remove_character_flag = historical_figure_charming
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_curious }
#		add_trait = curious
#		remove_character_flag = historical_figure_curious
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_pensive }
#		add_trait = pensive
#		remove_character_flag = historical_figure_pensive
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_bossy }
#		add_trait = bossy
#		remove_character_flag = historical_figure_bossy
#	}
	if = {
		limit = { has_character_flag = historical_figure_drunkard }
		add_trait = drunkard
		remove_character_flag = historical_figure_drunkard
	}
	if = {
		limit = { has_character_flag = historical_figure_hashishiyah }
		add_trait = hashishiyah
		remove_character_flag = historical_figure_hashishiyah
	}
	if = {
		limit = { has_character_flag = historical_figure_rakish }
		add_trait = rakish
		remove_character_flag = historical_figure_rakish
	}
	if = {
		limit = { has_character_flag = historical_figure_reclusive }
		add_trait = reclusive
		remove_character_flag = historical_figure_reclusive
	}
	if = {
		limit = { has_character_flag = historical_figure_irritable }
		add_trait = irritable
		remove_character_flag = historical_figure_irritable
	}
	if = {
		limit = { has_character_flag = historical_figure_flagellant }
		add_trait = flagellant
		remove_character_flag = historical_figure_flagellant
	}
	if = {
		limit = { has_character_flag = historical_figure_profligate }
		add_trait = profligate
		remove_character_flag = historical_figure_profligate
	}
	if = {
		limit = { has_character_flag = historical_figure_improvident }
		add_trait = improvident
		remove_character_flag = historical_figure_improvident
	}
	if = {
		limit = { has_character_flag = historical_figure_contrite }
		add_trait = contrite
		remove_character_flag = historical_figure_contrite
	}
	if = {
		limit = { has_character_flag = historical_figure_comfort_eater }
		add_trait = comfort_eater
		remove_character_flag = historical_figure_comfort_eater
	}
	if = {
		limit = { has_character_flag = historical_figure_inappetetic }
		add_trait = inappetetic
		remove_character_flag = historical_figure_inappetetic
	}
	if = {
		limit = { has_character_flag = historical_figure_journaller }
		add_trait = journaller
		remove_character_flag = historical_figure_journaller
	}
	if = {
		limit = { has_character_flag = historical_figure_confider }
		add_trait = confider
		remove_character_flag = historical_figure_confider
	}
	if = {
		limit = { has_character_flag = historical_figure_athletic }
		add_trait = athletic
		remove_character_flag = historical_figure_athletic
	}
#	if = {
#		limit = { has_character_flag = historical_figure_pregnant }
#		add_trait = pregnant
#		remove_character_flag = historical_figure_pregnant
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_depressed_1 }
#		add_trait = depressed_1
#		remove_character_flag = historical_figure_depressed_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_depressed_genetic }
#		add_trait = depressed_genetic
#		remove_character_flag = historical_figure_depressed_genetic
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_lunatic_1 }
#		add_trait = lunatic_1
#		remove_character_flag = historical_figure_lunatic_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_lunatic_genetic }
#		add_trait = lunatic_genetic
#		remove_character_flag = historical_figure_lunatic_genetic
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_possessed_1 }
#		add_trait = possessed_1
#		remove_character_flag = historical_figure_possessed_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_possessed_genetic }
#		add_trait = possessed_genetic
#		remove_character_flag = historical_figure_possessed_genetic
#	}
	if = {
		limit = { has_character_flag = historical_figure_ill }
		add_trait = ill
		remove_character_flag = historical_figure_ill
	}
	if = {
		limit = { has_character_flag = historical_figure_pneumonic }
		add_trait = pneumonic
		remove_character_flag = historical_figure_pneumonic
	}
	if = {
		limit = { has_character_flag = historical_figure_great_pox }
		add_trait = great_pox
		remove_character_flag = historical_figure_great_pox
	}
	if = {
		limit = { has_character_flag = historical_figure_early_great_pox }
		add_trait = early_great_pox
		remove_character_flag = historical_figure_early_great_pox
	}
	if = {
		limit = { has_character_flag = historical_figure_lovers_pox }
		add_trait = lovers_pox
		remove_character_flag = historical_figure_lovers_pox
	}
	if = {
		limit = { has_character_flag = historical_figure_leper }
		add_trait = leper
		remove_character_flag = historical_figure_leper
	}
	if = {
		limit = { has_character_flag = historical_figure_wounded_1 }
		add_trait = wounded_1
		remove_character_flag = historical_figure_wounded_1
	}
	if = {
		limit = { has_character_flag = historical_figure_wounded_2 }
		add_trait = wounded_2
		remove_character_flag = historical_figure_wounded_2
	}
	if = {
		limit = { has_character_flag = historical_figure_wounded_3 }
		add_trait = wounded_3
		remove_character_flag = historical_figure_wounded_3
	}
	if = {
		limit = { has_character_flag = historical_figure_maimed }
		add_trait = maimed
		remove_character_flag = historical_figure_maimed
	}
	if = {
		limit = { has_character_flag = historical_figure_one_eyed }
		add_trait = one_eyed
		remove_character_flag = historical_figure_one_eyed
	}
	if = {
		limit = { has_character_flag = historical_figure_one_legged }
		add_trait = one_legged
		remove_character_flag = historical_figure_one_legged
	}
	if = {
		limit = { has_character_flag = historical_figure_disfigured }
		add_trait = disfigured
		remove_character_flag = historical_figure_disfigured
	}
	if = {
		limit = { has_character_flag = historical_figure_infirm }
		add_trait = infirm
		remove_character_flag = historical_figure_infirm
	}
	if = {
		limit = { has_character_flag = historical_figure_incapable }
		add_trait = incapable
		remove_character_flag = historical_figure_incapable
	}
	if = {
		limit = { has_character_flag = historical_figure_gout_ridden }
		add_trait = gout_ridden
		remove_character_flag = historical_figure_gout_ridden
	}
	if = {
		limit = { has_character_flag = historical_figure_consumption }
		add_trait = consumption
		remove_character_flag = historical_figure_consumption
	}
	if = {
		limit = { has_character_flag = historical_figure_cancer }
		add_trait = cancer
		remove_character_flag = historical_figure_cancer
	}
	if = {
		limit = { has_character_flag = historical_figure_typhus }
		add_trait = typhus
		remove_character_flag = historical_figure_typhus
	}
	if = {
		limit = { has_character_flag = historical_figure_bubonic_plague }
		add_trait = bubonic_plague
		remove_character_flag = historical_figure_bubonic_plague
	}
	if = {
		limit = { has_character_flag = historical_figure_smallpox }
		add_trait = smallpox
		remove_character_flag = historical_figure_smallpox
	}
	if = {
		limit = { has_character_flag = historical_figure_measles }
		add_trait = measles
		remove_character_flag = historical_figure_measles
	}
	if = {
		limit = { has_character_flag = historical_figure_dysentery }
		add_trait = dysentery
		remove_character_flag = historical_figure_dysentery
	}
	if = {
		limit = { has_character_flag = historical_figure_ergotism }
		add_trait = ergotism
		remove_character_flag = historical_figure_ergotism
	}
	if = {
		limit = { has_character_flag = historical_figure_sickly }
		add_trait = sickly
		remove_character_flag = historical_figure_sickly
	}
	if = {
		limit = { has_character_flag = historical_figure_scarred }
		add_trait = scarred
		remove_character_flag = historical_figure_scarred
	}
	if = {
		limit = { has_character_flag = historical_figure_eunuch_1 }
		add_trait = eunuch_1
		remove_character_flag = historical_figure_eunuch_1
	}
	if = {
		limit = { has_character_flag = historical_figure_beardless_eunuch }
		add_trait = beardless_eunuch
		remove_character_flag = historical_figure_beardless_eunuch
	}
	if = {
		limit = { has_character_flag = historical_figure_blind }
		add_trait = blind
		remove_character_flag = historical_figure_blind
	}
#	if = {
#		limit = { has_character_flag = historical_figure_beauty_bad_1 }
#		add_trait = beauty_bad_1
#		remove_character_flag = historical_figure_beauty_bad_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_beauty_bad_2 }
#		add_trait = beauty_bad_2
#		remove_character_flag = historical_figure_beauty_bad_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_beauty_bad_3 }
#		add_trait = beauty_bad_3
#		remove_character_flag = historical_figure_beauty_bad_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_beauty_good_1 }
#		add_trait = beauty_good_1
#		remove_character_flag = historical_figure_beauty_good_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_beauty_good_2 }
#		add_trait = beauty_good_2
#		remove_character_flag = historical_figure_beauty_good_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_beauty_good_3 }
#		add_trait = beauty_good_3
#		remove_character_flag = historical_figure_beauty_good_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_intellect_bad_1 }
#		add_trait = intellect_bad_1
#		remove_character_flag = historical_figure_intellect_bad_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_intellect_bad_2 }
#		add_trait = intellect_bad_2
#		remove_character_flag = historical_figure_intellect_bad_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_intellect_bad_3 }
#		add_trait = intellect_bad_3
#		remove_character_flag = historical_figure_intellect_bad_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_intellect_good_1 }
#		add_trait = intellect_good_1
#		remove_character_flag = historical_figure_intellect_good_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_intellect_good_2 }
#		add_trait = intellect_good_2
#		remove_character_flag = historical_figure_intellect_good_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_intellect_good_3 }
#		add_trait = intellect_good_3
#		remove_character_flag = historical_figure_intellect_good_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_physique_bad_1 }
#		add_trait = physique_bad_1
#		remove_character_flag = historical_figure_physique_bad_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_physique_bad_2 }
#		add_trait = physique_bad_2
#		remove_character_flag = historical_figure_physique_bad_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_physique_bad_3 }
#		add_trait = physique_bad_3
#		remove_character_flag = historical_figure_physique_bad_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_physique_good_1 }
#		add_trait = physique_good_1
#		remove_character_flag = historical_figure_physique_good_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_physique_good_2 }
#		add_trait = physique_good_2
#		remove_character_flag = historical_figure_physique_good_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_physique_good_3 }
#		add_trait = physique_good_3
#		remove_character_flag = historical_figure_physique_good_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_pure_blooded }
#		add_trait = pure_blooded
#		remove_character_flag = historical_figure_pure_blooded
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_fecund }
#		add_trait = fecund
#		remove_character_flag = historical_figure_fecund
#	}
	if = {
		limit = { has_character_flag = historical_figure_strong }
		add_trait = strong
		remove_character_flag = historical_figure_strong
	}
	if = {
		limit = { has_character_flag = historical_figure_shrewd }
		add_trait = shrewd
		remove_character_flag = historical_figure_shrewd
	}
#	if = {
#		limit = { has_character_flag = historical_figure_clubfooted }
#		add_trait = clubfooted
#		remove_character_flag = historical_figure_clubfooted
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_hunchbacked }
#		add_trait = hunchbacked
#		remove_character_flag = historical_figure_hunchbacked
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_lisping }
#		add_trait = lisping
#		remove_character_flag = historical_figure_lisping
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_stuttering }
#		add_trait = stuttering
#		remove_character_flag = historical_figure_stuttering
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_dwarf }
#		add_trait = dwarf
#		remove_character_flag = historical_figure_dwarf
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_giant }
#		add_trait = giant
#		remove_character_flag = historical_figure_giant
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_inbred }
#		add_trait = inbred
#		remove_character_flag = historical_figure_inbred
#	}
	if = {
		limit = { has_character_flag = historical_figure_weak }
		add_trait = weak
		remove_character_flag = historical_figure_weak
	}
	if = {
		limit = { has_character_flag = historical_figure_dull }
		add_trait = dull
		remove_character_flag = historical_figure_dull
	}
	if = {
		limit = { has_character_flag = historical_figure_impotent }
		add_trait = impotent
		remove_character_flag = historical_figure_impotent
	}
#	if = {
#		limit = { has_character_flag = historical_figure_spindly }
#		add_trait = spindly
#		remove_character_flag = historical_figure_spindly
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_scaly }
#		add_trait = scaly
#		remove_character_flag = historical_figure_scaly
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_albino }
#		add_trait = albino
#		remove_character_flag = historical_figure_albino
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_wheezing }
#		add_trait = wheezing
#		remove_character_flag = historical_figure_wheezing
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_bleeder }
#		add_trait = bleeder
#		remove_character_flag = historical_figure_bleeder
#	}
	if = {
		limit = { has_character_flag = historical_figure_infertile }
		add_trait = infertile
		remove_character_flag = historical_figure_infertile
	}
	if = {
		limit = { has_character_flag = historical_figure_celibate }
		add_trait = celibate
		remove_character_flag = historical_figure_celibate
	}
	if = {
		limit = { has_character_flag = historical_figure_pilgrim }
		add_trait = pilgrim
		remove_character_flag = historical_figure_pilgrim
	}
	if = {
		limit = { has_character_flag = historical_figure_excommunicated }
		add_trait = excommunicated
		remove_character_flag = historical_figure_excommunicated
	}
	if = {
		limit = { has_character_flag = historical_figure_devoted }
		add_trait = devoted
		remove_character_flag = historical_figure_devoted
	}
#	if = {
#		limit = { has_character_flag = historical_figure_sayyid }
#		add_trait = sayyid
#		remove_character_flag = historical_figure_sayyid
#	}
	if = {
		limit = { has_character_flag = historical_figure_saoshyant }
		add_trait = saoshyant
		remove_character_flag = historical_figure_saoshyant
	}
#	if = {
#		limit = { has_character_flag = historical_figure_saoshyant_descendant }
#		add_trait = saoshyant_descendant
#		remove_character_flag = historical_figure_saoshyant_descendant
#	}
	if = {
		limit = { has_character_flag = historical_figure_savior }
		add_trait = savior
		remove_character_flag = historical_figure_savior
	}
#	if = {
#		limit = { has_character_flag = historical_figure_divine_blood }
#		add_trait = divine_blood
#		remove_character_flag = historical_figure_divine_blood
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_blood_of_prophet }
#		add_trait = blood_of_prophet
#		remove_character_flag = historical_figure_blood_of_prophet
#	}
	if = {
		limit = { has_character_flag = historical_figure_faith_warrior }
		add_trait = faith_warrior
		remove_character_flag = historical_figure_faith_warrior
	}
	if = {
		limit = { has_character_flag = historical_figure_saint }
		add_trait = saint
		remove_character_flag = historical_figure_saint
	}
	if = {
		limit = { has_character_flag = historical_figure_historical_character }
		add_trait = historical_character
		remove_character_flag = historical_figure_historical_character
	}
	if = {
		limit = { has_character_flag = historical_figure_legend }
		add_trait = legend
		remove_character_flag = historical_figure_legend
	}
	if = {
		limit = { has_character_flag = historical_figure_order_member }
		add_trait = order_member
		remove_character_flag = historical_figure_order_member
	}
	if = {
		limit = { has_character_flag = historical_figure_berserker }
		add_trait = berserker
		remove_character_flag = historical_figure_berserker
	}
	if = {
		limit = { has_character_flag = historical_figure_shieldmaiden }
		add_trait = shieldmaiden
		remove_character_flag = historical_figure_shieldmaiden
	}
	if = {
		limit = { has_character_flag = historical_figure_varangian }
		add_trait = varangian
		remove_character_flag = historical_figure_varangian
	}
	if = {
		limit = { has_character_flag = historical_figure_poet }
		add_trait = poet
		remove_character_flag = historical_figure_poet
	}
#	if = {
#		limit = { has_character_flag = historical_figure_bastard }
#		add_trait = bastard
#		remove_character_flag = historical_figure_bastard
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_legitimized_bastard }
#		add_trait = legitimized_bastard
#		remove_character_flag = historical_figure_legitimized_bastard
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_disputed_heritage }
#		add_trait = disputed_heritage
#		remove_character_flag = historical_figure_disputed_heritage
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_child_of_concubine_female }
#		add_trait = child_of_concubine_female
#		remove_character_flag = historical_figure_child_of_concubine_female
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_child_of_concubine_male }
#		add_trait = child_of_concubine_male
#		remove_character_flag = historical_figure_child_of_concubine_male
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_wild_oat }
#		add_trait = wild_oat
#		remove_character_flag = historical_figure_wild_oat
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_bastard_founder }
#		add_trait = bastard_founder
#		remove_character_flag = historical_figure_bastard_founder
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_twin }
#		add_trait = twin
#		remove_character_flag = historical_figure_twin
#	}
	if = {
		limit = { has_character_flag = historical_figure_kinslayer_1 }
		add_trait = kinslayer_1
		remove_character_flag = historical_figure_kinslayer_1
	}
	if = {
		limit = { has_character_flag = historical_figure_kinslayer_2 }
		add_trait = kinslayer_2
		remove_character_flag = historical_figure_kinslayer_2
	}
	if = {
		limit = { has_character_flag = historical_figure_kinslayer_3 }
		add_trait = kinslayer_3
		remove_character_flag = historical_figure_kinslayer_3
	}
	if = {
		limit = { has_character_flag = historical_figure_deviant }
		add_trait = deviant
		remove_character_flag = historical_figure_deviant
	}
	if = {
		limit = { has_character_flag = historical_figure_cannibal }
		add_trait = cannibal
		remove_character_flag = historical_figure_cannibal
	}
	if = {
		limit = { has_character_flag = historical_figure_sodomite }
		add_trait = sodomite
		remove_character_flag = historical_figure_sodomite
	}
	if = {
		limit = { has_character_flag = historical_figure_incestuous }
		add_trait = incestuous
		remove_character_flag = historical_figure_incestuous
	}
	if = {
		limit = { has_character_flag = historical_figure_adulterer }
		add_trait = adulterer
		remove_character_flag = historical_figure_adulterer
	}
	if = {
		limit = { has_character_flag = historical_figure_fornicator }
		add_trait = fornicator
		remove_character_flag = historical_figure_fornicator
	}
	if = {
		limit = { has_character_flag = historical_figure_murderer }
		add_trait = murderer
		remove_character_flag = historical_figure_murderer
	}
#	if = {
#		limit = { has_character_flag = historical_figure_born_in_the_purple }
#		add_trait = born_in_the_purple
#		remove_character_flag = historical_figure_born_in_the_purple
#	}
	if = {
		limit = { has_character_flag = historical_figure_augustus }
		add_trait = augustus
		remove_character_flag = historical_figure_augustus
	}
	if = {
		limit = { has_character_flag = historical_figure_viking }
		add_trait = viking
		remove_character_flag = historical_figure_viking
	}
	if = {
		limit = { has_character_flag = historical_figure_reincarnation }
		add_trait = reincarnation
		remove_character_flag = historical_figure_reincarnation
	}
	if = {
		limit = { has_character_flag = historical_figure_adventurer }
		add_trait = adventurer
		remove_character_flag = historical_figure_adventurer
	}
	if = {
		limit = { has_character_flag = historical_figure_adventurer_follower }
		add_trait = adventurer_follower
		remove_character_flag = historical_figure_adventurer_follower
	}
	if = {
		limit = { has_character_flag = historical_figure_heresiarch }
		add_trait = heresiarch
		remove_character_flag = historical_figure_heresiarch
	}
	if = {
		limit = { has_character_flag = historical_figure_peasant_leader }
		add_trait = peasant_leader
		remove_character_flag = historical_figure_peasant_leader
	}
	if = {
		limit = { has_character_flag = historical_figure_populist_leader }
		add_trait = populist_leader
		remove_character_flag = historical_figure_populist_leader
	}
	if = {
		limit = { has_character_flag = historical_figure_witch }
		add_trait = witch
		remove_character_flag = historical_figure_witch
	}
#	if = {
#		limit = { has_character_flag = historical_figure_disinherited }
#		add_trait = disinherited
#		remove_character_flag = historical_figure_disinherited
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_denounced }
#		add_trait = denounced
#		remove_character_flag = historical_figure_denounced
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_decadent }
#		add_trait = decadent
#		remove_character_flag = historical_figure_decadent
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_extolled }
#		add_trait = extolled
#		remove_character_flag = historical_figure_extolled
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_gallivanter }
#		add_trait = gallivanter
#		remove_character_flag = historical_figure_gallivanter
#	}
	if = {
		limit = { has_character_flag = historical_figure_loyal }
		add_trait = loyal
		remove_character_flag = historical_figure_loyal
	}
	if = {
		limit = { has_character_flag = historical_figure_disloyal }
		add_trait = disloyal
		remove_character_flag = historical_figure_disloyal
	}
	if = {
		limit = { has_character_flag = historical_figure_gallowsbait }
		add_trait = gallowsbait
		remove_character_flag = historical_figure_gallowsbait
	}
	if = {
		limit = { has_character_flag = historical_figure_logistician }
		add_trait = logistician
		remove_character_flag = historical_figure_logistician
	}
	if = {
		limit = { has_character_flag = historical_figure_military_engineer }
		add_trait = military_engineer
		remove_character_flag = historical_figure_military_engineer
	}
	if = {
		limit = { has_character_flag = historical_figure_aggressive_attacker }
		add_trait = aggressive_attacker
		remove_character_flag = historical_figure_aggressive_attacker
	}
	if = {
		limit = { has_character_flag = historical_figure_unyielding_defender }
		add_trait = unyielding_defender
		remove_character_flag = historical_figure_unyielding_defender
	}
	if = {
		limit = { has_character_flag = historical_figure_forder }
		add_trait = forder
		remove_character_flag = historical_figure_forder
	}
	if = {
		limit = { has_character_flag = historical_figure_flexible_leader }
		add_trait = flexible_leader
		remove_character_flag = historical_figure_flexible_leader
	}
	if = {
		limit = { has_character_flag = historical_figure_desert_warrior }
		add_trait = desert_warrior
		remove_character_flag = historical_figure_desert_warrior
	}
	if = {
		limit = { has_character_flag = historical_figure_jungle_stalker }
		add_trait = jungle_stalker
		remove_character_flag = historical_figure_jungle_stalker
	}
	if = {
		limit = { has_character_flag = historical_figure_reaver }
		add_trait = reaver
		remove_character_flag = historical_figure_reaver
	}
	if = {
		limit = { has_character_flag = historical_figure_reckless }
		add_trait = reckless
		remove_character_flag = historical_figure_reckless
	}
	if = {
		limit = { has_character_flag = historical_figure_holy_warrior }
		add_trait = holy_warrior
		remove_character_flag = historical_figure_holy_warrior
	}
	if = {
		limit = { has_character_flag = historical_figure_open_terrain_expert }
		add_trait = open_terrain_expert
		remove_character_flag = historical_figure_open_terrain_expert
	}
	if = {
		limit = { has_character_flag = historical_figure_rough_terrain_expert }
		add_trait = rough_terrain_expert
		remove_character_flag = historical_figure_rough_terrain_expert
	}
	if = {
		limit = { has_character_flag = historical_figure_forest_fighter }
		add_trait = forest_fighter
		remove_character_flag = historical_figure_forest_fighter
	}
	if = {
		limit = { has_character_flag = historical_figure_cautious_leader }
		add_trait = cautious_leader
		remove_character_flag = historical_figure_cautious_leader
	}
	if = {
		limit = { has_character_flag = historical_figure_organizer }
		add_trait = organizer
		remove_character_flag = historical_figure_organizer
	}
	if = {
		limit = { has_character_flag = historical_figure_winter_soldier }
		add_trait = winter_soldier
		remove_character_flag = historical_figure_winter_soldier
	}
	if = {
		limit = { has_character_flag = historical_figure_crusader_king }
		add_trait = crusader_king
		remove_character_flag = historical_figure_crusader_king
	}
	if = {
		limit = { has_character_flag = historical_figure_chakravarti }
		add_trait = chakravarti
		remove_character_flag = historical_figure_chakravarti
	}
	if = {
		limit = { has_character_flag = historical_figure_greatest_of_khans }
		add_trait = greatest_of_khans
		remove_character_flag = historical_figure_greatest_of_khans
	}
	if = {
		limit = { has_character_flag = historical_figure_conqueror }
		add_trait = conqueror
		remove_character_flag = historical_figure_conqueror
	}
	if = {
		limit = { has_character_flag = historical_figure_paragon }
		add_trait = paragon
		remove_character_flag = historical_figure_paragon
	}
	if = {
		limit = { has_character_flag = historical_figure_consecrated_blood }
		add_trait = consecrated_blood
		remove_character_flag = historical_figure_consecrated_blood
	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_martial_prowess_1 }
#		add_trait = education_martial_prowess_1
#		remove_character_flag = historical_figure_education_martial_prowess_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_martial_prowess_2 }
#		add_trait = education_martial_prowess_2
#		remove_character_flag = historical_figure_education_martial_prowess_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_martial_prowess_3 }
#		add_trait = education_martial_prowess_3
#		remove_character_flag = historical_figure_education_martial_prowess_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_martial_prowess_4 }
#		add_trait = education_martial_prowess_4
#		remove_character_flag = historical_figure_education_martial_prowess_4
#	}
	if = {
		limit = { has_character_flag = historical_figure_diplomatic_court_1 }
		add_trait = diplomatic_court_1
		remove_character_flag = historical_figure_diplomatic_court_1
	}
	if = {
		limit = { has_character_flag = historical_figure_diplomatic_court_2 }
		add_trait = diplomatic_court_2
		remove_character_flag = historical_figure_diplomatic_court_2
	}
	if = {
		limit = { has_character_flag = historical_figure_warlike_court_1 }
		add_trait = warlike_court_1
		remove_character_flag = historical_figure_warlike_court_1
	}
	if = {
		limit = { has_character_flag = historical_figure_warlike_court_2 }
		add_trait = warlike_court_2
		remove_character_flag = historical_figure_warlike_court_2
	}
	if = {
		limit = { has_character_flag = historical_figure_administrative_court_1 }
		add_trait = administrative_court_1
		remove_character_flag = historical_figure_administrative_court_1
	}
	if = {
		limit = { has_character_flag = historical_figure_administrative_court_2 }
		add_trait = administrative_court_2
		remove_character_flag = historical_figure_administrative_court_2
	}
	if = {
		limit = { has_character_flag = historical_figure_intrigue_court_1 }
		add_trait = intrigue_court_1
		remove_character_flag = historical_figure_intrigue_court_1
	}
	if = {
		limit = { has_character_flag = historical_figure_intrigue_court_2 }
		add_trait = intrigue_court_2
		remove_character_flag = historical_figure_intrigue_court_2
	}
	if = {
		limit = { has_character_flag = historical_figure_scholarly_court_1 }
		add_trait = scholarly_court_1
		remove_character_flag = historical_figure_scholarly_court_1
	}
	if = {
		limit = { has_character_flag = historical_figure_scholarly_court_2 }
		add_trait = scholarly_court_2
		remove_character_flag = historical_figure_scholarly_court_2
	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_republican_knowledge_1 }
#		add_trait = education_republican_knowledge_1
#		remove_character_flag = historical_figure_education_republican_knowledge_1
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_republican_knowledge_2 }
#		add_trait = education_republican_knowledge_2
#		remove_character_flag = historical_figure_education_republican_knowledge_2
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_republican_knowledge_3 }
#		add_trait = education_republican_knowledge_3
#		remove_character_flag = historical_figure_education_republican_knowledge_3
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_education_republican_knowledge_4 }
#		add_trait = education_republican_knowledge_4
#		remove_character_flag = historical_figure_education_republican_knowledge_4
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_fp3_struggle_detractor }
#		add_trait = fp3_struggle_detractor
#		remove_character_flag = historical_figure_fp3_struggle_detractor
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_fp3_struggle_supporter }
#		add_trait = fp3_struggle_supporter
#		remove_character_flag = historical_figure_fp3_struggle_supporter
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_charioteer_blue }
#		add_trait = charioteer_blue
#		remove_character_flag = historical_figure_charioteer_blue
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_charioteer_green }
#		add_trait = charioteer_green
#		remove_character_flag = historical_figure_charioteer_green
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_charioteer_white }
#		add_trait = charioteer_white
#		remove_character_flag = historical_figure_charioteer_white
#	}
#	if = {
#		limit = { has_character_flag = historical_figure_charioteer_red }
#		add_trait = charioteer_red
#		remove_character_flag = historical_figure_charioteer_red
#	}
	if = {
		limit = { has_character_flag = historical_figure_governor }
		add_trait = governor
		remove_character_flag = historical_figure_governor
	}
	if = {
		limit = { has_character_flag = historical_figure_despoiler_of_byzantium }
		add_trait = despoiler_of_byzantium
		remove_character_flag = historical_figure_despoiler_of_byzantium
	}
	if = {
		limit = { has_character_flag = historical_figure_campeador }
		add_trait = campeador
		remove_character_flag = historical_figure_campeador
	}
	if = {
		limit = { has_character_flag = historical_figure_violet_poet }
		add_trait = violet_poet
		remove_character_flag = historical_figure_violet_poet
	}
	if = {
		limit = { has_character_flag = historical_figure_knight_errant }
		add_trait = knight_errant
		remove_character_flag = historical_figure_knight_errant
	}
	if = {
		limit = { has_character_flag = historical_figure_the_wake }
		add_trait = the_wake
		remove_character_flag = historical_figure_the_wake
	}
	if = {
		limit = { has_character_flag = historical_figure_immortal }
		add_trait = immortal
		remove_character_flag = historical_figure_immortal
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_wayfarer }
		add_trait = lifestyle_wayfarer
		remove_character_flag = historical_figure_lifestyle_wayfarer
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_voyager }
		add_trait = lifestyle_voyager
		remove_character_flag = historical_figure_lifestyle_voyager
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_surveyor }
		add_trait = lifestyle_surveyor
		remove_character_flag = historical_figure_lifestyle_surveyor
	}
	if = {
		limit = { has_character_flag = historical_figure_nomadic_philosophy }
		add_trait = nomadic_philosophy
		remove_character_flag = historical_figure_nomadic_philosophy
	}
	if = {
		limit = { has_character_flag = historical_figure_lifestyle_seasoned_pastor }
		add_trait = lifestyle_seasoned_pastor
		remove_character_flag = historical_figure_lifestyle_seasoned_pastor
	}
	if = {
		limit = { has_character_flag = historical_figure_golden_lineage }
		add_trait = golden_lineage
		remove_character_flag = historical_figure_golden_lineage
	}

	historical_figure_load_trait_extra_effect = yes

}
