code:
:: slave generation widgets [nobr widget]

<<widget "NationalityToRace">>
<<set $args[0].race
	= hashChoice(setup.raceSelector[$args[0].nationality] || setup.raceSelector[""])>>
<</widget>>

<<widget "NationalityToName">>
<<set $args[0].birthName =
	(setup.namePoolSelector[$args[0].nationality + "." + $args[0].race]
		|| setup.namePoolSelector[$args[0].nationality]
		|| setup.whiteAmericanSlaveNames).random()>>
<<set $args[0].birthSurname =
	(setup.surnamePoolSelector[$args[0].nationality + "." + $args[0].race]
		|| setup.surnamePoolSelector[$args[0].nationality]
		|| setup.whiteAmericanSlaveSurnames).random()>>
<<set $args[0].slaveName = $args[0].birthName>>
<<set $args[0].slaveName = $args[0].birthName, $args[0].slaveSurname = $args[0].birthSurname>>
<<if $useFSNames == 1>>
<<if $arcologies[0].FSChattelReligionist > 20>>
	<<set $args[0].slaveName = setup.chattelReligionistSlaveNames.random(), $args[0].slaveSurname = 0>>
<<elseif $arcologies[0].FSRomanRevivalist > 20>>
	<<set $args[0].slaveName = setup.romanSlaveNames.random(), $args[0].slaveSurname = setup.romanSlaveSurnames.random()>>
<<elseif $arcologies[0].FSAztecRevivalist > 20>>
	<<set $args[0].slaveName = setup.aztecSlaveNames.random(), $args[0].slaveSurname = 0>>
<<elseif $arcologies[0].FSEgyptianRevivalist > 20>>
	<<set $args[0].slaveName = setup.ancientEgyptianSlaveNames.random(), $args[0].slaveSurname = 0>>
<<elseif $arcologies[0].FSEdoRevivalist > 20>>
	<<set $args[0].slaveName = setup.edoSlaveNames.random(), $args[0].slaveSurname = setup.edoSlaveSurnames.random()>>
<<elseif $arcologies[0].FSDegradationist != "unset">>
	<<DegradingName $args[0]>>
<</if>>
<</if>>

<</widget>>

<<widget "NationalityToAccent">>

<<set _naturalAccent = either(0,1,1,2,2,2,3,3,3,3)>>

<<switch $args[0].nationality>>
<<case "Afghan">>
	<<if $language == "Pashto">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Albanian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Algerian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "American">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Spanish" && $args[0].race == "latina">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Chinese" && $args[0].race == "asian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Arabic" && $args[0].race == "middle eastern">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Andorran">>
	<<if $language == "Catalan">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Angolan">>
	<<if $language == "Portuguese">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Antiguan">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Argentinian">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Armenian">>
	<<if $language == "Russian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Aruban">>
	<<if $language == "Dutch">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Portuguese">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Australian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Austrian">>
	<<if $language == "German">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Serbian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Slovene">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Turkish" && $args[0].race == "middle eastern">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Azerbaijani">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Bahamian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Bahraini">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Bangladeshi">>
	<<if $language == "Bengali">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Hindi">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Barbadian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Belarusian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Belgian">>
	<<if $language == "Dutch">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "German">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Belizean">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Beninese">>
	<<if $language == "French">>
		<<set $args[0].accent = 1>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Bermudian">>
	<<if $language == "English">>
		<<set $args[0].accent = 1>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Bhutanese">>
	<<if $language == "Dzongkha">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Bissau-Guinean">>
	<<if $language == "Portuguese">>
		<<set $args[0].accent = 1>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Bolivian">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = 1>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Bosnian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Brazilian">>
	<<if $language == "Portuguese">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "British">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Bruneian">>
	<<if $language == "Malay">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Bulgarian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Burkinabé">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Burmese">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Burundian">>
	<<if $language == "Kirundi">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Cambodian">>
	<<if $language == "Khmer">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Cham">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Cameroonian">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Canadian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Cape Verdean">>
	<<if $language == "Portuguese">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Catalan">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Central African">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Chadian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Chilean">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Chinese">>
	<<if $language == "Tibetan">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Korean">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Kazakh">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Colombian">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Comorian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Congolese">>
	<<if $language == "Lingala">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Kikongo">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "a Cook Islander">>
	<<if $language == "Cook Islands Māori">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Costa Rican">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Croatian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Cuban">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Cypriot">>
	<<if $language == "Greek">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Turkish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Czech">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Danish">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Djiboutian">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Dominican">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Dominiquais">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Dutch">>
	<<set $args[0].accent = _naturalAccent>>
<<case "East Timorese">>
	<<if $language == "Tetum">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Portuguese">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Malay">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Ecuadorian">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Egyptian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Emirati">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Equatoguinean">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Eritrean">>
	<<if $language == "Tigrinya">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Estonian">>
	<<if $language == "Russian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Ethiopian">>
	<<if $language == "Amharic">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Tigrinya">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Fijian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Filipina">>
	<<if $language == "Filipino">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Tagalog">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Spanish">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Finnish">>
	<<if $language == "Swedish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "French">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Spanish">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "German">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Arabic" && $args[0].race == "middle eastern">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Catalan">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "French Guianan">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "French Polynesian">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Gabonese">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Gambian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Georgian">>
	<<if $language == "Abkhaz">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "German">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Turkish" && $args[0].race == "middle eastern">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Ghanan">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Hausa">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Greek">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Greenlandic">>
	<<if $language == "Danish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Grenadian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Guamanian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Guatemalan">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Guinean">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Guyanese">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Haitian">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Honduran">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Hungarian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "I-Kiribati">>
	<<if $language == "Gilbertese">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Icelandic">>
	<<if $language == "Danish">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Indian">>
	<<if $language == "Hindi">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Indonesian">>
	<<if $language == "Malay">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Iranian">>
	<<if $language == "Persian">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Iraqi">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Kurdish">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Irish">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Israeli">>
	<<if $language == "Hebrew">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Italian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Ivorian">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Jamaican">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>><<case "Japanese">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Jordanian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Kazakh">>
	<<if $language == "Russian">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Kenyan">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Kittitian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Korean">>
	<<if $language == "Chinese">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Kosovan">>
	<<if $language == "Albanian">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Serbian">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Kurdish">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Kuwaiti">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Kyrgyz">>
	<<if $language == "Russian">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Laotian">>
	<<if $language == "Lao">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Khmu">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Latvian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Lebanese">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Liberian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Libyan">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "a Liechtensteiner">>
	<<if $language == "German">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Lithuanian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Luxembourgian">>
	<<if $language == "German">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Macedonian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Malagasy">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Malawian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Malaysian">>
	<<if $language == "Malay">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Maldivian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Malian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Maltese">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Italian">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Marshallese">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Mauritanian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Mauritian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Mexican">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Micronesian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Moldovan">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Monégasque">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Mongolian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Montenegrin">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Moroccan">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Mosotho">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Motswana">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Mozambican">>
	<<if $language == "Portuguese">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Namibian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Afrikaans">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Nauruan">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Nepalese">>
	<<set $args[0].accent = _naturalAccent>>
<<case "New Caledonian">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "a New Zealander">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Ni-Vanuatu">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Nicaraguan">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Nigerian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Hausa">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Nigerien">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Hausa">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Niuean">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Norwegian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Omani">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Pakistani">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Palauan">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Sonsorolese">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Tobian">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Japanese">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Palestinian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Panamanian">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Papua New Guinean">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Paraguayan">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Peruvian">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Polish">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Portuguese">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Puerto Rican">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Qatari">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Romanian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Russian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Rwandan">>
	<<if $language == "Kinyarwanda">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Sahrawi">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Saint Lucian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Salvadoran">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Sammarinese">>
	<<if $language == "Italian">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Samoan">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "São Toméan">>
	<<if $language == "Portuguese">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Saudi">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Scottish">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Senegalese">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Serbian">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Seychellois">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Sierra Leonean">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Singaporean">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Chinese">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Malay">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Tamil">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Slovak">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Slovene">>
	<<set $args[0].accent = _naturalAccent>>
<<case "a Solomon Islander">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Somali">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "South African">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Afrikaans">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "South Sudanese">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Spanish">>
	<<if $language == "Catalan">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Sri Lankan">>
	<<if $language == "Sinhalese">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Tamil">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Sudanese">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Surinamese">>
	<<if $language == "Dutch">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Swazi">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Swedish">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Finnish">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Norwegian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "German">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Swiss">>
	<<if $language == "German">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Italian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Syrian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Taiwanese">>
	<<if $language == "Chinese">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Tajik">>
	<<if $language == "Russian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Tanzanian">>
	<<if $language == "Swahili">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Thai">>
	<<if $language == "Chinese">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Malay">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<elseif $language == "Khmer">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Tibetan">>
	<<if $language == "Chinese">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Togolese">>
	<<if $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Tongan">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Trinidadian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Tunisian">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Turkish">>
	<<set $args[0].accent = _naturalAccent>>
<<case "Turkmen">>
	<<if $language == "Russian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Tuvaluan">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Ugandan">>
	<<if $language == "Swahili">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Ukrainian">>
	<<if $language == "Russian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Uruguayan">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Uzbek">>
	<<if $language == "Russian">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Vatican">>
	<<if $language == "Italian">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Venezuelan">>
	<<if $language == "Spanish">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Vietnamese">>
	<<if $language == "Chinese">>
		<<set $args[0].accent = either(0,1,2,2,2,3,3)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Vincentian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Yemeni">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Zairian">>
	<<if $language == "Lingala">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<elseif $language == "Kikongo">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "Swahili">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<elseif $language == "French">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Zambian">>
	<<if $language == "English">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Zimbabwean">>
	<<if $language == "English" && $args[0].race == "white">>
		<<set $args[0].accent = either(0,1,1,1,2)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Ancient Chinese Revivalist">>
	<<if $language == "Chinese">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Ancient Egyptian Revivalist">>
	<<if $language == "Ancient Egyptian">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Arabian Revivalist">>
	<<if $language == "Arabic">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Aztec Revivalist">>
	<<if $language == "Nahuatl">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Edo Revivalist">>
	<<if $language == "Japanese">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<case "Roman Revivalist">>
	<<if $language == "Latin">>
		<<set $args[0].accent = either(0,0,0,1)>>
	<<else>>
		<<set $args[0].accent = _naturalAccent>>
	<</if>>
<<default>>
	<<set $args[0].accent = _naturalAccent>>
<</switch>>

<<if $args[0].nationality == $language>>
	<<set $args[0].accent = either(0,0,0,1)>>
<</if>>

<</widget>>

/* Call as <<GenerateAge slave>> */
<<widget "GenerateAge">>

<<if $activeSlaveOneTimeMaxAge > 998>>
	<<if $pedo_mode == 1>>
		<<set $activeSlaveOneTimeMaxAge = 18>>
	<<else>>
		<<set $activeSlaveOneTimeMaxAge = 42>>
	<</if>>
<<elseif $pedo_mode == 1 && $one_time_age_overrides_pedo_mode == 0 && $activeSlaveOneTimeMaxAge > 18>>
	<<set $activeSlaveOneTimeMaxAge = 18>>
<</if>>
<<if $retirementAge < $activeSlaveOneTimeMaxAge>>
	<<set $activeSlaveOneTimeMaxAge = ($retirementAge-1)>>
<</if>>
<<if $activeSlaveOneTimeMinAge < $minimumSlaveAge>>
	<<set $activeSlaveOneTimeMinAge = $minimumSlaveAge>>
<<elseif $pedo_mode == 1 && $one_time_age_overrides_pedo_mode == 0>>
	<<set $activeSlaveOneTimeMinAge = $minimumSlaveAge>>
<</if>>
<<if $activeSlaveOneTimeMaxAge < $activeSlaveOneTimeMinAge>>
	<<set $activeSlaveOneTimeMaxAge = $activeSlaveOneTimeMinAge>>
<</if>>
<<if ($activeSlaveOneTimeMaxAge >= 30) && ($arcologies[0].FSMaturityPreferentialist != "unset")>>
	<<if $ageAdjustOverride != 1>>
		<<set $activeSlaveOneTimeMaxAge = ($activeSlaveOneTimeMaxAge + 10)>>
	<</if>>
<</if>>
<<set $args[0].actualAge = random($activeSlaveOneTimeMinAge,$activeSlaveOneTimeMaxAge)>>
<<set _secondAgeRoll = random($activeSlaveOneTimeMinAge,$activeSlaveOneTimeMaxAge)>>
<<if ($arcologies[0].FSYouthPreferentialist != "unset") && ($arcologies[0].FSYouthPreferentialist >= random(1,100))>>
	<<set $args[0].actualAge = Math.min($args[0].actualAge, _secondAgeRoll)>>
<<elseif ($arcologies[0].FSMaturityPreferentialist != "unset") && ($arcologies[0].FSMaturityPreferentialist >= random(1,100))>>
	<<set $args[0].actualAge = Math.max($args[0].actualAge, _secondAgeRoll)>>
<</if>>
<<if $args[0].actualAge >= $retirementAge>>
	<<set $args[0].actualAge = ($retirementAge-2)>>
<</if>>
<<set $activeSlaveOneTimeMinAge = 0>>
<<set $activeSlaveOneTimeMaxAge = 999>>
<<set $one_time_age_overrides_pedo_mode = 0>>
<<set $ageAdjustOverride = 0>>
<<set $args[0].visualAge = $args[0].actualAge>>
<<set $args[0].physicalAge = $args[0].actualAge>>
<<set $args[0].ovaryAge = $args[0].actualAge>>
<<set $args[0].age = $args[0].actualAge>> /*compatibility*/
<<set $args[0].pubertyAgeXX = $fertilityAge>>
<<set $args[0].pubertyAgeXY = $potencyAge>>

<</widget>>


code:
:: Summary Widgets [widget nobr]

/%
 Call as <<SlaveStatClamp $slave>>
%/
<<widget "SlaveStatClamp">>
<<run SlaveStatClamp($args[0]) >>
<</widget>>

repo_name: shoku/fc


code:
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/.idea.rjw-extra-patchs.iml
/projectSettingsUpdater.xml
/contentModel.xml
/modules.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

repo_name: RobTheRobotGuard/rjw

license: unknown


code:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>


code:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="UserContentModel">
    <attachedFolders />
    <explicitIncludes />
    <explicitExcludes />
  </component>
</project>


code:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="" vcs="Git" />
  </component>
</project>


code:
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
 <packageId>ROBTRG.RJWAditionalRacePatches</packageId>
 <name>RJW Extra Race Patchs</name>
 <author>RobTheRobotGuard</author>
 <supportedVersions>

1.4

1.5

 </supportedVersions>
 	<modDependencies>

			<packageId>rim.job.world</packageId>
			<displayName>RJW</displayName>
			<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
			<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>

			<packageId>asmr.rjw.racesupport</packageId>
			<displayName>RJWRaceSupport</displayName>
			<downloadUrl>https://gitgud.io/WinterKein/rjw-race-support/-/archive/RJW-5.5.0-Update/rjw-race-support-RJW-5.5.0-Update.zip</downloadUrl>

	</modDependencies>
	<loadAfter>

erdelf.HumanoidAlienRaces

rim.job.world

asmr.rjw.racesupport

	</loadAfter>
 <description>
No Description Sad Face
 </description>
</ModMetaData>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

	<rjw.HediffDef_SexPart ParentName="NaturalPrivatePartPenis">
		<defName>Fox_Bell_end</defName>
		Fox penis
		<labelNoun>a fox penis</labelNoun>
		<description>A fox penis. DEPRICATED</description>
		<descriptionHyperlinks><ThingDef>Fox_Bell_end</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>Fox_Bell_end</spawnThingOnRemoved>
	</rjw.HediffDef_SexPart>

	<rjw.HediffDef_SexPart ParentName="NaturalPrivatePartVagina">
		<defName>Fox_Couchie</defName>
		Fox vagina
		<labelNoun>a fox vagina</labelNoun>
		<description>A fox vagina. DEPRICATED</description>
		<descriptionHyperlinks><ThingDef>Fox_Couchie</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>Fox_Couchie</spawnThingOnRemoved>
	</rjw.HediffDef_SexPart>
</Defs>


code:
<Defs>
	<rjw.RacePartDef>
	<defName>Fox_Couchie</defName>
	<hediffName>Fox_Couchie</hediffName>
	</rjw.RacePartDef>

	<rjw.RacePartDef>
	<defName>Fox_Bell_end</defName>
	<hediffName>Fox_Bell_end</hediffName>
	</rjw.RacePartDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>SlugCatRaceGroup</defName>
        <raceNames>

OCARINA_SlugcatSurvivor

OCARINA_SlugcatMonk

OCARINA_SlugcatHunter

        </raceNames>
        <anuses>

FelineAnus

        </anuses>
        <femaleGenitals>

CatVagina

        </femaleGenitals>
        <maleGenitals>

CatPenis

        </maleGenitals>
        <tags>

Slime

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

    <rjw.RaceGroupDef Name="ROBTRGRainWorldRaceGroup" Abstract="True">
        <defName>RainWorldLizardBase</defName>
		<femaleGenitals>

CloacalVagina

		</femaleGenitals>

		<maleGenitals>

HemiPenis

		</maleGenitals>

		<anuses>

CloacalAnus

		</anuses>

		<tags>

Scales

		</tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>

		<oviPregnancy>true</oviPregnancy>
		<eggProgressUnfertilizedMax>0.5</eggProgressUnfertilizedMax>
		<eggLayIntervalDays>6</eggLayIntervalDays>
    </rjw.RaceGroupDef>

	<rjw.RaceGroupDef ParentName="ROBTRGRainWorldRaceGroup">
        <defName>RainWorldGreenLizard</defName>
		<raceNames>

OCARINA_GreenLizard

		</raceNames>
		<eggFertilizedDef>OCARINA_EggGreenLizardFertilized</eggFertilizedDef>
    </rjw.RaceGroupDef>

	<rjw.RaceGroupDef ParentName="ROBTRGRainWorldRaceGroup">
        <defName>RainWorldPinkLizard</defName>
		<raceNames>

OCARINA_PinkLizard

		</raceNames>
		<eggFertilizedDef>OCARINA_EggPinkLizardFertilized</eggFertilizedDef>

    </rjw.RaceGroupDef>

	<rjw.RaceGroupDef ParentName="ROBTRGRainWorldRaceGroup">
        <defName>RainWorldRedLizard</defName>
		<raceNames>

OCARINA_RedLizard

		</raceNames>
		<eggFertilizedDef>OCARINA_EggRedLizardFertilized</eggFertilizedDef>
    </rjw.RaceGroupDef>

	<rjw.RaceGroupDef>
		<defName>RainWorldLanternMouse</defName>
		<raceNames>

OCARINA_LanternMouse

		</raceNames>

		<anuses>

Anus

		</anuses>

		<femaleGenitals>

RodentVagina

		</femaleGenitals>

		<maleGenitals>

RodentPenis

		</maleGenitals>

		<tags>

Fur

		</tags>
	</rjw.RaceGroupDef>

	<rjw.RaceGroupDef>
		<defName>RainWorldLongLegs</defName>
		<raceNames>

OCARINA_DaddyLongLegsRace

OCARINA_BrotherLongLegsRace

		</raceNames>
		<anuses>

DemonAnus

		</anuses>
		<femaleGenitals>

DemonVagina

		</femaleGenitals>
		<maleGenitals>

DemonTentaclePenis

		</maleGenitals>
		<tags>

Demon

		</tags>
	</rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>AnthroRaceGroup</defName>
        <raceNames>

Anthro

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

GenericVagina

        </femaleGenitals>
        <maleGenitals>

GenericPenis

        </maleGenitals>
        <tags>

Fur

        </tags>
        <raceSexDrive>1</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>
    <rjw.RaceGroupDef>
        <defName>ArakkoaRaceRaceGroup</defName>
        <raceNames>

Alien_Arakkoa

        </raceNames>
        <anuses>

CloacalAnus

        </anuses>
        <femaleBreasts>

FeaturelessChest

        </femaleBreasts>
        <maleBreasts>

FeaturelessChest

        </maleBreasts>
        <femaleGenitals>

CloacalVagina

        </femaleGenitals>
        <maleGenitals>

CloacalPenis

        </maleGenitals>
        <tags>

feathers

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
		<oviPregnancy>false</oviPregnancy>
		<ImplantEggs>false</ImplantEggs>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>BunRaceGroup</defName>
        <raceNames>

Alien_BunTribe

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

RodentVagina

        </femaleGenitals>
        <maleGenitals>

RodentPenis

        </maleGenitals>
        <tags>

Fur

        </tags>
        <raceSexDrive>1.5</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<Defs>

    <rjw.RaceGroupDef>
        <defName>EponaRaceGroup</defName>
        <raceNames>

Alien_Epona

Alien_Destrier

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

HorseVagina

        </femaleGenitals>
        <maleGenitals>

HorsePenis

        </maleGenitals>
        <tags>

Skin

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>FrostyRaceRaceGroup</defName>
        <raceNames>

FrostyRace

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

DragonVagina

        </femaleGenitals>
        <maleGenitals>

DragonPenis

        </maleGenitals>
        <tags>

Scales

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>IrkenRaceGroup</defName>
        <raceNames>

IrkenRace

        </raceNames>
        <anuses>

InsectAnus

        </anuses>
        <femaleBreasts>

FeaturelessChest

        </femaleBreasts>
        <maleBreasts>

FeaturelessChest

        </maleBreasts>
        <femaleGenitals>

NarrowVagina

        </femaleGenitals>
        <maleGenitals>

NeedlePenis

        </maleGenitals>
        <tags>

Chitin

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<Defs>

    <rjw.RaceGroupDef>
        <defName>KaliaRaceGroup</defName>
        <raceNames>

Kalia

Prometheus_Kalia

Fallen

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

DogVagina

        </femaleGenitals>
        <maleGenitals>

DogPenis

        </maleGenitals>
        <tags>

Fur

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>KiiroRaceGroup</defName>
        <raceNames>

Kiiro_Race

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

CatVagina

        </femaleGenitals>
        <maleGenitals>

CatPenis

        </maleGenitals>
        <tags>

Fur

        </tags>
        <raceSexDrive>0.5</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>LucarioRaceGroup</defName>
        <raceNames>

DAKK_Riolu

DAKK_MegaLucario

DAKK_Lucario

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

DogVagina

        </femaleGenitals>
        <maleGenitals>

DogPenis

        </maleGenitals>
        <tags>

Fur

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>LupineWolfRaceGroup</defName>
        <raceNames>

AP_LupineBlackRace

AP_LupineGlisterRace

AP_LupineWhiteRace

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

DogVagina

        </femaleGenitals>
        <maleGenitals>

DogPenis

        </maleGenitals>
        <tags>

Fur

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>MaruRaceGroup</defName>
        <raceNames>

Maru

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

CatVagina

        </femaleGenitals>
        <maleGenitals>

CatPenis

        </maleGenitals>
        <tags>

Fur

        </tags>
        <raceSexDrive>0.5</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>MihoRaceGroup</defName>
		<anuses>

Petite_FoxGirl_Anus

		</anuses>
		<femaleBreasts>

Petite_FoxGirl_Breasts

		</femaleBreasts>
		<femaleGenitals>

Petite_FoxGirl_Vagina

		</femaleGenitals>
		<maleBreasts>

Breasts

		</maleBreasts>
		<maleGenitals>

DogPenis

		</maleGenitals>
		<tags>

Fur

		</tags>
        <raceSexDrive>1.2</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<Defs>

    <rjw.RaceGroupDef>
        <defName>MoonjellyRaceGroup</defName>
        <raceNames>

Moonjelly_Race

        </raceNames>
        <anuses>

SlimeAnus

        </anuses>
        <femaleBreasts>

SlimeBreasts

        </femaleBreasts>
        <maleBreasts>

SlimeBreasts

        </maleBreasts>
        <femaleGenitals>

SlimeVagina

        </femaleGenitals>
        <maleGenitals>

SlimeTentacles

        </maleGenitals>
        <tags>

Slime

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<Defs>

    <rjw.RaceGroupDef>
        <defName>MoosesianRaceGroup</defName>
        <raceNames>

Moosesian

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

HorseVagina

        </femaleGenitals>
        <maleGenitals>

HorsePenis

        </maleGenitals>
        <tags>

Skin

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8"?>
<Defs>

    <rjw.RaceGroupDef>
        <defName>NakinRaceRaceGroup</defName>
        <raceNames>

NakinRace

        </raceNames>
        <anuses>

CloacalAnus

        </anuses>
        <femaleBreasts>

FeaturelessChest

        </femaleBreasts>
        <maleBreasts>

FeaturelessChest

        </maleBreasts>
        <femaleGenitals>

CloacalVagina

        </femaleGenitals>
        <maleGenitals>

ReptilePenis

        </maleGenitals>
        <tags>

Scales

        </tags>
        <raceSexDrive>1.0</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
		<oviPregnancy>false</oviPregnancy>
		<ImplantEggs>false</ImplantEggs>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
	<rjw.RaceGroupDef>
		<defName>OtherKurins</defName>
		<raceNames>

Kimiri

Lilin

Kurin

MeowKurin

		</raceNames>
		<anuses>

Petite_FoxGirl_Anus

		</anuses>
		<femaleBreasts>

Petite_FoxGirl_Breasts

		</femaleBreasts>
		<femaleGenitals>

Petite_FoxGirl_Vagina

		</femaleGenitals>
		<maleBreasts>

Breasts

		</maleBreasts>
		<maleGenitals>

DogPenis

		</maleGenitals>
		<tags>

Fur

		</tags>
		<raceSexDrive>1.0</raceSexDrive>
		<hasSingleGender>false</hasSingleGender>
		<hasSexNeed>true</hasSexNeed>
		<hasFertility>true</hasFertility>
		<hasPregnancy>true</hasPregnancy>
		<oviPregnancy>false</oviPregnancy>
		<ImplantEggs>false</ImplantEggs>
	</rjw.RaceGroupDef>
</Defs>


code:
<Defs>

    <rjw.RaceGroupDef>
        <defName>YuranRaceGroup</defName>
        <raceNames>

Yuran_Race

Yuran_Race_Miko_BlackSnake

Yuran_Race_Miko

        </raceNames>
        <anuses>

Anus

        </anuses>
        <femaleBreasts>

Breasts

        </femaleBreasts>
        <maleBreasts>

Breasts

        </maleBreasts>
        <femaleGenitals>

RodentVagina

        </femaleGenitals>
        <maleGenitals>

RodentPenis

        </maleGenitals>
        <tags>

Fur

        </tags>
        <raceSexDrive>1.3</raceSexDrive>
        <hasSingleGender>false</hasSingleGender>
        <hasSexNeed>true</hasSexNeed>
        <hasFertility>true</hasFertility>
        <hasPregnancy>true</hasPregnancy>
    </rjw.RaceGroupDef>

</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
	<ThingDef ParentName="rjw_BodyPartNaturalBaseGenMale">
		<defName>Fox_Bell_end</defName>
		Fox Penis
		<description>A penis.</description>
		<statBases>
			<MarketValue>250</MarketValue>
			<Mass>0.16</Mass>
		</statBases>
	</ThingDef>

	<ThingDef ParentName="rjw_BodyPartNaturalBaseGenFemale">
		<defName>Fox_Couchie</defName>
		Fox Vagina
		<description>A vagina.</description>
		<statBases>
			<MarketValue>250</MarketValue>
			<Mass>0.10</Mass>
		</statBases>
	</ThingDef>
</Defs>


code:
<?xml version="1.0" encoding="UTF-8"?>
<Patch>
	<Operation Class="PatchOperationFindMod">
       <mods>

RJW Menstruation Cycle

       </mods>
	   <match Class="PatchOperationAdd">
		<xpath>/Defs/rjw.HediffDef_SexPart[defName="Fox_Couchie"]</xpath>
		<value>
			<comps>

					<maxCumCapacity>10</maxCumCapacity>
					<baseImplantationChanceFactor>1.0</baseImplantationChanceFactor>
					<basefertilizationChanceFactor>1.0</basefertilizationChanceFactor>
					<follicularIntervalDays>1800</follicularIntervalDays>
					<lutealIntervalDays>1800</lutealIntervalDays>
					<bleedingIntervalDays>9</bleedingIntervalDays>
					<recoveryIntervalDays>15</recoveryIntervalDays>
					<eggLifespanDays>3</eggLifespanDays>
					<wombTex>Womb/Womb</wombTex>
					<vagTex>Genitals/Vagina</vagTex>
					<concealedEstrus>true</concealedEstrus>

			</comps>
		</value>
	   </match>
	</Operation>
</Patch>


code:
This is for people who have older savefiles that use the old fox parts which have been removed from the master branch.

This branch will not be updated past the current version. Nor with any other RJW updates


code:
## Why does st not handle utmp entries?

Use the excellent tool of [utmp](http://git.suckless.org/utmp/) for this task.

## Some _random program_ complains that st is unknown/not recognised/unsupported/whatever!

It means that st doesn’t have any terminfo entry on your system. Chances are
you did not `make install`. If you just want to test it without installing it,
you can manually run `tic -sx st.info`.

## Nothing works, and nothing is said about an unknown terminal!

* Some programs just assume they’re running in xterm i.e. they don’t rely on
  terminfo. What you see is the current state of the “xterm compliance”.
* Some programs don’t complain about the lacking st description and default to
  another terminal. In that case see the question about terminfo.

## I get some weird glitches/visual bug on _random program_!

Try launching it with a different TERM: $ TERM=xterm myapp. toe(1) will give
you a list of available terminals, but you’ll most likely switch between xterm,
st or st-256color. The default value for TERM can be changed in config.h
(TNAME).

## How do I scroll back up?

Using a terminal multiplexer.

* `st -e tmux` using C-b [
* `st -e screen` using C-a ESC

## Why doesn't the Del key work in some programs?

Taken from the terminfo manpage:

	If the terminal has a keypad that transmits codes when the keys
	are pressed, this information can be given. Note that it is not
	possible to handle terminals where the keypad only works in
	local (this applies, for example, to the unshifted HP 2621 keys).
	If the keypad can be set to transmit or not transmit, give these
	codes as smkx and rmkx. Otherwise the keypad is assumed to
	always transmit.

In the st case smkx=E[?1hE= and rmkx=E[?1lE>, so it is mandatory that
applications which want to test against keypad keys send these
sequences.

But buggy applications (like bash and irssi, for example) don't do this. A fast
solution for them is to use the following command:

	$ printf '\033[?1h\033=' >/dev/tty

or
	$ tput smkx

In the case of bash, readline is used. Readline has a different note in its
manpage about this issue:

	enable-keypad (Off)
		When set to On, readline will try to enable the
		application keypad when it is called. Some systems
		need this to enable arrow keys.

Adding this option to your .inputrc will fix the keypad problem for all
applications using readline.

If you are using zsh, then read the zsh FAQ
<http://zsh.sourceforge.net/FAQ/zshfaq03.html#l25>:

	It should be noted that the O / [ confusion can occur with other keys
	such as Home and End. Some systems let you query the key sequences
	sent by these keys from the system's terminal database, terminfo.
	Unfortunately, the key sequences given there typically apply to the
	mode that is not the one zsh uses by default (it's the "application"
	mode rather than the "raw" mode). Explaining the use of terminfo is
	outside of the scope of this FAQ, but if you wish to use the key
	sequences given there you can tell the line editor to turn on
	"application" mode when it starts and turn it off when it stops:

		function zle-line-init () { echoti smkx }
		function zle-line-finish () { echoti rmkx }
		zle -N zle-line-init
		zle -N zle-line-finish

Putting these lines into your .zshrc will fix the problems.

## How can I use meta in 8bit mode?

St supports meta in 8bit mode, but the default terminfo entry doesn't
use this capability. If you want it, you have to use the 'st-meta' value
in TERM.

## I cannot compile st in OpenBSD

OpenBSD lacks librt, despite it being mandatory in POSIX
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html#tag_20_11_13>.
If you want to compile st for OpenBSD you have to remove -lrt from config.mk, and
st will compile without any loss of functionality, because all the functions are
included in libc on this platform.

## The Backspace Case

St is emulating the Linux way of handling backspace being delete and delete being
backspace.

This is an issue that was discussed in suckless mailing list
<http://lists.suckless.org/dev/1404/20697.html>. Here is why some old grumpy
terminal users wants its backspace to be how he feels it:

	Well, I am going to comment why I want to change the behaviour
	of this key. When ASCII was defined in 1968, communication
	with computers was done using punched cards, or hardcopy
	terminals (basically a typewriter machine connected with the
	computer using a serial port).  ASCII defines DELETE as 7F,
	because, in punched-card terms, it means all the holes of the
	card punched; it is thus a kind of 'physical delete'. In the
	same way, the BACKSPACE key was a non-destructive backspace,
	as on a typewriter.  So, if you wanted to delete a character,
	you had to BACKSPACE and then DELETE.  Another use of BACKSPACE
	was to type accented characters, for example 'a BACKSPACE `'.
	The VT100 had no BACKSPACE key; it was generated using the
	CONTROL key as another control character (CONTROL key sets to
	0 b7 b6 b5, so it converts H (code 0x48) into BACKSPACE (code
	0x08)), but it had a DELETE key in a similar position where
	the BACKSPACE key is located today on common PC keyboards.
	All the terminal emulators emulated the difference between
	these keys correctly: the backspace key generated a BACKSPACE
	(^H) and delete key generated a DELETE (^?).

	But a problem arose when Linus Torvalds wrote Linux. Unlike
	earlier terminals, the Linux virtual terminal (the terminal
	emulator integrated in the kernel) returned a DELETE when
	backspace was pressed, due to the VT100 having a DELETE key in
	the same position.  This created a lot of problems (see [1]
	and [2]). Since Linux has become the king, a lot of terminal
	emulators today generate a DELETE when the backspace key is
	pressed in order to avoid problems with Linux. The result is
	that the only way of generating a BACKSPACE on these systems
	is by using CONTROL + H. (I also think that emacs had an
	important point here because the CONTROL + H prefix is used
	in emacs in some commands (help commands).)

	From point of view of the kernel, you can change the key
	for deleting a previous character with stty erase. When you
	connect a real terminal into a machine you describe the type
	of terminal, so getty configures the correct value of stty
	erase for this terminal. In the case of terminal emulators,
	however, you don't have any getty that can set the correct
	value of stty erase, so you always get the default value.
	For this reason, it is necessary to add 'stty erase ^H' to your
	profile if you have changed the value of the backspace key.
	Of course, another solution is for st itself to modify the
	value of stty erase.  I usually have the inverse problem:
	when I connect to non-Unix machines, I have to press CONTROL +
	h to get a BACKSPACE. The inverse problem occurs when a user
	connects to my Unix machines from a different system with a
	correct backspace key.

	[1] http://www.ibb.net/~anne/keyboard.html
	[2] http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html

## But I really want the old grumpy behaviour of my terminal

Apply [1].

[1] http://st.suckless.org/patches/delkey

repo_name: saldejums/st

path: FAQ

license: mit


code:
A STATEMENT ON LEGACY SUPPORT

In the terminal world there is much cruft that comes from old and unsup‐
ported terminals that inherit incompatible modes  and  escape  sequences
which noone is able to know, except when he/she comes from that time and
developed a graphical vt100 emulator at that time.

One  goal  of  st is to only support what is really needed. When you en‐
counter a sequence which you really need, implement it.  But  while  you
are  at it,  do not add the other cruft you might encounter while sneek‐
ing at other terminal emulators. History has bloated them and  there  is
no real evidence that most of the sequences are used today.

Christoph Lohmann <20h@r-36.net>
2012-09-13T07:00:36.081271045+02:00

path: LEGACY


code:
# st - simple terminal
# See LICENSE file for copyright and license details.
.POSIX:

include config.mk

SRC = st.c x.c
OBJ = $(SRC:.c=.o)

all: options st

options:
	@echo st build options:
	@echo "CFLAGS  = $(STCFLAGS)"
	@echo "LDFLAGS = $(STLDFLAGS)"
	@echo "CC      = $(CC)"

config.h:
	cp config.def.h config.h

.c.o:
	$(CC) $(STCFLAGS) -c $<

st.o: config.h st.h win.h
x.o: arg.h st.h win.h

$(OBJ): config.h config.mk

st: $(OBJ)
	$(CC) -o $@ $(OBJ) $(STLDFLAGS)

clean:
	rm -f st $(OBJ) st-$(VERSION).tar.gz

dist: clean
	mkdir -p st-$(VERSION)
	cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\
		config.def.h st.info st.1 arg.h st.h win.h $(SRC)\
		st-$(VERSION)
	tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
	rm -rf st-$(VERSION)

install: st
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	cp -f st $(DESTDIR)$(PREFIX)/bin
	chmod 755 $(DESTDIR)$(PREFIX)/bin/st
	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
	sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
	chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
	tic -sx st.info
	@echo Please see the README file regarding the terminfo entry of st.

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/st
	rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1

.PHONY: all options clean dist install uninstall

path: Makefile


code:
st - simple terminal
--------------------
st is a simple terminal emulator for X which sucks less.

Requirements
------------
In order to build st you need the Xlib header files.

Installation
------------
Edit config.mk to match your local setup (st is installed into
the /usr/local namespace by default).

Afterwards enter the following command to build and install st (if
necessary as root):

    make clean install

Running st
----------
If you did not install st with make clean install, you must compile
the st terminfo entry with the following command:

    tic -sx st.info

See the man page for additional details.

Credits
-------
Based on Aurélien APTEL <aurelien dot aptel at gmail dot com> bt source code.

path: README


code:
vt emulation
------------

* double-height support

code & interface
----------------

* add a simple way to do multiplexing

drawing
-------
* add diacritics support to xdraws()
	* switch to a suckless font drawing library
* make the font cache simpler
* add better support for brightening of the upper colors

bugs
----

* fix shift up/down (shift selection in emacs)
* remove DEC test sequence when appropriate

misc
----

    $ grep -nE 'XXX|TODO' st.c

path: TODO


code:
/*
 * Copy me if you can.
 * by 20h
 */

#ifndef ARG_H__
#define ARG_H__

extern char *argv0;

/* use main(int argc, char *argv[]) */
#define ARGBEGIN	for (argv0 = *argv, argv++, argc--;\
					argv[0] && argv[0][0] == '-'\
					&& argv[0][1];\
					argc--, argv++) {\
				char argc_;\
				char **argv_;\
				int brk_;\
				if (argv[0][1] == '-' && argv[0][2] == '\0') {\
					argv++;\
					argc--;\
					break;\
				}\
				int i_;\
				for (i_ = 1, brk_ = 0, argv_ = argv;\
						argv[0][i_] && !brk_;\
						i_++) {\
					if (argv_ != argv)\
						break;\
					argc_ = argv[0][i_];\
					switch (argc_)

#define ARGEND			}\
			}

#define ARGC()		argc_

#define EARGF(x)	((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
				((x), abort(), (char *)0) :\
				(brk_ = 1, (argv[0][i_+1] != '\0')?\
					(&argv[0][i_+1]) :\
					(argc--, argv++, argv[0])))

#define ARGF()		((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
				(char *)0 :\
				(brk_ = 1, (argv[0][i_+1] != '\0')?\
					(&argv[0][i_+1]) :\
					(argc--, argv++, argv[0])))

#endif


code:
/* See LICENSE file for copyright and license details. */

/*
 * appearance
 *
 * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
 */
static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
static int borderpx = 2;

/*
 * What program is execed by st depends of these precedence rules:
 * 1: program passed with -e
 * 2: utmp option
 * 3: SHELL environment variable
 * 4: value of shell in /etc/passwd
 * 5: value of shell in config.h
 */
static char *shell = "/bin/sh";
char *utmp = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";

/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";

/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;

/*
 * word delimiter string
 *
 * More advanced example: " `'\"()[]{}"
 */
char *worddelimiters = " ";

/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;

/* alt screens */
int allowaltscreen = 1;

/* frames per second st should at maximum draw to the screen */
static unsigned int xfps = 120;
static unsigned int actionfps = 30;

/*
 * blinking timeout (set to 0 to disable blinking) for the terminal blinking
 * attribute.
 */
static unsigned int blinktimeout = 800;

/*
 * thickness of underline and bar cursors
 */
static unsigned int cursorthickness = 2;

/*
 * bell volume. It must be a value between -100 and 100. Use 0 for disabling
 * it
 */
static int bellvolume = 0;

/* default TERM value */
char *termname = "st-256color";

/*
 * spaces per tab
 *
 * When you are changing this value, don't forget to adapt the »it« value in
 * the st.info and appropriately install the st.info in the environment where
 * you use this st version.
 *
 *	it#$tabspaces,
 *
 * Secondly make sure your kernel is not expanding tabs. When running `stty
 * -a` »tab0« should appear. You can tell the terminal to not expand tabs by
 *  running following command:
 *
 *	stty tabs
 */
unsigned int tabspaces = 8;

/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
	/* 8 normal colors */
	"black",
	"red3",
	"green3",
	"yellow3",
	"blue2",
	"magenta3",
	"cyan3",
	"gray90",

	/* 8 bright colors */
	"gray50",
	"red",
	"green",
	"yellow",
	"#5c5cff",
	"magenta",
	"cyan",
	"white",

	[255] = 0,

	/* more colors can be added after 255 to use with DefaultXX */
	"#cccccc",
	"#555555",
};

/*
 * Default colors (colorname index)
 * foreground, background, cursor, reverse cursor
 */
unsigned int defaultfg = 7;
unsigned int defaultbg = 0;
static unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;

/*
 * Default shape of cursor
 * 2: Block ("█")
 * 4: Underline ("_")
 * 6: Bar ("|")
 * 7: Snowman ("☃")
 */
static unsigned int cursorshape = 2;

/*
 * Default columns and rows numbers
 */

static unsigned int cols = 80;
static unsigned int rows = 24;

/*
 * Default colour and shape of the mouse cursor
 */
static unsigned int mouseshape = XC_xterm;
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;

/*
 * Color used to display font attributes when fontconfig selected a font which
 * doesn't match the ones requested.
 */
static unsigned int defaultattr = 11;

/*
 * Xresources preferences to load at startup
 */
ResourcePref resources[] = {
		{ "font",         STRING,  &font },
		{ "color0",       STRING,  &colorname[0] },
		{ "color1",       STRING,  &colorname[1] },
		{ "color2",       STRING,  &colorname[2] },
		{ "color3",       STRING,  &colorname[3] },
		{ "color4",       STRING,  &colorname[4] },
		{ "color5",       STRING,  &colorname[5] },
		{ "color6",       STRING,  &colorname[6] },
		{ "color7",       STRING,  &colorname[7] },
		{ "color8",       STRING,  &colorname[8] },
		{ "color9",       STRING,  &colorname[9] },
		{ "color10",      STRING,  &colorname[10] },
		{ "color11",      STRING,  &colorname[11] },
		{ "color12",      STRING,  &colorname[12] },
		{ "color13",      STRING,  &colorname[13] },
		{ "color14",      STRING,  &colorname[14] },
		{ "color15",      STRING,  &colorname[15] },
		{ "background",   STRING,  &colorname[256] },
		{ "foreground",   STRING,  &colorname[257] },
		{ "cursorColor",  STRING,  &colorname[258] },
		{ "termname",     STRING,  &termname },
		{ "shell",        STRING,  &shell },
		{ "xfps",         INTEGER, &xfps },
		{ "actionfps",    INTEGER, &actionfps },
		{ "blinktimeout", INTEGER, &blinktimeout },
		{ "bellvolume",   INTEGER, &bellvolume },
		{ "tabspaces",    INTEGER, &tabspaces },
		{ "cwscale",      FLOAT,   &cwscale },
		{ "chscale",      FLOAT,   &chscale },
};

/*
 * Internal mouse shortcuts.
 * Beware that overloading Button1 will disable the selection.
 */
static MouseShortcut mshortcuts[] = {
	/* button               mask            string */
	{ Button4,              XK_NO_MOD,      "\031" },
	{ Button5,              XK_NO_MOD,      "\005" },
};

MouseKey mkeys[] = {
	/* button               mask            function        argument */
	{ Button4,              XK_NO_MOD,      kscrollup,      {.i =  1} },
	{ Button5,              XK_NO_MOD,      kscrolldown,    {.i =  1} },
};

/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)

static Shortcut shortcuts[] = {
	/* mask                 keysym          function        argument */
	{ XK_ANY_MOD,           XK_Break,       sendbreak,      {.i =  0} },
	{ ControlMask,          XK_Print,       toggleprinter,  {.i =  0} },
	{ ShiftMask,            XK_Print,       printscreen,    {.i =  0} },
	{ XK_ANY_MOD,           XK_Print,       printsel,       {.i =  0} },
	{ TERMMOD,              XK_Prior,       zoom,           {.f = +1} },
	{ TERMMOD,              XK_Next,        zoom,           {.f = -1} },
	{ TERMMOD,              XK_Home,        zoomreset,      {.f =  0} },
	{ TERMMOD,              XK_C,           clipcopy,       {.i =  0} },
	{ TERMMOD,              XK_V,           clippaste,      {.i =  0} },
	{ TERMMOD,              XK_Y,           selpaste,       {.i =  0} },
	{ TERMMOD,              XK_Num_Lock,    numlock,        {.i =  0} },
	{ TERMMOD,              XK_I,           iso14755,       {.i =  0} },
	{ ShiftMask,            XK_Page_Up,     kscrollup,      {.i = -1} },
	{ ShiftMask,            XK_Page_Down,   kscrolldown,    {.i = -1} },
};

/*
 * Special keys (change & recompile st.info accordingly)
 *
 * Mask value:
 * * Use XK_ANY_MOD to match the key no matter modifiers state
 * * Use XK_NO_MOD to match the key alone (no modifiers)
 * appkey value:
 * * 0: no value
 * * > 0: keypad application mode enabled
 * *   = 2: term.numlock = 1
 * * < 0: keypad application mode disabled
 * appcursor value:
 * * 0: no value
 * * > 0: cursor application mode enabled
 * * < 0: cursor application mode disabled
 * crlf value
 * * 0: no value
 * * > 0: crlf mode is enabled
 * * < 0: crlf mode is disabled
 *
 * Be careful with the order of the definitions because st searches in
 * this table sequentially, so any XK_ANY_MOD must be in the last
 * position for a key.
 */

/*
 * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
 * to be mapped below, add them to this array.
 */
static KeySym mappedkeys[] = { -1 };

/*
 * State bits to ignore when matching key or button events.  By default,
 * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
 */
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;

/*
 * Override mouse-select while mask is active (when MODE_MOUSE is set).
 * Note that if you want to use ShiftMask with selmasks, set this to an other
 * modifier, set to 0 to not use it.
 */
static uint forceselmod = ShiftMask;

/*
 * This is the huge key array which defines all compatibility to the Linux
 * world. Please decide about changes wisely.
 */
static Key key[] = {
	/* keysym           mask            string      appkey appcursor */
	{ XK_KP_Home,       ShiftMask,      "\033[2J",       0,   -1},
	{ XK_KP_Home,       ShiftMask,      "\033[1;2H",     0,   +1},
	{ XK_KP_Home,       XK_ANY_MOD,     "\033[H",        0,   -1},
	{ XK_KP_Home,       XK_ANY_MOD,     "\033[1~",       0,   +1},
	{ XK_KP_Up,         XK_ANY_MOD,     "\033Ox",       +1,    0},
	{ XK_KP_Up,         XK_ANY_MOD,     "\033[A",        0,   -1},
	{ XK_KP_Up,         XK_ANY_MOD,     "\033OA",        0,   +1},
	{ XK_KP_Down,       XK_ANY_MOD,     "\033Or",       +1,    0},
	{ XK_KP_Down,       XK_ANY_MOD,     "\033[B",        0,   -1},
	{ XK_KP_Down,       XK_ANY_MOD,     "\033OB",        0,   +1},
	{ XK_KP_Left,       XK_ANY_MOD,     "\033Ot",       +1,    0},
	{ XK_KP_Left,       XK_ANY_MOD,     "\033[D",        0,   -1},
	{ XK_KP_Left,       XK_ANY_MOD,     "\033OD",        0,   +1},
	{ XK_KP_Right,      XK_ANY_MOD,     "\033Ov",       +1,    0},
	{ XK_KP_Right,      XK_ANY_MOD,     "\033[C",        0,   -1},
	{ XK_KP_Right,      XK_ANY_MOD,     "\033OC",        0,   +1},
	{ XK_KP_Prior,      ShiftMask,      "\033[5;2~",     0,    0},
	{ XK_KP_Prior,      XK_ANY_MOD,     "\033[5~",       0,    0},
	{ XK_KP_Begin,      XK_ANY_MOD,     "\033[E",        0,    0},
	{ XK_KP_End,        ControlMask,    "\033[J",       -1,    0},
	{ XK_KP_End,        ControlMask,    "\033[1;5F",    +1,    0},
	{ XK_KP_End,        ShiftMask,      "\033[K",       -1,    0},
	{ XK_KP_End,        ShiftMask,      "\033[1;2F",    +1,    0},
	{ XK_KP_End,        XK_ANY_MOD,     "\033[4~",       0,    0},
	{ XK_KP_Next,       ShiftMask,      "\033[6;2~",     0,    0},
	{ XK_KP_Next,       XK_ANY_MOD,     "\033[6~",       0,    0},
	{ XK_KP_Insert,     ShiftMask,      "\033[2;2~",    +1,    0},
	{ XK_KP_Insert,     ShiftMask,      "\033[4l",      -1,    0},
	{ XK_KP_Insert,     ControlMask,    "\033[L",       -1,    0},
	{ XK_KP_Insert,     ControlMask,    "\033[2;5~",    +1,    0},
	{ XK_KP_Insert,     XK_ANY_MOD,     "\033[4h",      -1,    0},
	{ XK_KP_Insert,     XK_ANY_MOD,     "\033[2~",      +1,    0},
	{ XK_KP_Delete,     ControlMask,    "\033[M",       -1,    0},
	{ XK_KP_Delete,     ControlMask,    "\033[3;5~",    +1,    0},
	{ XK_KP_Delete,     ShiftMask,      "\033[2K",      -1,    0},
	{ XK_KP_Delete,     ShiftMask,      "\033[3;2~",    +1,    0},
	{ XK_KP_Delete,     XK_ANY_MOD,     "\033[P",       -1,    0},
	{ XK_KP_Delete,     XK_ANY_MOD,     "\033[3~",      +1,    0},
	{ XK_KP_Multiply,   XK_ANY_MOD,     "\033Oj",       +2,    0},
	{ XK_KP_Add,        XK_ANY_MOD,     "\033Ok",       +2,    0},
	{ XK_KP_Enter,      XK_ANY_MOD,     "\033OM",       +2,    0},
	{ XK_KP_Enter,      XK_ANY_MOD,     "\r",           -1,    0},
	{ XK_KP_Subtract,   XK_ANY_MOD,     "\033Om",       +2,    0},
	{ XK_KP_Decimal,    XK_ANY_MOD,     "\033On",       +2,    0},
	{ XK_KP_Divide,     XK_ANY_MOD,     "\033Oo",       +2,    0},
	{ XK_KP_0,          XK_ANY_MOD,     "\033Op",       +2,    0},
	{ XK_KP_1,          XK_ANY_MOD,     "\033Oq",       +2,    0},
	{ XK_KP_2,          XK_ANY_MOD,     "\033Or",       +2,    0},
	{ XK_KP_3,          XK_ANY_MOD,     "\033Os",       +2,    0},
	{ XK_KP_4,          XK_ANY_MOD,     "\033Ot",       +2,    0},
	{ XK_KP_5,          XK_ANY_MOD,     "\033Ou",       +2,    0},
	{ XK_KP_6,          XK_ANY_MOD,     "\033Ov",       +2,    0},
	{ XK_KP_7,          XK_ANY_MOD,     "\033Ow",       +2,    0},
	{ XK_KP_8,          XK_ANY_MOD,     "\033Ox",       +2,    0},
	{ XK_KP_9,          XK_ANY_MOD,     "\033Oy",       +2,    0},
	{ XK_Up,            ShiftMask,      "\033[1;2A",     0,    0},
	{ XK_Up,            Mod1Mask,       "\033[1;3A",     0,    0},
	{ XK_Up,         ShiftMask|Mod1Mask,"\033[1;4A",     0,    0},
	{ XK_Up,            ControlMask,    "\033[1;5A",     0,    0},
	{ XK_Up,      ShiftMask|ControlMask,"\033[1;6A",     0,    0},
	{ XK_Up,       ControlMask|Mod1Mask,"\033[1;7A",     0,    0},
	{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A",  0,    0},
	{ XK_Up,            XK_ANY_MOD,     "\033[A",        0,   -1},
	{ XK_Up,            XK_ANY_MOD,     "\033OA",        0,   +1},
	{ XK_Down,          ShiftMask,      "\033[1;2B",     0,    0},
	{ XK_Down,          Mod1Mask,       "\033[1;3B",     0,    0},
	{ XK_Down,       ShiftMask|Mod1Mask,"\033[1;4B",     0,    0},
	{ XK_Down,          ControlMask,    "\033[1;5B",     0,    0},
	{ XK_Down,    ShiftMask|ControlMask,"\033[1;6B",     0,    0},
	{ XK_Down,     ControlMask|Mod1Mask,"\033[1;7B",     0,    0},
	{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0,    0},
	{ XK_Down,          XK_ANY_MOD,     "\033[B",        0,   -1},
	{ XK_Down,          XK_ANY_MOD,     "\033OB",        0,   +1},
	{ XK_Left,          ShiftMask,      "\033[1;2D",     0,    0},
	{ XK_Left,          Mod1Mask,       "\033[1;3D",     0,    0},
	{ XK_Left,       ShiftMask|Mod1Mask,"\033[1;4D",     0,    0},
	{ XK_Left,          ControlMask,    "\033[1;5D",     0,    0},
	{ XK_Left,    ShiftMask|ControlMask,"\033[1;6D",     0,    0},
	{ XK_Left,     ControlMask|Mod1Mask,"\033[1;7D",     0,    0},
	{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0,    0},
	{ XK_Left,          XK_ANY_MOD,     "\033[D",        0,   -1},
	{ XK_Left,          XK_ANY_MOD,     "\033OD",        0,   +1},
	{ XK_Right,         ShiftMask,      "\033[1;2C",     0,    0},
	{ XK_Right,         Mod1Mask,       "\033[1;3C",     0,    0},
	{ XK_Right,      ShiftMask|Mod1Mask,"\033[1;4C",     0,    0},
	{ XK_Right,         ControlMask,    "\033[1;5C",     0,    0},
	{ XK_Right,   ShiftMask|ControlMask,"\033[1;6C",     0,    0},
	{ XK_Right,    ControlMask|Mod1Mask,"\033[1;7C",     0,    0},
	{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0,   0},
	{ XK_Right,         XK_ANY_MOD,     "\033[C",        0,   -1},
	{ XK_Right,         XK_ANY_MOD,     "\033OC",        0,   +1},
	{ XK_ISO_Left_Tab,  ShiftMask,      "\033[Z",        0,    0},
	{ XK_Return,        Mod1Mask,       "\033\r",        0,    0},
	{ XK_Return,        XK_ANY_MOD,     "\r",            0,    0},
	{ XK_Insert,        ShiftMask,      "\033[4l",      -1,    0},
	{ XK_Insert,        ShiftMask,      "\033[2;2~",    +1,    0},
	{ XK_Insert,        ControlMask,    "\033[L",       -1,    0},
	{ XK_Insert,        ControlMask,    "\033[2;5~",    +1,    0},
	{ XK_Insert,        XK_ANY_MOD,     "\033[4h",      -1,    0},
	{ XK_Insert,        XK_ANY_MOD,     "\033[2~",      +1,    0},
	{ XK_Delete,        ControlMask,    "\033[M",       -1,    0},
	{ XK_Delete,        ControlMask,    "\033[3;5~",    +1,    0},
	{ XK_Delete,        ShiftMask,      "\033[2K",      -1,    0},
	{ XK_Delete,        ShiftMask,      "\033[3;2~",    +1,    0},
	{ XK_Delete,        XK_ANY_MOD,     "\033[P",       -1,    0},
	{ XK_Delete,        XK_ANY_MOD,     "\033[3~",      +1,    0},
	{ XK_BackSpace,     XK_NO_MOD,      "\177",          0,    0},
	{ XK_BackSpace,     Mod1Mask,       "\033\177",      0,    0},
	{ XK_Home,          ShiftMask,      "\033[2J",       0,   -1},
	{ XK_Home,          ShiftMask,      "\033[1;2H",     0,   +1},
	{ XK_Home,          XK_ANY_MOD,     "\033[H",        0,   -1},
	{ XK_Home,          XK_ANY_MOD,     "\033[1~",       0,   +1},
	{ XK_End,           ControlMask,    "\033[J",       -1,    0},
	{ XK_End,           ControlMask,    "\033[1;5F",    +1,    0},
	{ XK_End,           ShiftMask,      "\033[K",       -1,    0},
	{ XK_End,           ShiftMask,      "\033[1;2F",    +1,    0},
	{ XK_End,           XK_ANY_MOD,     "\033[4~",       0,    0},
	{ XK_Prior,         ControlMask,    "\033[5;5~",     0,    0},
	{ XK_Prior,         ShiftMask,      "\033[5;2~",     0,    0},
	{ XK_Prior,         XK_ANY_MOD,     "\033[5~",       0,    0},
	{ XK_Next,          ControlMask,    "\033[6;5~",     0,    0},
	{ XK_Next,          ShiftMask,      "\033[6;2~",     0,    0},
	{ XK_Next,          XK_ANY_MOD,     "\033[6~",       0,    0},
	{ XK_F1,            XK_NO_MOD,      "\033OP" ,       0,    0},
	{ XK_F1, /* F13 */  ShiftMask,      "\033[1;2P",     0,    0},
	{ XK_F1, /* F25 */  ControlMask,    "\033[1;5P",     0,    0},
	{ XK_F1, /* F37 */  Mod4Mask,       "\033[1;6P",     0,    0},
	{ XK_F1, /* F49 */  Mod1Mask,       "\033[1;3P",     0,    0},
	{ XK_F1, /* F61 */  Mod3Mask,       "\033[1;4P",     0,    0},
	{ XK_F2,            XK_NO_MOD,      "\033OQ" ,       0,    0},
	{ XK_F2, /* F14 */  ShiftMask,      "\033[1;2Q",     0,    0},
	{ XK_F2, /* F26 */  ControlMask,    "\033[1;5Q",     0,    0},
	{ XK_F2, /* F38 */  Mod4Mask,       "\033[1;6Q",     0,    0},
	{ XK_F2, /* F50 */  Mod1Mask,       "\033[1;3Q",     0,    0},
	{ XK_F2, /* F62 */  Mod3Mask,       "\033[1;4Q",     0,    0},
	{ XK_F3,            XK_NO_MOD,      "\033OR" ,       0,    0},
	{ XK_F3, /* F15 */  ShiftMask,      "\033[1;2R",     0,    0},
	{ XK_F3, /* F27 */  ControlMask,    "\033[1;5R",     0,    0},
	{ XK_F3, /* F39 */  Mod4Mask,       "\033[1;6R",     0,    0},
	{ XK_F3, /* F51 */  Mod1Mask,       "\033[1;3R",     0,    0},
	{ XK_F3, /* F63 */  Mod3Mask,       "\033[1;4R",     0,    0},
	{ XK_F4,            XK_NO_MOD,      "\033OS" ,       0,    0},
	{ XK_F4, /* F16 */  ShiftMask,      "\033[1;2S",     0,    0},
	{ XK_F4, /* F28 */  ControlMask,    "\033[1;5S",     0,    0},
	{ XK_F4, /* F40 */  Mod4Mask,       "\033[1;6S",     0,    0},
	{ XK_F4, /* F52 */  Mod1Mask,       "\033[1;3S",     0,    0},
	{ XK_F5,            XK_NO_MOD,      "\033[15~",      0,    0},
	{ XK_F5, /* F17 */  ShiftMask,      "\033[15;2~",    0,    0},
	{ XK_F5, /* F29 */  ControlMask,    "\033[15;5~",    0,    0},
	{ XK_F5, /* F41 */  Mod4Mask,       "\033[15;6~",    0,    0},
	{ XK_F5, /* F53 */  Mod1Mask,       "\033[15;3~",    0,    0},
	{ XK_F6,            XK_NO_MOD,      "\033[17~",      0,    0},
	{ XK_F6, /* F18 */  ShiftMask,      "\033[17;2~",    0,    0},
	{ XK_F6, /* F30 */  ControlMask,    "\033[17;5~",    0,    0},
	{ XK_F6, /* F42 */  Mod4Mask,       "\033[17;6~",    0,    0},
	{ XK_F6, /* F54 */  Mod1Mask,       "\033[17;3~",    0,    0},
	{ XK_F7,            XK_NO_MOD,      "\033[18~",      0,    0},
	{ XK_F7, /* F19 */  ShiftMask,      "\033[18;2~",    0,    0},
	{ XK_F7, /* F31 */  ControlMask,    "\033[18;5~",    0,    0},
	{ XK_F7, /* F43 */  Mod4Mask,       "\033[18;6~",    0,    0},
	{ XK_F7, /* F55 */  Mod1Mask,       "\033[18;3~",    0,    0},
	{ XK_F8,            XK_NO_MOD,      "\033[19~",      0,    0},
	{ XK_F8, /* F20 */  ShiftMask,      "\033[19;2~",    0,    0},
	{ XK_F8, /* F32 */  ControlMask,    "\033[19;5~",    0,    0},
	{ XK_F8, /* F44 */  Mod4Mask,       "\033[19;6~",    0,    0},
	{ XK_F8, /* F56 */  Mod1Mask,       "\033[19;3~",    0,    0},
	{ XK_F9,            XK_NO_MOD,      "\033[20~",      0,    0},
	{ XK_F9, /* F21 */  ShiftMask,      "\033[20;2~",    0,    0},
	{ XK_F9, /* F33 */  ControlMask,    "\033[20;5~",    0,    0},
	{ XK_F9, /* F45 */  Mod4Mask,       "\033[20;6~",    0,    0},
	{ XK_F9, /* F57 */  Mod1Mask,       "\033[20;3~",    0,    0},
	{ XK_F10,           XK_NO_MOD,      "\033[21~",      0,    0},
	{ XK_F10, /* F22 */ ShiftMask,      "\033[21;2~",    0,    0},
	{ XK_F10, /* F34 */ ControlMask,    "\033[21;5~",    0,    0},
	{ XK_F10, /* F46 */ Mod4Mask,       "\033[21;6~",    0,    0},
	{ XK_F10, /* F58 */ Mod1Mask,       "\033[21;3~",    0,    0},
	{ XK_F11,           XK_NO_MOD,      "\033[23~",      0,    0},
	{ XK_F11, /* F23 */ ShiftMask,      "\033[23;2~",    0,    0},
	{ XK_F11, /* F35 */ ControlMask,    "\033[23;5~",    0,    0},
	{ XK_F11, /* F47 */ Mod4Mask,       "\033[23;6~",    0,    0},
	{ XK_F11, /* F59 */ Mod1Mask,       "\033[23;3~",    0,    0},
	{ XK_F12,           XK_NO_MOD,      "\033[24~",      0,    0},
	{ XK_F12, /* F24 */ ShiftMask,      "\033[24;2~",    0,    0},
	{ XK_F12, /* F36 */ ControlMask,    "\033[24;5~",    0,    0},
	{ XK_F12, /* F48 */ Mod4Mask,       "\033[24;6~",    0,    0},
	{ XK_F12, /* F60 */ Mod1Mask,       "\033[24;3~",    0,    0},
	{ XK_F13,           XK_NO_MOD,      "\033[1;2P",     0,    0},
	{ XK_F14,           XK_NO_MOD,      "\033[1;2Q",     0,    0},
	{ XK_F15,           XK_NO_MOD,      "\033[1;2R",     0,    0},
	{ XK_F16,           XK_NO_MOD,      "\033[1;2S",     0,    0},
	{ XK_F17,           XK_NO_MOD,      "\033[15;2~",    0,    0},
	{ XK_F18,           XK_NO_MOD,      "\033[17;2~",    0,    0},
	{ XK_F19,           XK_NO_MOD,      "\033[18;2~",    0,    0},
	{ XK_F20,           XK_NO_MOD,      "\033[19;2~",    0,    0},
	{ XK_F21,           XK_NO_MOD,      "\033[20;2~",    0,    0},
	{ XK_F22,           XK_NO_MOD,      "\033[21;2~",    0,    0},
	{ XK_F23,           XK_NO_MOD,      "\033[23;2~",    0,    0},
	{ XK_F24,           XK_NO_MOD,      "\033[24;2~",    0,    0},
	{ XK_F25,           XK_NO_MOD,      "\033[1;5P",     0,    0},
	{ XK_F26,           XK_NO_MOD,      "\033[1;5Q",     0,    0},
	{ XK_F27,           XK_NO_MOD,      "\033[1;5R",     0,    0},
	{ XK_F28,           XK_NO_MOD,      "\033[1;5S",     0,    0},
	{ XK_F29,           XK_NO_MOD,      "\033[15;5~",    0,    0},
	{ XK_F30,           XK_NO_MOD,      "\033[17;5~",    0,    0},
	{ XK_F31,           XK_NO_MOD,      "\033[18;5~",    0,    0},
	{ XK_F32,           XK_NO_MOD,      "\033[19;5~",    0,    0},
	{ XK_F33,           XK_NO_MOD,      "\033[20;5~",    0,    0},
	{ XK_F34,           XK_NO_MOD,      "\033[21;5~",    0,    0},
	{ XK_F35,           XK_NO_MOD,      "\033[23;5~",    0,    0},
};

/*
 * Selection types' masks.
 * Use the same masks as usual.
 * Button1Mask is always unset, to make masks match between ButtonPress.
 * ButtonRelease and MotionNotify.
 * If no match is found, regular selection is used.
 */
static uint selmasks[] = {
	[SEL_RECTANGULAR] = Mod1Mask,
};

/*
 * Printable characters in ASCII, used to estimate the advance width
 * of single wide characters.
 */
static char ascii_printable[] =
	" !\"#$%&'()*+,-./0123456789:;<=>?"
	"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
	"`abcdefghijklmnopqrstuvwxyz{|}~";