code:
:: miscSecExpWidgets [widget nobr]

<<widget "calcInitialTrade">>
	<<set _initialTrade = random(20,30)>>
	<<if $terrain == "urban">>
		<<set _initialTrade += random(10)>>
	<</if>>
	<<if $terrain == "ravine">>
		<<set _initialTrade -= random(5)>>
	<</if>>
	<<if $PC.career == "wealth" || $PC.career == "capitalist" || $PC.career == "celebrity">>
		<<set _initialTrade += random(5)>>
	<<elseif $PC.career == "escort" || $PC.career == "servant" || $PC.career == "gang">>
		<<set _initialTrade -= random(5)>>
	<</if>>
	<<set $trade = _initialTrade>>
<</widget>>

<<widget "recalcManpower">>
	<<if $wasToggledBefore == 0>>
		<<if $mercenaries == 1>>
			<<set $mercFreeManpower = random(5,20)>>
		<<elseif $mercenaries > 1>>
			<<set $mercFreeManpower = random(10,30)>>
		<</if>>
	<</if>>

	<<set _correctEmployedMP = 0>>
	<<for _i = 0; _i < $slaveUnits.length; _i++>>
		<<set _correctEmployedMP += $slaveUnits[_i].troops>>
	<</for>>

	<<if $slavesEmployedManpower != _correctEmployedMP>>
		<<set $slavesEmployedManpower = _correctEmployedMP>>
	<</if>>

	<<set _correctEmployedMP = 0>>
	<<for _i = 0; _i < $militiaUnits.length; _i++>>
		<<set _correctEmployedMP += $militiaUnits[_i].troops>>
	<</for>>

	<<if $militiaEmployedManpower != _correctEmployedMP>>
		<<set $militiaEmployedManpower = _correctEmployedMP>>
	<</if>>

	<<set _correctEmployedMP = 0>>
	<<for _i = 0; _i < $mercUnits.length; _i++>>
		<<set _correctEmployedMP += $mercUnits[_i].troops>>
	<</for>>

	<<if $mercEmployedManpower != _correctEmployedMP>>
		<<set $mercEmployedManpower = _correctEmployedMP>>
	<</if>>

	<<set $militiaTotalManpower = $militiaEmployedManpower + $militiaFreeManpower>>
	<<set $mercTotalManpower = $mercEmployedManpower + $mercFreeManpower>>
<</widget>>

<<widget "recalcSecRestPoint">>
	<<set _newRest = 0>>
	<<set _baseRest = 30>>
	<<if $secUpgrades.nanoCams == 1>>
		<<set _newRest += 15>>
	<</if>>
	<<if $secUpgrades.cyberBots == 1>>
		<<set _newRest += 15>>
	<</if>>
	<<if $secUpgrades.eyeScan == 1>>
		<<set _newRest += 20>>
	<</if>>
	<<if $secUpgrades.cryptoAnalyzer == 1>>
		<<set _newRest += 20>>
	<</if>>
	<<set _newRest += _baseRest>>
	<<set $secRestPoint = _newRest>>
<</widget>>

<<widget "recalcCrimeCap">>
	<<set _baseCap = 100>>
	<<set _newCap = _baseCap>>
	<<if $crimeUpgrades.autoTrial == 1>>
		<<set _newCap -= 10>>
	<</if>>
	<<if $crimeUpgrades.autoArchive == 1>>
		<<set _newCap -= 10>>
	<</if>>
	<<if $crimeUpgrades.worldProfiler == 1>>
		<<set _newCap -= 15>>
	<</if>>
	<<if $crimeUpgrades.advForensic == 1>>
		<<set _newCap -= 15>>
	<</if>>
	<<set $crimeCap = _newCap>>
<</widget>>

<<widget "recalcReqHelots">>
	<<set _newReq = 0>>
	<<set _baseReq = 20>>
	<<if $secUpgrades.nanoCams == 1>>
		<<set _newReq += 5>>
	<</if>>
	<<if $secUpgrades.cyberBots == 1>>
		<<set _newReq += 5>>
	<</if>>
	<<if $secUpgrades.eyeScan == 1>>
		<<set _newReq += 10>>
	<</if>>
	<<if $secUpgrades.cryptoAnalyzer == 1>>
		<<set _newReq += 10>>
	<</if>>
	<<if $crimeUpgrades.autoTrial == 1>>
		<<set _newReq += 5>>
	<</if>>
	<<if $crimeUpgrades.autoArchive == 1>>
		<<set _newReq += 5>>
	<</if>>
	<<if $crimeUpgrades.worldProfiler == 1>>
		<<set _newReq += 10>>
	<</if>>
	<<if $crimeUpgrades.advForensic == 1>>
		<<set _newReq += 10>>
	<</if>>
	<<if $intelUpgrades.sensors == 1>>
		<<set _newReq += 5>>
	<</if>>
	<<if $intelUpgrades.signalIntercept == 1>>
		<<set _newReq += 5>>
	<</if>>
	<<if $intelUpgrades.radar == 1>>
		<<set _newReq += 10>>
	<</if>>
	<<if $readinessUpgrades.rapidVehicles == 1>>
		<<set _newReq += 5>>
	<</if>>
	<<if $readinessUpgrades.rapidPlatforms == 1>>
		<<set _newReq += 10>>
	<</if>>
	<<if $readinessUpgrades.earlyWarn == 1>>
		<<set _newReq += 10>>
	<</if>>
	<<if $SFSupportLevel >= 1>>
		<<set _newReq -= 5 * $SFSupportLevel>>
	<</if>>
	<<if $secUpgrades.coldstorage >= 1>>
		<<set _newReq -= 10 * $secUpgrades.coldstorage>>
	<</if>>
	<<set _newReq += _baseReq>>
	<<set $reqHelots = _newReq>>
<</widget>>

<<widget "recalcEdictsUpkeep">>
	/* authority cost */
	<<set _newAuthUpkeep = 0>>

	<<if $sellData == 1>>
		<<set _newAuthUpkeep += 10>>
	<</if>>

	<<if $slaveSoldierPrivilege == 1>>
		<<set _newAuthUpkeep += 10>>
	<</if>>

	<<if $weaponsLaw == 0>>
		<<set _newAuthUpkeep += 30>>
	<<elseif $weaponsLaw == 2>>
		<<set _newAuthUpkeep += 10>>
	<<elseif $weaponsLaw == 1>>
		<<set _newAuthUpkeep += 20>>
	<</if>>

	<<if $slavesOfficers == 1>>
		<<set _newAuthUpkeep += 10>>
	<</if>>

	/* cash cost */
	<<set _newUpkeep = 0>>

	<<if $slaveWatch == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<if $subsidyChurch == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<if $martialSchool == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<if $legionTradition == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<if $pharaonTradition == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<if $eagleWarriors == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<if $ronin == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<if $mamluks == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<if $sunTzu == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<if $tradeLegalAid == 1>>
		<<set _newUpkeep += 1000>>
	<</if>>

	<<set $edictsUpkeep = _newUpkeep>>
	<<set $edictsAuthUpkeep = _newAuthUpkeep>>
<</widget>>

<<widget "recalcUnits">>
	<<set $maxUnits = 6 + $secBarracksUpgrades.size * 2>>
	<<set $activeUnits = $militiaUnits.length + $slaveUnits.length + $mercUnits.length>>
<</widget>>

<<widget "fixBrokenUnits">>
	<<if $secBots.maxTroops < 30>>

Fixed security bots wrong max troop count.
		<<set $secBots.maxTroops = 30>>
	<</if>>
	<<if !isInt($secBots.troops)>>

Fixed security bots wrong max troop count.
		<<set $secBots.troops = $secBots.maxTroops>>
	<</if>>
	<<if $secBots.troops > 0 && $secBots.active != 1>>

Fixed security bots wrong "active" flag.
		<<set $secBots.active = 1>>
	<</if>>

	<<for _i = 0; _i < $militiaUnits.length; _i++>>
		<<if ndef $militiaUnits[_i].SF>>

Set militia missing flag
			<<set $militiaUnits[_i].SF = 0>>
		<</if>>
		<<if ndef $militiaUnits[_i].ID>>

Set militia missing ID
			<<generateUnitID $militiaUnits[_i]>>
		<</if>>
		<<if ndef $militiaUnits[_i].commissars>>

Set militia missing flag
			<<set $militiaUnits[_i].commissars = 0>>
		<</if>>
		<<if $militiaUnits[_i].maxTroops < 30>>

Fixed militia unit wrong max troop count.
			<<set $militiaUnits[_i].maxTroops = 30>>
		<</if>>
		<<if !isInt($militiaUnits[_i].troops)>>
			<<set $militiaUnits[_i].troops = $militiaUnits[_i].maxTroops>>

Fixed militia unit wrong troop count.
		<</if>>
		<<if $militiaUnits[_i].troops > 0 && $militiaUnits[_i].active != 1>>

Fixed militia unit wrong "active" flag.
			<<set $militiaUnits[_i].active = 1>>
		<</if>>
	<</for>>

	<<for _i = 0; _i < $slaveUnits.length; _i++>>
		<<if ndef $slaveUnits[_i].SF>>

Set slave missing flag
			<<set $slaveUnits[_i].SF = 0>>
		<</if>>
		<<if ndef $slaveUnits[_i].ID>>

Set slave missing ID
			<<generateUnitID $slaveUnits[_i]>>
		<</if>>
		<<if ndef $slaveUnits[_i].commissars>>

Set slave missing flag
			<<set $slaveUnits[_i].commissars = 0>>
		<</if>>
		<<if $slaveUnits[_i].maxTroops < 30>>

Fixed slave unit wrong max troop count.
			<<set $slaveUnits[_i].maxTroops = 30>>
		<</if>>
		<<if !isInt($slaveUnits[_i].troops)>>
			<<set $slaveUnits[_i].troops = $slaveUnits[_i].maxTroops>>

Fixed slave unit wrong troop count.
		<</if>>
		<<if $slaveUnits[_i].troops > 0 && $slaveUnits[_i].active != 1>>

Fixed slave unit wrong "active" flag.
			<<set $slaveUnits[_i].active = 1>>
		<</if>>
	<</for>>

	<<for _i = 0; _i < $mercUnits.length; _i++>>
		<<if ndef $mercUnits[_i].SF>>

Set merc missing flag
			<<set $mercUnits[_i].SF = 0>>
		<</if>>
		<<if ndef $mercUnits[_i].ID>>

Set slave missing ID
			<<generateUnitID $mercUnits[_i]>>
		<</if>>
		<<if ndef $mercUnits[_i].commissars>>

Set merc missing flag
			<<set $mercUnits[_i].commissars = 0>>
		<</if>>
		<<if $mercUnits[_i].maxTroops < 30>>

Fixed merc unit wrong max troop count.
			<<set $mercUnits[_i].maxTroops = 30>>
		<</if>>
		<<if !isInt($mercUnits[_i].troops)>>
			<<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>>

Fixed merc unit wrong troop count.
		<</if>>
		<<if $mercUnits[_i].troops > 0 && $mercUnits[_i].active != 1>>

Fixed merc unit wrong "active" flag.
			<<set $mercUnits[_i].active = 1>>
		<</if>>
	<</for>>
<</widget>>

<<widget "fixBrokenStats">>
	<<if !isInt($totalKills)>>
		<<set $totalKills = 0>>
	<</if>>
	<<if !isInt($mercTotalCasualties)>>
		<<set $mercTotalCasualties = 0>>
	<</if>>
	<<if !isInt($mercEmployedManpower)>>
		<<set $mercEmployedManpower = 0>>
	<</if>>
	<<if !isInt($mercTotalManpower)>>
		<<set $mercTotalManpower = 0>>
	<</if>>
	<<if !isInt($slavesTotalCasualties)>>
		<<set $slavesTotalCasualties = 0>>
	<</if>>
	<<if !isInt($slavesEmployedManpower)>>
		<<set $slavesEmployedManpower = 0>>
	<</if>>
	<<if !isInt($militiaTotalCasualties)>>
		<<set $militiaTotalCasualties = 0>>
	<</if>>
	<<if !isInt($militiaEmployedManpower)>>
		<<set $militiaEmployedManpower = 0>>
	<</if>>
	<<if !isInt($militiaFreeManpower)>>
		<<set $militiaFreeManpower = 0>>
	<</if>>
	<<if !isInt($militiaTotalManpower)>>
		<<set $militiaTotalManpower = 0>>
	<</if>>
	<<if !isInt($battlesCount)>>
		<<set $battlesCount = 0>>
	<</if>>
<</widget>>

<<widget "fixBrokenFS">>
	<<if $arcologies[0].FSSubjugationist != "unset" && !(isInt($arcologies[0].FSSubjugationist) || isFloat($arcologies[0].FSSubjugationist))>>
		<<set $arcologies[0].FSSubjugationist = 0>>
		<<FSChange "Subjugationist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSGenderRadicalist != "unset" && !(isInt($arcologies[0].FSGenderRadicalist) || isFloat($arcologies[0].FSGenderRadicalist))>>

Debug: FSGenderRadicalist = $arcologies[0].FSGenderRadicalist
		<<set $arcologies[0].FSGenderRadicalist = 0>>
		<<FSChange "GenderRadicalist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSRestart != "unset" && !(isInt($arcologies[0].FSRestart) || isFloat($arcologies[0].FSRestart))>>
		<<set $arcologies[0].FSRestart = 0>>
		<<FSChange "Eugenics" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSRepopulationFocus != "unset" && !(isInt($arcologies[0].FSRepopulationFocus) || isFloat($arcologies[0].FSRepopulationFocus))>>
		<<set $arcologies[0].FSRepopulationFocus = 0>>
		<<FSChange "Repopulationist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSSupremacist != "unset" && !(isInt($arcologies[0].FSSupremacist) || isFloat($arcologies[0].FSSupremacist))>>
		<<set $arcologies[0].FSSupremacist = 0>>
		<<FSChange "Supremacist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSBodyPurist != "unset" && !(isInt($arcologies[0].FSBodyPurist) || isFloat($arcologies[0].FSBodyPurist))>>
		<<set $arcologies[0].FSBodyPurist = 0>>
		<<FSChange "BodyPurist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSPaternalist != "unset" && !(isInt($arcologies[0].FSPaternalist) || isFloat($arcologies[0].FSPaternalist))>>
		<<set $arcologies[0].FSPaternalist = 0>>
		<<FSChange "Paternalist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSSlimnessEnthusiast != "unset" && !(isInt($arcologies[0].FSSlimnessEnthusiast) || isFloat($arcologies[0].FSSlimnessEnthusiast))>>
		<<set $arcologies[0].FSSlimnessEnthusiast = 0>>
		<<FSChange "SlimnessEnthusiast" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSGenderFundamentalist != "unset" && !(isInt($arcologies[0].FSGenderFundamentalist) || isFloat($arcologies[0].FSGenderFundamentalist))>>
		<<set $arcologies[0].FSGenderFundamentalist = 0>>
		<<FSChange "GenderFundamentalist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSMaturityPreferentialist != "unset" && !(isInt($arcologies[0].FSMaturityPreferentialist) || isFloat($arcologies[0].FSMaturityPreferentialist))>>
		<<set $arcologies[0].FSMaturityPreferentialist = 0>>
		<<FSChange "MaturityPreferentialist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSYouthPreferentialist != "unset" && !(isInt($arcologies[0].FSYouthPreferentialist) || isFloat($arcologies[0].FSYouthPreferentialist))>>
		<<set $arcologies[0].FSYouthPreferentialist = 0>>
		<<FSChange "YouthPreferentialist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSTransformationFetishist != "unset" && !(isInt($arcologies[0].FSTransformationFetishist) || isFloat($arcologies[0].FSTransformationFetishist))>>
		<<set $arcologies[0].FSTransformationFetishist = 0>>
		<<FSChange "TransformationFetishist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSHedonisticDecadence != "unset" && !(isInt($arcologies[0].FSHedonisticDecadence) || isFloat($arcologies[0].FSHedonisticDecadence))>>
		<<set $arcologies[0].FSHedonisticDecadence = 0>>
		<<FSChange "Hedonism" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSPhysicalIdealist != "unset" && !(isInt($arcologies[0].FSPhysicalIdealist) || isFloat($arcologies[0].FSPhysicalIdealist))>>
		<<set $arcologies[0].FSPhysicalIdealist = 0>>
		<<FSChange "PhysicalIdealist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSPastoralist != "unset" && !(isInt($arcologies[0].FSPastoralist) || isFloat($arcologies[0].FSPastoralist))>>
		<<set $arcologies[0].FSPastoralist = 0>>
		<<FSChange "Pastoralist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSAssetExpansionist != "unset" && !(isInt($arcologies[0].FSAssetExpansionist) || isFloat($arcologies[0].FSAssetExpansionist))>>
		<<set $arcologies[0].FSAssetExpansionist = 0>>
		<<FSChange "AssetExpansionist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSDegradationist != "unset" && !(isInt($arcologies[0].FSDegradationist) || isFloat($arcologies[0].FSDegradationist))>>
		<<set $arcologies[0].FSDegradationist = 0>>
		<<FSChange "Degradationist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSRomanRevivalist != "unset" && !(isInt($arcologies[0].FSRomanRevivalist) || isFloat($arcologies[0].FSRomanRevivalist))>>
		<<set $arcologies[0].FSRomanRevivalist = 0>>
		<<FSChange "RomanRevivalist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSChattelReligionist != "unset" && !(isInt($arcologies[0].FSChattelReligionist) || isFloat($arcologies[0].FSChattelReligionist))>>
		<<set $arcologies[0].FSChattelReligionist = 0>>
		<<FSChange "ChattelReligionist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSChineseRevivalist != "unset" && !(isInt($arcologies[0].FSChineseRevivalist) || isFloat($arcologies[0].FSChineseRevivalist))>>
		<<set $arcologies[0].FSChineseRevivalist = 0>>
		<<FSChange "ChineseRevivalist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSArabianRevivalist != "unset" && !(isInt($arcologies[0].FSArabianRevivalist) || isFloat($arcologies[0].FSArabianRevivalist))>>
		<<set $arcologies[0].FSArabianRevivalist = 0>>
		<<FSChange "ArabianRevivalist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSEdoRevivalist != "unset" && !(isInt($arcologies[0].FSEdoRevivalist) || isFloat($arcologies[0].FSEdoRevivalist))>>
		<<set $arcologies[0].FSEdoRevivalist = 0>>
		<<FSChange "EdoRevivalist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSEgyptianRevivalist != "unset" && !(isInt($arcologies[0].FSEgyptianRevivalist) || isFloat($arcologies[0].FSEgyptianRevivalist))>>
		<<set $arcologies[0].FSEgyptianRevivalist = 0>>
		<<FSChange "EgyptianRevivalist" 10>>

Fixed NaN FS value
	<</if>>
	<<if $arcologies[0].FSAztecRevivalist != "unset" && !(isInt($arcologies[0].FSAztecRevivalist) || isFloat($arcologies[0].FSAztecRevivalist))>>
		<<set $arcologies[0].FSAztecRevivalist = 0>>
		<<FSChange "AztecRevivalist" 10>>

Fixed NaN FS value
	<</if>>
<</widget>>

<<widget "recalcBaseStats">>
	<<if $secBotsBaseAttack != 7 + $droneUpgrades.attack>>
		<<set $secBotsBaseAttack = 7 + $droneUpgrades.attack>>
	<</if>>
	<<if $secBotsBaseDefense != 3 + $droneUpgrades.defense>>
		<<set $secBotsBaseDefense = 3 + $droneUpgrades.defense>>
	<</if>>
	<<if $secBotsMorale != 200>>
		<<set $secBotsMorale = 200>>
	<</if>>
	<<if $secBotsBaseHp != 3 + $droneUpgrades.hp>>
		<<set $secBotsBaseHp = 3 + $droneUpgrades.hp>>
	<</if>>
	<<if $militiaBaseAttack != 7 + $humanUpgrade.attack>>
		<<set $militiaBaseAttack = 7 + $humanUpgrade.attack>>
	<</if>>
	<<if $militiaBaseDefense != 5 + $humanUpgrade.defense>>
		<<set $militiaBaseDefense = 5 + $humanUpgrade.defense>>
	<</if>>
	<<if $militiaBaseMorale != 140 + $humanUpgrade.morale>>
		<<set $militiaBaseMorale = 140 + $humanUpgrade.morale>>
	<</if>>
	<<if $militiaBaseHp != 3 + $humanUpgrade.hp>>
		<<set $militiaBaseHp = 3 + $humanUpgrade.hp>>
	<</if>>
	<<if $slaveBaseAttack != 8 + $humanUpgrade.attack>>
		<<set $slaveBaseAttack = 8 + $humanUpgrade.attack>>
	<</if>>
	<<if $slaveBaseDefense != 3 + $humanUpgrade.defense>>
		<<set $slaveBaseDefense = 3 + $humanUpgrade.defense>>
	<</if>>
	<<if $slaveBaseMorale != 110 + $humanUpgrade.morale>>
		<<set $slaveBaseMorale = 110 + $humanUpgrade.morale>>
	<</if>>
	<<if $slaveBaseHp != 3 + $humanUpgrade.hp>>
		<<set $slaveBaseHp = 3 + $humanUpgrade.hp>>
	<</if>>
	<<if $mercBaseAttack != 8 + $humanUpgrade.attack>>
		<<set $mercBaseAttack = 8 + $humanUpgrade.attack>>
	<</if>>
	<<if $mercBaseDefense != 4 + $humanUpgrade.defense>>
		<<set $mercBaseDefense = 4 + $humanUpgrade.defense>>
	<</if>>
	<<if $mercBaseMorale != 125 + $humanUpgrade.morale>>
		<<set $mercBaseMorale = 125 + $humanUpgrade.morale>>
	<</if>>
	<<if $mercBaseHp != 4 + $humanUpgrade.hp>>
		<<set $mercBaseHp = 4 + $humanUpgrade.hp>>
	<</if>>
	<<if $SFBaseAttack != 8 + $humanUpgrade.attack>>
		<<set $SFBaseAttack = 8 + $humanUpgrade.attack>>
	<</if>>
	<<if $SFBaseDefense != 4 + $humanUpgrade.defense>>
		<<set $SFBaseDefense = 4 + $humanUpgrade.defense>>
	<</if>>
	<<if $SFBaseMorale != 140 + $humanUpgrade.morale>>
		<<set $SFBaseMorale = 140 + $humanUpgrade.morale>>
	<</if>>
	<<if $SFBaseHp != 4 + $humanUpgrade.hp>>
		<<set $SFBaseHp = 4 + $humanUpgrade.hp>>
	<</if>>
<</widget>>


code:
:: unitsWidgets [widget nobr]

<<widget "militiaUnitsDescription">>
	<<if $args[0].active == 1>>
		$args[0].platoonName <<if $args[0].battlesFought > 1>> participated in $args[0].battlesFought battles and is ready to face the enemy once more at your command.<<elseif $args[0].battlesFought == 1>>is ready to face the enemy once more at your command.<<else>>is ready to face the enemy in battle.<</if>>
		Its $args[0].troops men and women are all proud citizens of your arcology, willing to put their lives on the line to protect their home.
		<<if $args[0].troops < $args[0].maxTroops>> The unit is not at its full strength of $args[0].maxTroops operatives.<</if>>
		<<if $args[0].equip == 0>>
			They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more.
		<<elseif $args[0].equip == 1>>
			They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor.
		<<elseif $args[0].equip == 2>>
			They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like might visions and portable radars.
		<<else>>
			They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment.
		<</if>>
		<<if $args[0].training <= 33>>
			They lack the experience to be considered consumed professionals, but their eagerness to defend the arcology makes up for it.
		<<elseif $args[0].training <= 66>>
			They have trained <<if $args[0].battlesFought > 0>>and fought<</if>> enough to be considered disciplined, professional soldiers, ready to face the battlefield.
		<<else>>
			They are consumed veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything.
		<</if>>
		<<if $args[0].loyalty < 10>>
			The unit is extremely disloyal. Careful monitoring of their activities and relationships should be implemented.
		<<elseif $args[0].loyalty < 33>>
			Their loyalty is low. Careful monitoring of their activities and relationships is advised.
		<<elseif $args[0].loyalty < 66>>
			Their loyalty is not as high as it can be, but they are not actively working against their arcology owner.
		<<elseif $args[0].loyalty < 90>>
			Their loyalty is high and strong. The likelyhood of this unit betraying the arcology is low to non-existent.
		<<else>>
			The unit is fanatically loyal. They would prefer death over betrayal.
		<</if>>
		<<if $args[0].medics == 1>>
			The unit has a dedicated squad of medics that will follow them in battle.
		<</if>>
		<<if $args[0].SF == 1>>
			The unit has attached advisors from $securityForceName that will help the squad remain tactically aware and active.
		<</if>>
	<<else>>
		$args[0].platoonName lost too many operatives in the $args[0].battlesFought it fought and can no longer be considered a unit at all.
	<</if>>
<</widget>>

<<widget "slaveUnitsDescription">>
	<<if $args[0].active == 1>>
		$args[0].platoonName <<if $args[0].battlesFought > 1>> participated in $args[0].battlesFought battles and is ready to face the enemy once more at your command.<<elseif $args[0].battlesFought == 1>>is ready to face the enemy once more at your command.<<else>>is ready to face the enemy in battle.<</if>>
		Its $args[0].troops men and women are slaves in your possession, tasked with the protection of their owner and their arcology.
		<<if $args[0].troops < $args[0].maxTroops>> The unit is not at its full strength of $args[0].maxTroops operatives.<</if>>
		<<if $args[0].equip == 0>>
			They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more.
		<<elseif $args[0].equip == 1>>
			They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor.
		<<elseif $args[0].equip == 2>>
			They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like might visions and portable radars.
		<<else>>
			They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment.
		<</if>>
		<<if $args[0].training <= 33>>
			They lack the experience to be considered professionals, but their eagerness to prove themselves makes up for it.
		<<elseif $args[0].training <= 66>>
			They have trained <<if $args[0].battlesFought > 0>>and fought<</if>> enough to be considered disciplined, professional soldiers, ready to face the battlefield.
		<<else>>
			They are consumed veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything.
		<</if>>
		<<if $args[0].loyalty < 10>>
			The unit is extremely disloyal. Careful monitoring of their activities and relationships should be implemented.
		<<elseif $args[0].loyalty < 33>>
			Their loyalty is low. Careful monitoring of their activities and relationships is advised.
		<<elseif $args[0].loyalty < 66>>
			Their loyalty is not as high as it can be, but they are not actively working against their arcology owner.
		<<elseif $args[0].loyalty < 90>>
			Their loyalty is high and strong. The likelyhood of this unit betraying the arcology is low to non-existent.
		<<else>>
			The unit is fanatically loyal. They would prefer death over betrayal.
		<</if>>
		<<if $args[0].medics == 1>>
			The unit has a dedicated squad of medics that will follow them in battle.
		<</if>>
		<<if $args[0].SF == 1>>
			The unit has attached advisors from $securityForceName that will help the squad remain tactically aware and active.
		<</if>>
	<<else>>
		$args[0].platoonName lost too many operatives in the $args[0].battlesFought it fought and can no longer be considered a unit at all.
	<</if>>
<</widget>>

<<widget "mercUnitsDescription">>
	<<if $args[0].active == 1>>
		$args[0].platoonName <<if $args[0].battlesFought > 1>> participated in $args[0].battlesFought battles and is ready to face the enemy once more at your command.<<elseif $args[0].battlesFought == 1>>is ready to face the enemy once more at your command.<<else>>is ready to face the enemy in battle.<</if>>
		Its $args[0].troops men and women are mercenaries contracted to defend the arcology against external threats.
		<<if $args[0].troops < $args[0].maxTroops>> The unit is not at its full strength of $args[0].maxTroops operatives.<</if>>
		<<if $args[0].equip == 0>>
			They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more.
		<<elseif $args[0].equip == 1>>
			They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor.
		<<elseif $args[0].equip == 2>>
			They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like might visions and portable radars.
		<<else>>
			They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment.
		<</if>>
		<<if $args[0].training <= 33>>
			They lack the experience to be considered professionals, but they're trained more than enough to still be an effective unit.
		<<elseif $args[0].training <= 66>>
			They have trained <<if $args[0].battlesFought > 0>>and fought<</if>> enough to be considered disciplined, professional soldiers, ready to face the battlefield.
		<<else>>
			They are consumed veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything.
		<</if>>
		<<if $args[0].loyalty < 10>>
			The unit is extremely disloyal. Careful monitoring of their activities and relationships should be implemented.
		<<elseif $args[0].loyalty < 33>>
			Their loyalty is low. Careful monitoring of their activities and relationships is advised.
		<<elseif $args[0].loyalty < 66>>
			Their loyalty is not as high as it can be, but they are not actively working against their arcology owner.
		<<elseif $args[0].loyalty < 90>>
			Their loyalty is high and strong. The likelyhood of this unit betraying the arcology is low to non-existent.
		<<else>>
			The unit is fanatically loyal. They would prefer death over betrayal.
		<</if>>
		<<if $args[0].medics == 1>>
			The unit has a dedicated squad of medics that will follow them in battle.
		<</if>>
		<<if $args[0].SF == 1>>
			The unit has attached advisors from $securityForceName that will help the squad remain tactically aware and active.
		<</if>>
	<<else>>
		$args[0].platoonName lost too many operatives in the $args[0].battlesFought it fought and can no longer be considered a unit at all.
	<</if>>
<</widget>>

<<widget "secBotsDescription">>
	<<if $secBots.active == 1>>
		The security drones assemble in an ordered line in front of you, ready to receive their orders. All <<print $secBots.troops>> stand before you in absolute silence.
		<<if $secBots.troops < $secBots.maxTroops>> The unit is not at its full strength of $secBots.maxTroops drones.<</if>>
		<<if $secBots.equip == 0>>
			They are equipped with light weaponry, mainly anti-riot non lethal weapons. Not particularly effective in battle.
		<<elseif $secBots.equip == 1>>
			They are equipped with light firearms, not an overwhelming amount of firepower, but with their mobility good enough to be effective.
		<<elseif $secBots.equip == 2>>
			They are equipped with powerful, modern firearms and simple armor mounted around their frames. They do not make for a pretty sight, but on the battlefield they are a dangerous weapon.
		<<else>>
			They are equipped with high energy railguns and adaptive armor. They are a formidable force on the battlefield, even for experienced soldiers.
		<</if>>
	<<else>>
		There are too few security drones left to be able to deploy them on the battlefield.
	<</if>>
<</widget>>

<<widget "generateUnitID">>
	<<set _newID = 0>>

	<<for _i = 0; _i < $militiaUnits.length; _i++>>
		<<if $militiaUnits[_i].ID >= _newID>>
			<<set _newID = $militiaUnits[_i].ID + 1>>
		<</if>>
	<</for>>

	<<for _i = 0; _i < $slaveUnits.length; _i++>>
		<<if $slaveUnits[_i].ID >= _newID>>
			<<set _newID = $slaveUnits[_i].ID + 1>>
		<</if>>
	<</for>>

	<<for _i = 0; _i < $mercUnits.length; _i++>>
		<<if $mercUnits[_i].ID >= _newID>>
			<<set _newID = $mercUnits[_i].ID + 1>>
		<</if>>
	<</for>>
	<<set $args[0].ID = _newID>>
<</widget>>

repo_name: buster/scruggs

license: mit


code:
:: art widgets [nobr widget]

/%
Call as <<AssistantArt>>
Displays assistant images. Currently passage-based.
$args[0]: Image size/center.
	3: Large, right. Example: description.
	2: Medium, right. Example: random events.
%/
<<widget "AssistantArt">>

<<if $imageChoice == 0>> /* RENDERED IMAGES BY SHOKUSHU */

<<switch $assistantAppearance>>
<<case "monstergirl">>
	<<set _fileName = "'resources/renders/assistant monstergirl.png' ">>
<<case "shemale">>
	<<set _fileName = "'resources/renders/assistant shemale.png' ">>
<<case "amazon">>
	<<set _fileName = "'resources/renders/assistant amazon.png' ">>
<<case "businesswoman">>
	<<set _fileName = "'resources/renders/assistant businesswoman.png' ">>
<<case "goddess">>
	<<set _fileName = "'resources/renders/assistant goddess.png' ">>
<<case "schoolgirl">>
	<<set _fileName = "'resources/renders/assistant schoolgirl.png' ">>
<<default>>
	<<set _fileName = "'resources/renders/assistant default.png' ">>
<</switch>>
<<if $args[1] == 3>>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

<</if>> /* CLOSES IMAGE CHOICE */

<</widget>>

/%
Call as <<SlaveArt>>
Displays slave images. Currently passage-based.
$args[0]: Slave.
$args[1]: Image size/center.
	3: Large, right. Example: long slave description.
	2: Medium, right. Example: random events.
	1: Small, left. Example: lists.
	0: Tiny, left. Example: facilities
$args[2]: icon UI Display for vector art, 1 for on.
%/
<<widget "SlaveArt">>

<<if ndef $args[0].customImage>><<set $args[0].customImage = 0>><</if>>
<<if $args[0].customImage != 0>>
	<<set _fileFormat = ($args[0].customImageFormat || "png"),
		_fileName = "'resources/" + $args[0].customImage + "." + _fileFormat + "' ",
		_fileTypeStart = (_fileFormat === "webm" ? "video loop autoplay" : "img"),
		_fileTypeEnd = (_fileFormat === "webm" ? "</video>" : "")>>
	<<if $args[1] == 3>>
		<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:right; border:3px hidden'>" + _fileTypeEnd>>
	<<elseif $args[1] == 2>>
		<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:right; border:3px hidden' width='300' height='300'>" + _fileTypeEnd>>
	<<elseif $args[1] == 1>>
		<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:left; border:3px hidden' width='150' height='150'>" + _fileTypeEnd>>
	<<else>>
		<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:left; border:3px hidden' width='120' height='120'>" + _fileTypeEnd>>
	<</if>>

<<elseif $imageChoice == 1>> /* VECTOR ART BY NOX*/

<<if ndef $seeVectorArtHighlights>>
	<<set $seeVectorArtHighlights = 1>>
<</if>>
<<set _artSlave to $args[0] >>
<<silently>>
/* prepare HTML colour codes for slave display */
/* note: latex clothing is mostly emulated by rubber colour for skin (and shoes) */
/* TODO: consistently use american "color" instead of "colour" for all identifiers */
<<include Art_Vector_Set_Colour_Outfit_>>
<<include Art_Vector_Set_Colour_Skin_>>
<<include Art_Vector_Set_Colour_Hair_>>
<<include Art_Vector_Set_Colour_Shoe_>>
<</silently>>
<<include Art_Vector_Generate_Stylesheet_>>
/*
each passage adds one layer of vector art
vector art added later is drawn over previously added art
(what is listed on the bottom in the code appears on the top of the image)
*/
<<include Art_Vector_Arm_>>
<<include Art_Vector_Hair_Back_>>
<<include Art_Vector_Butt_>>
<<include Art_Vector_Leg_>>
<<include Art_Vector_Feet_>> /* includes shoes */
<<include Art_Vector_Torso_>>
<<include Art_Vector_Pussy_>>
<<include Art_Vector_Pubic_Hair_>>
<<include Art_Vector_Pussy_Piercings_>>
<<include Art_Vector_Chastity_Belt_>>
<<include Art_Vector_Torso_Outfit_>> /* note: clothing covers chastity belts */
<<include Art_Vector_Belly_>> /* includes navel piercing and belly-related clothing options */
<<include Art_Vector_Balls_>>
<<include Art_Vector_Penis_>> /* for dicks behind boobs */
<<include Art_Vector_Boob_>> /* includes areolae and piercings */
<<include Art_Vector_Penis_>> /* for dicks in front of boobs */
<<include Art_Vector_Boob_Addons_>> /* piercings always appear in front of boobs AND dick */
<<include Art_Vector_Clavicle>>
<<include Art_Vector_Collar_>>
<<include Art_Vector_Head_>> /* includes glasses */
<<include Art_Vector_Hair_Fore_>>

<<elseif $imageChoice == 2>> /* VECTOR ART BY NOX - Pregmod Legacy Version */
<<SVGFilters>>

/* 000-250-006 */
/*
 */
/* 000-250-006 */

<<set _folderLoc = "'resources/vector">>

<<if $args[2] == 1>>
	<<print "">>
<</if>>

/% Set skin colour %/
<<set _skinFilter = "filter: url(#skin-" + _.kebabCase($args[0].skin) + ");">>
/% Set hair colour %/
<<set _hairFilter = "filter: url(#hair-" + _.kebabCase($args[0].hColor) + ");">>
<<set _underArmFilter = "filter: url(#hair-" + _.kebabCase($args[0].underArmHColor) + ");">>
<<set _pubesFilter = "filter: url(#hair-" + _.kebabCase($args[0].pubicHColor) + ");">>
<<set _axillaryFilter = "filter: url(#hair-" + _.kebabCase($args[0].underArmHColor) + ");">>
<<if $args[0].customHairVector>>
	<<set _hairStyle = $args[0].customHairVector>>
<<else>>
	<<set _hairStyle = ["neat", "eary", "ponytail", "messy"].includes($args[0].hStyle) ? $args[0].hStyle : "neat">>
<</if>>
<<set _underArmHStyle = $args[0].underArmHStyle>>

<<set _imgSkinLoc = _folderLoc + "/body/white">>

/% Shoulder width and arm or no arm %/
<<if $args[0].amp != 1>>
<<if $args[0].devotion > 50>>
	<<set _leftArmType = "high">>
	<<set _rightArmType = "high">>
<<elseif $args[0].trust >= -20>>
	<<if $args[0].devotion < -20>>
		<<set _leftArmType = "rebel">>
		<<set _rightArmType = "low">>
	<<elseif $args[0].devotion <= 20>>
		<<set _leftArmType = "low">>
		<<set _rightArmType = "low">>
	<<else>>
		<<set _leftArmType = "mid">>
		<<set _rightArmType = "high">>
	<</if>>
<<else>>
	<<set _leftArmType = "mid">>
	<<set _rightArmType = "mid">>
<</if>>

<<if $args[0].fuckdoll == 0 && $args[0].clothes != "restrictive latex" && $args[0].clothes != "a latex catsuit">>
	<<if  _leftArmType == "high">>
		<<print "">>
		<<if $args[0].underArmHStyle == "bushy">>
			<<= "">>
		<</if>>
	<<else>>
		<<if $args[0].underArmHStyle == "bushy">>
			<<= "">>
		<</if>>
		<<print "">>
	<</if>>
	<<print "">>
<<else>>
	<<if $args[0].fuckdoll != 0>>
		<<set _leftArmType = "mid">>
		<<set _rightArmType = "mid">>
	<</if>>
	<<print "">>
	<<print "">>
<</if>>
<</if>>

/% Hair Aft %/
<<if $args[0].hStyle != "shaved" && $args[0].fuckdoll == 0>>
	<<= "">>
<</if>>

/% Tailed Plug %/
<<if $args[0].buttplugAttachment == "tail">>
	<<= "">>
<</if>>

/% Butt %/
<<if $args[0].amp != 1>>
<<if $args[0].butt > 6>>
	<<set _buttSize = 3>>
<<elseif $args[0].butt > 4>>
	<<set _buttSize = 2>>
<<elseif $args[0].butt > 2>>
	<<set _buttSize = 1>>
<<else>>
	<<set _buttSize = 0>>
<</if>>
<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
	<<set _buttSize = _buttSize + " latex">>
	<<print "">>
<<else>>
	<<print "">>
<</if>>
<</if>>

/% Leg + 1 size up when chubby or fat%/
<<if $args[0].hips < 0>>
	<<if $args[0].weight > 95>>/%Chubby%/
		<<set _legSize = "normal">>
	<<else>>
		<<set _legSize = "narrow">>
	<</if>>
<<elseif $args[0].hips == 0>>
	<<if $args[0].weight > 95>>/%Chubby%/
		<<set _legSize = "wide">>
	<<else>>
		<<set _legSize = "normal">>
	<</if>>
<<elseif $args[0].hips > 0>>
	<<set _legSize = "wide">>
<</if>>
<<if $args[0].amp == 1>>
	<<set _legSize = "stump " + _legSize>>
<</if>>
<<if ($args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit") && $args[0].amp != 1>>
	<<set _legSize = _legSize + " latex">>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

/% Feet %/
<<if $args[0].amp != 1>>
<<if $args[0].shoes == "heels">>
	<<set _shoesType = "heel">>
<<elseif $args[0].shoes == "extreme heels">>
	<<if $args[0].weight > 95>>/%Chubby%/
		<<set _shoesType = "extreme heel wide">>
	<<else>>
		<<set _shoesType = "extreme heel">>
	<</if>>
<<elseif $args[0].shoes == "boots">>
	<<if $args[0].weight > 95>>/%Chubby%/
		<<set _shoesType = "boot wide">>
	<<else>>
		<<set _shoesType = "boot">>
	<</if>>
<<elseif $args[0].shoes == "flats">>
	<<set _shoesType = "flat">>
<<else>>
	<<print "">>
<</if>>
<<if $args[0].shoes == "extreme heels" or $args[0].shoes == "boots">>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		<<set _shoesType = _shoesType + " latex">>
	<</if>>
	<<print "">>
<</if>>
<<if $args[0].shoes == "heels" or $args[0].shoes == "flats">>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		<<set _shoesType = _shoesType + " latex">>
		<<print "">>
	<<else>>
		<<print "">>
	<</if>>
<</if>>
<</if>>

/% Torso %/
<<if $args[0].waist < -40>>/*Unnatural*/
	<<if $args[0].weight > 30>>/%Chubby%/
		<<set _torsoSize = "hourglass">>
	<<else>>
		<<set _torsoSize = "unnatural">>
	<</if>>
<<elseif $args[0].waist <= 10>>/%Hour glass%/
	<<if $args[0].weight > 30>>/%Chubby%/
		<<set _torsoSize = "normal">>
	<<else>>
		<<set _torsoSize = "hourglass">>
	<</if>>
<<else>>/*Normal*/
	<<set _torsoSize = "normal">>
<</if>>
<<print "">>
<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
	<<set _torsoOutfit = " latex">>
<<elseif $args[0].clothes == "uncomfortable straps">>
	<<set _torsoOutfit = " straps">>
<</if>>
<<if _torsoOutfit>>
	<<print "">>
<</if>>

/% Vagina %/
<<if $args[0].vagina >= 0>>
	<<print "">>
	<<if $args[0].clitPiercing == 1>>
		<<print "">>
	<<elseif $args[0].clitPiercing == 2>>
		<<print "">>
	<<elseif $args[0].clitPiercing == 3>>
		<<print "">>
	<</if>>
	<<if $args[0].vaginaPiercing == 1>>
		<<print "">>
	<<elseif $args[0].vaginaPiercing == 2>>
		<<print "">>
	<</if>>
<</if>>

/% Collar %/
<<switch $args[0].collar>>
<<case "bowtie">>
<<case "ancient Egyptian">>
<<case "nice retirement counter" "cruel retirement counter" "leather with cowbell" "pretty jewelry" "heavy gold" "satin choker" "stylish leather" "neck corset" "shock punishment" "tight steel" "uncomfortable leather" "dildo gag">>
	<<print "">>
<</switch>>

/% Head base image %/
<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

/% Glasses %/
<<if $args[0].eyewear == "corrective glasses" or $args[0].eyewear == "glasses" or $args[0].eyewear == "blurring glasses">>
	<<print "">>
<</if>>

/% Chastity belt or Pubic hair %/
<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "anal chastity" || $args[0].dickAccessory == "combined chastity" || $args[0].vaginalAccessory == "chastity belt" || $args[0].vaginalAccessory == "anal chastity" || $args[0].vaginalAccessory == "combined chastity">>
	<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "combined chastity">>
		<<print "">>
	<</if>>
	<<if $args[0].vaginalAccessory == "chastity belt" || $args[0].vaginalAccessory == "combined chastity">>
		<<print "">>
	<</if>>
	<<print "">>
<<else>>
	<<if $args[0].pubicHStyle != "waxed">>
		<<set _pubicHStyle = ($args[0].pubicHStyle == "in a strip" ? "strip" : $args[0].pubicHStyle)>>
		<<= "">>
	<</if>>
<</if>>

/%if pregnant or has a belly%/
<<if $args[0].belly >= 5000>>
	<<print "">>
	<<if $args[0].navelPiercing >= 1>>/*Navel Piercing*/
		<<print "">>
	<</if>>
	<<if $args[0].navelPiercing == 2>>
		<<print "">>
	<</if>>
<<elseif $args[0].belly >= 100>>
	<<print "">>
	/*
	<<if $args[0].navelPiercing >= 1>>/Navel Piercing/
		<<print "">>
	<</if>>
	<<if $args[0].navelPiercing == 2>>
		<<print "">>
	<</if>>
	*/
<<else>>
	/*Navel Piercing*/
	<<if $args[0].navelPiercing >= 1>>
		<<print "">>
	<</if>>
	<<if $args[0].navelPiercing == 2>>
		<<print "">>
	<</if>>
<</if>>

/% Boob %/
<<if $args[0].boobs < 250>>
	<<set _boobSize = 0>>
<<elseif $args[0].boobs < 500>>
	<<set _boobSize = 1>>
<<elseif $args[0].boobs < 800>>
	<<set _boobSize = 2>>
<<elseif $args[0].boobs < 1600>>
	<<set _boobSize = 3>>
<<elseif $args[0].boobs < 3200>>
	<<set _boobSize = 4>>
<<elseif $args[0].boobs < 6400>>
	<<set _boobSize = 5>>
<<elseif $args[0].boobs < 12000>>
	<<set _boobSize = 6>>
<<else>>
	<<set _boobSize = 7>>
<</if>>

/% Scrotum %/
<<if $args[0].scrotum > 0>>
	<<if $args[0].scrotum >= 6>>
		<<set _ballSize = 4>>
	<<elseif $args[0].scrotum >= 4>>
		<<set _ballSize = 3>>
	<<elseif $args[0].scrotum >= 3>>
		<<set _ballSize = 2>>
	<<elseif $args[0].scrotum >= 2>>
		<<set _ballSize = 1>>
	<<else>>
		<<set _ballSize = 0>>
	<</if>>
<</if>>

/% Penis %/
<<if $args[0].dick > 0>>
	<<if $args[0].dick >= 8>>
		<<set _penisSize = 6>>
	<<elseif $args[0].dick >= 7>>
		<<set _penisSize = 5>>
	<<elseif $args[0].dick >= 6>>
		<<set _penisSize = 4>>
	<<elseif $args[0].dick >= 5>>
		<<set _penisSize = 3>>
	<<elseif $args[0].dick >= 4>>
		<<set _penisSize = 2>>
	<<elseif $args[0].dick >= 2>>
		<<set _penisSize = 1>>
	<<else>>
		<<set _penisSize = 0>>
	<</if>>
<</if>>

/% Boob %/
<<set _needBoobs = 1>>
<<if $args[0].dick > 0>>
<<if canAchieveErection($args[0])>>
<<if _boobSize < 6>>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		/* normal case: outfit hides boobs */
		<<set _boobOutfit = " latex" >>
	<</if>>
	<<if _boobOutfit >>
		<<print "">>
		<<if $args[0].lactation > 0>>
			<<print "">>
		<</if>>
	<<else>>
		<<print "">>
		<<print "">>
	<</if>>
	/* special case: straps are actually dawn over the boobs */
	<<if $args[0].clothes == "uncomfortable straps">>
		<<set _boobOutfit = " straps" >>
		<<print "">>
	<</if>>
	<<set _needBoobs = 0>>
<</if>>
<</if>>
<</if>>
<<if $args[0].vagina > 0>>
	<<if $args[0].dick > 0>>

		<<if $args[0].scrotum > 0>>
			<<print "">>
		<</if>>
		<<if canAchieveErection($args[0])>>
			<<print "">>
		<<else>>
			<<print "">>
			<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "combined chastity">>
				<<print "">>
			<</if>>
		<</if>>

	<</if>>
<<else>>
	<<if $args[0].dick > 0>>

		<<if $args[0].scrotum > 0>>
			<<print "">>
		<</if>>
		<<if canAchieveErection($args[0])>>
			<<print "">>
		<<else>>
			<<print "">>
			<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "combined chastity">>
				<<print "">>
			<</if>>
		<</if>>

	<</if>>
<</if>>
<<if _needBoobs>>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		<<print "">>
		<<if $args[0].lactation > 0>><<print "">><</if>>
	<<else>>
		<<print "">>
		<<print "">>
	<</if>>
	/* special case: straps are actually dawn over the boobs */
	<<if $args[0].clothes == "uncomfortable straps">>
		<<set _boobOutfit = " straps" >>
		<<print "">>
	<</if>>
<</if>>

/% piercings %/
<<if $args[0].nipplesPiercing == 1>>
	<<print "">>
<<elseif $args[0].nipplesPiercing == 2>>
	<<print "">>
<</if>>
<<if $args[0].areolaePiercing == 1>>
	<<print "">>
<</if>>

/% clavicle %/
<<print "">>

/% Hair Foreground %/
<<if $args[0].hStyle != "shaved" && $args[0].fuckdoll == 0>>
	<<= "">>
<</if>>

<<else>> /* RENDERED IMAGES BY SHOKUSHU */

<<if $args[0].vagina > -1>>
	<<if $args[0].dick > 0>>
		<<if $args[0].balls > 0>>
			<<set _fileName = "futanari">>
		<<else>>
			<<set _fileName = "herm">>
		<</if>>
	<<else>>
		<<set _fileName = "female">>
	<</if>>
<<else>>
	<<if $args[0].balls > 0>>
		<<set _fileName = "shemale">>
	<<else>>
		<<set _fileName = "gelding">>
	<</if>>
<</if>>
<<if $args[0].belly > 1500>>
	<<set _fileName = "preg " + _fileName>>
<</if>>
<<if $args[0].boobs < 400>>
	<<set _fileName = _fileName + " small">>
<<elseif $args[0].boobs < 800>>
	<<set _fileName = _fileName + " big">>
<<elseif $args[0].boobs < 6000>>
	<<set _fileName = _fileName + " huge">>
<<else>>
	<<set _fileName = _fileName + " hyper">>
<</if>>
<<if $args[0].muscles > 30>>
	<<set _fileName = _fileName + " muscle">>
<<else>>
	<<set _fileName = _fileName + " soft">>
<</if>>
<<if $args[0].fuckdoll > 0>>
	<<set _fileName = _fileName + " rebellious">>
<<elseif $args[0].devotion <= 20>>
	<<if $args[0].trust < -20>>
		<<set _fileName = _fileName + " reluctant">>
	<<else>>
		<<set _fileName = _fileName + " rebellious">>
	<</if>>
<<elseif $args[0].fetish == "mindbroken">>
	<<set _fileName = _fileName + " reluctant">>
<<elseif $args[0].devotion <= 50 || $args[0].fetishKnown != 1 || ($seeMainFetishes == 0 && $args[1] < 2)>>
	<<set _fileName = _fileName + " obedient">>
<<else>>
	<<if $args[0].fetish == "none">>
		<<set _fileName = _fileName + " obedient">>
	<<else>>
		<<set _fileName = _fileName + " " + $args[0].fetish>>
	<</if>>
<</if>>

<<set _fileName = "'resources/renders/" + _fileName + ".png' ">>
<<if $args[1] == 3>>
	<<print "">>
<<elseif $args[1] == 2>>
	<<print "">>
<<elseif $args[1] == 1>>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

<</if>> /* CLOSES IMAGE CHOICE */

<</widget>>


code:
:: Art_Vector_Arm_ [nobr]

/* Arms position switch courtesy of Nov-X */

<<if $args[0].amp != 1>>
	<<if $args[0].devotion > 50>>
		<<set _leftArmType = "High">>
		<<set _rightArmType = "High">>
	<<elseif $args[0].trust >= -20>>
		<<if $args[0].devotion < -20>>
			<<set _leftArmType = "Rebel">>
			<<set _rightArmType = "Low">>
		<<elseif $args[0].devotion <= 20>>
			<<set _leftArmType = "Low">>
			<<set _rightArmType = "Low">>
		<<else>>
			<<set _leftArmType = "Mid">>
			<<set _rightArmType = "High">>
		<</if>>
	<<else>>
		<<set _leftArmType = "Mid">>
		<<set _rightArmType = "Mid">>
	<</if>>

	<<set _art = "Art_Vector_Arm_Right_"+_rightArmType >>
	<<include _art>>
	<<set _art = "Art_Vector_Arm_Left_"+_leftArmType >>
	<<include _art>>

	/* shiny clothings */
	<<if $seeVectorArtHighlights == 1>>
		<<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "restrictive latex" || _artSlave.clothes == "a latex catsuit">>
			/* only some arm positions have art (feel free to add more) */
			<<switch _leftArmType>>
			<<case "High">>
				<<include Art_Vector_Arm_Outfit_Shine_Left_High>>
			<<case "Mid">>
			<<include Art_Vector_Arm_Outfit_Shine_Left_Mid>>
			<<case "Low">>
				<<include Art_Vector_Arm_Outfit_Shine_Left_Low>>
			<<default>>
				/* no art for this arm position */
			<</switch>>
		<</if>>
	<</if>>
<</if>>


code:
:: Art_Vector_Balls_ [nobr]

<<if _artSlave.scrotum > 0 && _artSlave.balls > 0 >>
	<<if _artSlave.scrotum >= 6>>
		<<set _ballSize = 4>>
	<<elseif _artSlave.scrotum >= 4>>
		<<set _ballSize = 3>>
	<<elseif _artSlave.scrotum >= 3>>
		<<set _ballSize = 2>>
	<<elseif _artSlave.scrotum >= 2>>
		<<set _ballSize = 1>>
	<<else>>
		<<set _ballSize = 0>>
	<</if>>
  <<set _art = "Art_Vector_Balls_"+_ballSize>>
  <<include _art>>
<</if>>


code:
:: Art_Vector_Belly_ [nobr]

<<set _showNavelPiercings = $showBodyMods == 1 && _artSlave.clothes != "restrictive latex" && _artSlave.clothes != "a latex catsuit">>

<<if _artSlave.belly >= 5000>>
	<<include Art_Vector_Belly>>

	/* shiny clothings */
	<<if $seeVectorArtHighlights == 1>>
		<<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "restrictive latex" || _artSlave.clothes == "a latex catsuit">>
			<<include Art_Vector_Belly_Outfit_Shine>>
		<</if>>
	<</if>>

	/* belly piercings */
	<<if _showNavelPiercings >>
		<<if _artSlave.navelPiercing >= 1>>
			<<include Art_Vector_Belly_Piercing>>
		<</if>>
		<<if _artSlave.navelPiercing == 2>>
			<<include Art_Vector_Belly_Piercing_Heavy>>
		<</if>>
	<</if>>
<<else>>

	/* flat midriff piercings */
	<<if _showNavelPiercings >>
		<<if _artSlave.navelPiercing >= 1>>
			<<include Art_Vector_Navel_Piercing>>
		<</if>>
		<<if _artSlave.navelPiercing == 2>>
			<<include Art_Vector_Navel_Piercing_Heavy>>
		<</if>>
	<</if>>
<</if>>


code:
:: Art_Vector_Boob_ [nobr]

/* BEWARE: _art_have_boobs and _art_scale_factor interfere with Art_Vector_Penis_ */
<<set _art_have_boobs to true>>

/* BEWARE: _art_boob_transform is also read by Art_Vector_Boob_Addons_ */

/*
Prepare SVG transform matrix for continuous boob scaling.
This transform affects boobs, areolae and piercings.
The parameters were fit by points (300,1.0) and (15000,2.5).
See https://www.wolframalpha.com/input/?i=log+fit+%7B%7B300,1%7D,%7B15000,2.5%7D%7D .
Boobs start at 300cc as of "flesh description widgets".
Upper value was discussed at https://github.com/Free-Cities/Free-Cities/issues/950#issuecomment-321359466 .
*/
<<set _art_scale_factor = 0.383433*Math.log(0.0452403*_artSlave.boobs) >>
<<set _art_translation_x = -292.841*_art_scale_factor+292.349 >>
<<set _art_translation_y = -216.438*_art_scale_factor+216.274 >>
<<set _art_boob_transform = "matrix(" + _art_scale_factor +",0,0," + _art_scale_factor + "," + _art_translation_x + "," + _art_translation_y + ")">>
/*
_art_boob_transform is for internal program usage.
_art_transform will affect the display.
*/
<<set _art_transform = _art_boob_transform>>

<<if _artSlave.boobs < 300 >>
  /* BEWARE: this threshold may be used in other art-related code, too */
  /* boobs too small - draw areolae directly onto torso */
  <<set _art_scale_factor = 1 >>
  <<set _art_translation_x = 16 >> /* a little shift to the right is needed due to perspective */
  <<set _art_translation_y = 0 >>
  <<set _art_boob_transform = "matrix(" + _art_scale_factor +",0,0," + _art_scale_factor + "," + _art_translation_x + "," + _art_translation_y + ")">>
  <<set _art_transform = _art_boob_transform>>
<<else>>
  <<include Art_Vector_Boob>>
  /* shiny clothings */
  <<if $seeVectorArtHighlights == 1>>
    <<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "a latex catsuit">>
      <<include Art_Vector_Boob_Outfit_Shine>>
    <</if>>
  <</if>>
<</if>>
<<include Art_Vector_Boob_Areola>>

/* set _art_transform to empty string so stray SVG groups in other passages are not affected */
<<set _art_transform = "">>


code:
:: Art_Vector_Boob_Addons_ [nobr]

/* BEWARE: _art_boob_transform is set by Art_Vector_Boob_ */

/* load _art_transform from _art_boob_transform */
<<set _art_transform = _art_boob_transform>>

/* this outfit is worn under the piercings */
<<if _artSlave.clothes == "uncomfortable straps">>
  <<if _artSlave.boobs < 300 >>
    /* BEWARE: this threshold should be kept in sync with the one in Art_Vector_Boob_ */
    /* boobs too small - have straps on torso only */
  <<else>>
    <<include Art_Vector_Boob_Outfit_Straps>>
  <</if>>
<</if>>

<<set _showNipplePiercings = $showBodyMods == 1 && _artSlave.clothes != "restrictive latex" && _artSlave.clothes != "a latex catsuit" >>

<<if _showNipplePiercings>>
  <<if _artSlave.nipplesPiercing == 1>>
    <<include Art_Vector_Boob_Piercing>>
  <<elseif _artSlave.nipplesPiercing == 2>>
    <<include Art_Vector_Boob_Piercing_Heavy>>
  <</if>>
  <<if _artSlave.areolaePiercing == 1>>
    <<include Art_Vector_Boob_Areola_Piercing>>
  <</if>>
<</if>>

/* set _art_transform to empty string so stray SVG groups in other passages are not affected */
<<set _art_transform = "">>


code:
:: Art_Vector_Butt_ [nobr]

/* BEWARE: _buttSize is also used in Art_Vector_Leg_ */

<<if _artSlave.amp != 1>>
  <<if _artSlave.butt > 6>>
    <<set _buttSize = 3>>
  <<elseif _artSlave.butt > 4>>
    <<set _buttSize = 2>>
  <<elseif _artSlave.butt > 2>>
    <<set _buttSize = 1>>
  <<else>>
    <<set _buttSize = 0>>
  <</if>>
  <<set _art = "Art_Vector_Butt_"+_buttSize >>
  <<include _art >>
<</if>>


code:
:: Art_Vector_Chastity_Belt_ [nobr]

/* note: penile chastity is handled by penis display */

<<set _chastityAnal = _artSlave.dickAccessory == "anal chastity" || _artSlave.dickAccessory == "combined chastity" || _artSlave.vaginalAccessory == "anal chastity" || _artSlave.vaginalAccessory == "combined chastity" >>

<<set _chastityVaginal = _artSlave.vaginalAccessory == "chastity belt" || _artSlave.vaginalAccessory == "combined chastity">>

<<if _artSlave.clothes != "a latex catsuit" >>

  <<if _chastityAnal>>
    <<include Art_Vector_Chastity_Anus>>
  <</if>>

  <<if _chastityVaginal>>
    <<include Art_Vector_Chastity_Vagina>>
  <</if>>

  <<if _chastityAnal || _chastityVaginal >>
    <<include Art_Vector_Chastity_Base>>
  <</if>>

<</if>>


code:
:: Art_Vector_Collar_ [nobr]

/* TODO: find out where "uncomfortable leather" collar art went */

<<switch _artSlave.collar>>
<<case "leather with cowbell">>
<<include Art_Vector_Collar_Cowbell >>
<<case "heavy gold">>
<<include Art_Vector_Collar_Gold_Heavy >>
<<case "neck corset">>
<<include Art_Vector_Collar_Neck_Corset >>
<<case "pretty jewelry">>
<<include Art_Vector_Collar_Pretty_Jewelry >>
<<case "cruel retirement counter">>
<<include Art_Vector_Collar_Retirement_Cruel >>
<<case "nice retirement counter">>
<<include Art_Vector_Collar_Retirement_Nice >>
<<case "satin choker">>
<<include Art_Vector_Collar_Satin_Choker >>
<<case "shock punishment">>
<<include Art_Vector_Collar_Shock_Punishment >>
<<case "stylish leather">>
<<include Art_Vector_Collar_Stylish_Leather >>
<<case "tight steel">>
<<include Art_Vector_Collar_Tight_Steel >>
<<default>>
/* collar not supported - don't display anything */
<</switch>>


code:
:: Art_Vector_Feet_ [nobr]

/* BEWARE: Uses _legSize set by Art_Vector_Leg_ */

<<if _artSlave.amp != 1>>
  <<switch _artSlave.shoes>>
    <<case "heels">>
      <<include Art_Vector_Shoes_Heel>>
    <<case "extreme heels">>
      <<include Art_Vector_Shoes_Exterme_Heel>>
      <<if _legSize == "Wide">>
        <<include Art_Vector_Shoes_Exterme_Heel_Wide>>
      <</if>>
    <<case "boots">>
      <<include Art_Vector_Shoes_Boot>>
      <<if _legSize == "Wide">>
        <<include Art_Vector_Shoes_Boot_Wide>>
      <</if>>
    <<case "flats">>
      <<include Art_Vector_Shoes_Flat>>
    <<case "pumps">>
      <<include Art_Vector_Shoes_Pump>>
    <<default>>
      <<include Art_Vector_Feet>>
  <</switch>>
<</if>>

/* shiny clothings */
<<if $seeVectorArtHighlights == 1>>
  /* this one is leg and partly butt-related, but needs to be here as shoes are drawn over legs and butt */
  <<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "restrictive latex" || _artSlave.clothes == "a latex catsuit">>
    <<if _artSlave.amp != 1>>
      <<set _art = "Art_Vector_Butt_Outfit_Shine_"+_buttSize >>
      <<include _art >>
      <<set _art = "Art_Vector_Leg_Outfit_Shine_"+_legSize >>
    <<else>>
      <<set _art = "Art_Vector_Leg_Outfit_Shine_Stump" >>
    <</if>>
    <<include _art >>
  <</if>>
<</if>>


code:
:: Art_Vector_Generate_Stylesheet_ [nobr]

/* _art_display_class is a workaround for browsers not supporting scoped styles */
<<if _art_display_id > 0 >>
	<<set _art_display_id += 1>>
<<else>>
	<<set _art_display_id = 1>>
<</if>>
<<set _art_display_class = "ad"+_art_display_id >>

/* this scoped style sets the colours for this display only */
<style scope>
._art_display_class {
    position: absolute;
    height: 100%;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
}
._art_display_class .white   { fill:#FFFFFF; }
._art_display_class .skin    { fill:_skinColour; }
._art_display_class .head    { _headSkinStyle }
._art_display_class .torso   { _torsoSkinStyle }
._art_display_class .boob    { _boobSkinStyle }
._art_display_class .penis   { _penisSkinStyle }
._art_display_class .scrotum { _scrotumSkinStyle }
._art_display_class .areola  { _areolaStyle }
._art_display_class .labia   { _labiaStyle }
._art_display_class .hair    { fill:_hairColour; }
._art_display_class .shoe    { fill:_shoeColour; }
._art_display_class .shoe_shadow    { fill:_shoeShadowColour; }
._art_display_class .smart_piercing { fill:#4DB748; }
._art_display_class .steel_piercing { fill:#787878; }
._art_display_class .steel_chastity { fill:#BABABA; }
._art_display_class .outfit_base  { fill:_outfitBaseColour; }
._art_display_class .gag     { fill:#BF2126; }
._art_display_class .shadow  { fill:#010101; }
._art_display_class .glasses { fill:#010101; }
</style>


code:
:: Art_Vector_Hair_Back_ [nobr]

/* note: latex clothing actually shows some hair, but there is no appropriate art for it */
<<if $args[0].hStyle != "shaved" && $args[0].fuckdoll == 0 && _artSlave.clothes != "restrictive latex" >>
	<<include Art_Vector_Hair_Back>>
<</if>>


code:
:: Art_Vector_Hair_Fore_ [nobr]

/* note: latex clothing actually shows some hair, but there is no appropriate art for it */
<<if $args[0].hStyle != "shaved" && $args[0].fuckdoll == 0 && _artSlave.clothes != "restrictive latex" >>
	<<include Art_Vector_Hair_Fore>>
<</if>>


code:
:: Art_Vector_Head_ [nobr]

<<include Art_Vector_Head>>

/* shiny clothings */
<<if $seeVectorArtHighlights == 1>>
  <<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "restrictive latex" || _artSlave.clothes == "a latex catsuit">>
    <<include Art_Vector_Head_Outfit_Shine>>
  <</if>>
<</if>>

/* ADDONS */

<<if _artSlave.collar == "dildo gag">>
  <<include Art_Vector_Gag>>
<</if>>

<<if _artSlave.eyewear == "corrective glasses" or _artSlave.eyewear == "glasses" or _artSlave.eyewear == "blurring glasses">>
  <<include Art_Vector_Glasses>>
<</if>>


code:
:: Art_Vector_Leg_ [nobr]

/* Leg wideness switch courtesy of Nov-X */

/* BEWARE: _legSize is also used in Art_Vector_Feet_ */
/* BEWARE: _buttSize set by Art_Vector_Butt_ */

<<if _artSlave.amp != 1>>
  <<set _legSize = "Normal">>
  <<if _artSlave.hips < 0>>
    <<if _artSlave.weight > 95>>
      <<set _legSize = "Normal">>
    <<else>>
      <<set _legSize = "Narrow">>
    <</if>>
  <<elseif _artSlave.hips == 0>>
    <<if _artSlave.weight > 95>>
      <<set _legSize = "Wide">>
    <<else>>
      <<set _legSize = "Normal">>
    <</if>>
  <<elseif _artSlave.hips > 0>>
    <<set _legSize = "Wide">>
  <</if>>
  <<set _art = "Art_Vector_Leg_"+_legSize >>
<<else>>
  <<set _art = "Art_Vector_Stump" >>
<</if>>
<<include _art >>


code:
:: Art_Vector_Penis_ [nobr]

/* BEWARE: _art_have_boobs and _art_scale_factor interfere with Art_Vector_Boob_ */

<<if _artSlave.dick >= 8>>
  <<set _penisSize = 6>>
<<elseif _artSlave.dick >= 7>>
  <<set _penisSize = 5>>
<<elseif _artSlave.dick >= 6>>
  <<set _penisSize = 4>>
<<elseif _artSlave.dick >= 5>>
  <<set _penisSize = 3>>
<<elseif _artSlave.dick >= 4>>
  <<set _penisSize = 2>>
<<elseif _artSlave.dick >= 2>>
  <<set _penisSize = 1>>
<<elseif _artSlave.dick >= 1>>
  <<set _penisSize = 0>>
<<else>>
  <<set _penisSize = -1>>
<</if>>

<<if _penisSize >= 0>>
  <<if canAchieveErection(_artSlave) && (_artSlave.dickAccessory != "chastity") && (_artSlave.dickAccessory != "combined chastity") >>
    <<if (def _art_have_boobs) && (_art_scale_factor < 2.6)>>
      /* only draw erect penis over boobs if boobs do not hide the penis' base */
      <<set _art = "Art_Vector_Penis_"+_penisSize>>
      <<include _art>>
    <</if>>
  <<else>>
    <<if ndef _art_have_boobs >>
      /* flaccid penises are always drawn behind the boobs */
      <<set _art = "Art_Vector_Flaccid_"+_penisSize>>
      <<include _art>>
      <<if (_artSlave.dickAccessory == "chastity") || (_artSlave.dickAccessory == "combined chastity") >>
        /* this draws chastity OVER latex catsuit. prndev finds this alright. */
        <<set _art = "Art_Vector_Chastity_Cage_"+_penisSize>>
        <<include _art>>
      <</if>>
    <</if>>
  <</if>>
<</if>>

/* unset the variable for the next display */
<<unset _art_have_boobs >>


code:
:: Art_Vector_Pubic_Hair_ [nobr]

<<if _artSlave.fuckdoll != 0 || _artSlave.clothes != "a latex catsuit">>

  <<if $showBodyMods == 1>>
    <<if _artSlave.vaginaTat == "rude words">>
      <<if _artSlave.dick != 0>>
        <<set _art_pussy_tattoo_text to "Useless" >>
      <<else>>
        <<set _art_pussy_tattoo_text to "Fucktoy" >>
      <</if>>
      <<include Art_Vector_Pussy_Tattoo>>
    <</if>>
  <</if>>

  <<switch _artSlave.pubicHStyle>>
    <<case "strip" "in a strip">>
      <<include Art_Vector_Pubic_Hair_Strip >>
    <<case "bush" "bushy in the front and neat in the rear">>
      <<include Art_Vector_Pubic_Hair_Bush >>
    <<case "neat">>
      <<include Art_Vector_Pubic_Hair_Neat >>
    <<case "waxed">>
      /* no hair to display */
    <<default>>
      /* pubic hair style not supported - don't display anything*/
  <</switch>>

<</if>>


code:
:: Art_Vector_Pussy_ [nobr]

<<if _artSlave.vagina >= 0>>
  <<include Art_Vector_Pussy>>
<</if>>


code:
:: Art_Vector_Pussy_Piercings_ [nobr]

<<if _artSlave.clothes != "a latex catsuit">> /* catsuit covers crotch */
  <<if $showBodyMods == 1>>
    <<if _artSlave.vaginaPiercing == 1>>
      <<include Art_Vector_Pussy_Piercing>>
    <<elseif _artSlave.vaginaPiercing == 2>>
      <<include Art_Vector_Pussy_Piercing_Heavy>>
    <</if>>

    <<if _artSlave.clitPiercing == 1>>
      <<include Art_Vector_Clit_Piercing>>
    <<elseif _artSlave.clitPiercing == 2>>
      <<include Art_Vector_Clit_Piercing_Heavy>>
    <<elseif _artSlave.clitPiercing == 3>>
      <<include Art_Vector_Clit_Piercing_Smart>>
    <</if>>
  <</if>>
<</if>>


code:
:: Art_Vector_Set_Colour_Hair_ [nobr]

/*
"Free-Cities Dyes (taken from Cosmetic Rules Assistant Settings)"-
to-"HTML Color"-Map
courtesy of Nov-X */

<<switch _artSlave.hColor>>
<<case "auburn">>
  <<set _hairColour to "#7e543e">>
<<case "black">>
  <<set _hairColour to "#3F4040">>
<<case "blonde">>
  <<set _hairColour to "#F4F1A3">>
<<case "blue">>
  <<set _hairColour to "#4685C5">>
<<case "brown">>
  <<set _hairColour to "#8D4F21">>
<<case "burgundy">>
  <<set _hairColour to "#5f3946">>
<<case "chestnut">>
  <<set _hairColour to "#663622">>
<<case "chocolate">>
  <<set _hairColour to "#6e4937">>
<<case "copper">>
  <<set _hairColour to "#a16145">>
<<case "dark brown">>
  <<set _hairColour to "#463325">>
<<case "ginger">>
  <<set _hairColour to "#da822d">>
<<case "golden">>
  <<set _hairColour to "#ffdf31">>
<<case "green">>
  <<set _hairColour to "#5FBA46">>
<<case "grey">>
  <<set _hairColour to "#9e9fa4">>
<<case "hazel">>
  <<set _hairColour to "#8d6f1f">>
<<case "pink">>
  <<set _hairColour to "#D18CBC">>
<<case "platinum blonde">>
  <<set _hairColour to "#fcf3c1">>
<<case "red">>
  <<set _hairColour to "#BB2027">>
<<case "silver">>
  <<set _hairColour to "#cdc9c6">>
<<case "strawberry-blonde">>
  <<set _hairColour to "#e5a88c">>
<<case "blazing red">>
  <<set _hairColour to "#E00E2B">>
<<case "neon green">>
  <<set _hairColour to "#25d12b">>
<<case "neon blue">>
  <<set _hairColour to "#2284C3">>
<<case "neon pink">>
  <<set _hairColour to "#cc26aa">>
<<default>>
  /* everything else: assume it already is HTML compliant color name or value */
  <<set _hairColour to _artSlave.hColor>>
<</switch>>


code:
:: Art_Vector_Set_Colour_Outfit_

/* BEWARE: _outfitBaseColour is used by Art_Vector_Set_Colour_Skin_ */
/* BEWARE: _outfitBaseColour is read by Wardrobe Use */

<<unset _outfitBaseColour>>

<<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "restrictive latex" ||  _artSlave.clothes == "a latex catsuit">>
  <<set _outfitBaseColour = "#515351" >> /* standard "black rubber" latex colour */
  <<if def _artSlave.clothingBaseColor>>
    <<set _outfitBaseColour = _artSlave.clothingBaseColor >> /* latex colour selected by user */
    /* TODO: rewrite all textual descriptions not to explicitly mention the latex being of black colour. */
  <</if>>
<</if>>


code:
:: Art_Vector_Set_Colour_Shoe_ [nobr]

/* courtesy of Nov-X */

/* BEWARE: _shoeColour is read by Wardrobe Use */

/* note: only heels use this shadow */
<<set _shoeShadowColour to "#15406D">>

<<switch _artSlave.shoes>>
  <<case "heels" "extreme heels">>
    <<set _shoeColour to "#3E65B0">>
  <<case "boots">>
    <<set _shoeColour to "#8F8F8E">>
  <<case "flats">>
    <<set _shoeColour to "#65AD45">>
  <<case "pumps">>
    <<set _shoeColour to "#4F6AB2">>
  <<default>>
    /* use colour for "heels" by default */
    <<set _shoeColour to "#3E65B0">>
<</switch>>

<<if def _artSlave.shoeColor>>
  <<set _shoeColour = _artSlave.shoeColor >> /* shoe colour selected by user */
  <<set _shoeShadowColour to _shoeColour+";opacity: 0.5">> /* TODO: do not abuse "color" variable for style definitions. do not rely on dark background for shadow effect either. */
<</if>>

/* override colour in case of full body latex outfit */
<<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "restrictive latex" >>
  <<set _shoeColour to _skinColour>>
  <<set _shoeShadowColour to _shoeColour+";opacity: 0.5">> /* TODO: do not abuse "color" variable for style definitions. do not rely on dark background for shadow effect either. */
<</if>>


code:
:: Art_Vector_Set_Colour_Skin_

/* BEWARE: _outfitBaseColour is set by Art_Vector_Set_Colour_Outfit_ */

<<set _areolaStyle to "fill:#d76b93;" >> /* this is the default and can be customized later */
<<set _labiaStyle to _areolaStyle >> /* this is the default and can be customized later */
/* todo: introduce one "flesh" CSS class */

<<unset _headSkinStyle>>
<<unset _torsoSkinStyle >>
<<unset _boobSkinStyle>>
<<unset _penisSkinStyle>>
<<unset _scrotumSkinStyle>>

<<switch _artSlave.skin>>
<<case "light" "white" "fair" "lightened" >>
  <<set _skinColour to "#F6E0E8">>
<<case "extremely pale">>
  <<set _skinColour to "#f4eaf0">>
<<case "pale">>
  <<set _skinColour to "#f9ebf0">>
<<case "tanned" "natural">>
  <<set _skinColour to "#F4C7A5">>
<<case "olive">>
  <<set _skinColour to "#a07c48">>
<<case "light brown" "dark">>
  <<set _skinColour to "#C97631">>
  /* darker areolae and labia for more contrast to skin */
  <<set _areolaStyle to "fill:#ba3549;" >>
  <<set _labiaStyle to _areolaStyle >>
<<case "brown" >>
  <<set _skinColour to "#763818">>
<<case "black">>
  <<set _skinColour to "#3f3b3a">>
<<case "camouflage patterned">>
  <<set _skinColour to "#78875a">>
<<case "red dyed" "dyed red">>
  <<set _skinColour to "#bc4949">>
<<case "green dyed" "dyed green">>
  <<set _skinColour to "#A6C373">>
<<case "blue dyed" "dyed blue">>
  <<set _skinColour to "#5b8eb7">>
<<case "tiger striped">>
  <<set _skinColour to "#e2d75d">>
<<default>>
  <<set _skinColour to _artSlave.skin>>
<</switch>>

/* BEGIN SKIN COLOUR OVERRIDES FOR LATEX CLOTHING EMULATION */

<<if _artSlave.fuckdoll != 0>>
  /* slave is a fuckdoll - display all skin as if it was black rubber */
  <<set _skinColour to _outfitBaseColour>>
  <<set _areolaStyle to "fill:rgba(0,0,0,0.3);">>
  <<set _labiaStyle to _areolaStyle >>
<</if>>

/* slave wears restrictive latex - display most skin as if it was rubber */
<<if _artSlave.clothes == "restrictive latex">>
  /* nice latex does not cover any privates. */
  <<set _torsoSkinStyle to "fill:"+_skinColour+";">>
  <<set _boobSkinStyle to _torsoSkinStyle>>
  <<set _penisSkinStyle to _torsoSkinStyle>>
  <<set _scrotumSkinStyle to _torsoSkinStyle>>
  /* rest of body is covered in latex */
  <<set _skinColour to _outfitBaseColour>>
<</if>>
<<if _artSlave.clothes == "a latex catsuit">>
  /* nice latex does not cover head. */
  <<set _headSkinStyle to "fill:"+_skinColour+";">>
  /* rest of body is covered in latex */
  <<set _skinColour to _outfitBaseColour>>
  /* catsuit covers areolae and crotch, too */
  <<set _areolaStyle to "fill:rgba(0,0,0,0.3);">> /* areolae are represented by a darker area */
  /* todo: gain control over piercings to do the same with them ^^ */
  <<set _labiaStyle to _areolaStyle >>
<</if>>

/* END SKIN COLOUR OVERRIDES FOR LATEX CLOTHING EMULATION */


code:
:: Art_Vector_Torso_ [nobr]

/* Torso size switch courtesy of Nov-X */

/* BEWARE: _torsoSize might be used in torso outfit */

<<if _artSlave.waist < -40>>
	<<if _artSlave.weight > 30>>
		<<set _torsoSize = "Hourglass">>
	<<else>>
		<<set _torsoSize = "Unnatural">>
	<</if>>
<<elseif _artSlave.waist <= 10>>
	<<if _artSlave.weight > 30>>
		<<set _torsoSize = "Normal">>
	<<else>>
		<<set _torsoSize = "Hourglass">>
	<</if>>
<<else>>
	<<set _torsoSize = "Normal">>
<</if>>

<<set _art = "Art_Vector_Torso_"+_torsoSize >>
<<include _art >>


code:
:: Art_Vector_Torso_Outfit_ [nobr]

/* BEWARE: _torsoSize is set by Art_Vector_Torso_ */

/* TODO: latex catsuit should cover vagina and its piercings, too */

<<set _art = false >>

<<switch _artSlave.clothes>>
	<<case "restrictive latex">>
		<<set _art = "Art_Vector_Torso_Outfit_Latex_" >>
	<<case "uncomfortable straps">>
		<<set _art = "Art_Vector_Torso_Outfit_Straps_" >>
	<<default>>
		/* do nothing */
<</switch>>

<<if _art >>
	<<set _art = _art+_torsoSize >>
	<<include _art >>
<</if>>

/* shiny clothings */
<<if $seeVectorArtHighlights == 1>>
	<<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "restrictive latex" || _artSlave.clothes == "a latex catsuit">>
		<<if _artSlave.amp != 0>>
			/* this shiny shoulder only looks sensible on amputees */
			<<include Art_Vector_Torso_Outfit_Shine_Shoulder>>
		<</if>>
		<<if _artSlave.preg <= 0>>
			/* the hip can be hidden by pregnant belly */
			<<set _art = "Art_Vector_Torso_Outfit_Shine_"+_torsoSize >>
			<<include _art >>
		<</if>>
	<</if>>
<</if>>


code:
:: Art_Vector_Belly_Outfit_Shine [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path sodipodi:nodetypes="ccc" id="path4027-9" d="m 290.74565,341.76682 c 5.2665,4.35178 5.56841,11.52129 5.82323,18.71753 -2.56499,-6.10053 -4.50607,-12.3397 -5.82323,-18.71753 z" style="display:inline;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:1.12775385;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#Filter_Shine_Blur)" transform="matrix(2.806394,-0.28790498,0.2559876,2.4952748,-620.76047,-450.58168)"/></svg></html>' >>


code:
:: Art_Vector_Belly_Piercing [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><circle id="XMLID_547_" class="steel_piercing" cx="246.89999" cy="390.89999" r="1.2"/><circle id="XMLID_548_" class="steel_piercing" cx="246.89999" cy="395" r="1.2"/></svg></html>' >>


code:
:: Art_Vector_Butt_Outfit_Shine_0 [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path sodipodi:nodetypes="ccc" id="path4027-2-5-2" d="m 374.32263,419.48846 c 9.3676,8.5745 20.75845,16.21829 24.99431,40.75881 -5.80029,-17.86523 -20.76554,-35.0049 -24.99431,-40.75881 z" style="display:inline;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#Filter_Shine_Blur)" transform="matrix(0.96251573,0.27122589,-0.27122589,0.96251573,109.72954,-84.004665)"/></svg></html>' >>


code:
:: Art_Vector_Butt_Outfit_Shine_1 [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path sodipodi:nodetypes="ccc" id="path4027-2-5-3" d="m 369.14719,420.64127 c 12.0312,9.35178 25.93389,15.06548 30.16975,39.606 -5.80029,-17.86523 -25.94098,-33.85209 -30.16975,-39.606 z" style="display:inline;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#Filter_Shine_Blur)" transform="matrix(0.99928736,-0.03774624,0.03774624,0.99928736,-30.670201,9.8258533)"/></svg></html>' >>


code:
:: Art_Vector_Butt_Outfit_Shine_2 [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path sodipodi:nodetypes="ccc" id="path4027-2-5" d="m 369.14719,420.64127 c 12.0312,9.35178 25.93389,15.06548 30.16975,39.606 -5.80029,-17.86523 -25.94098,-33.85209 -30.16975,-39.606 z" style="display:inline;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#Filter_Shine_Blur)" transform="matrix(0.99928736,-0.03774624,0.03774624,0.99928736,-22.351298,14.817195)"/></svg></html>' >>


code:
:: Art_Vector_Butt_Outfit_Shine_3 [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path sodipodi:nodetypes="ccc" id="path4027-2" d="m 369.14719,420.64127 c 12.0312,9.35178 25.93389,15.06548 30.16975,39.606 -5.80029,-17.86523 -25.94098,-33.85209 -30.16975,-39.606 z" style="display:inline;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#Filter_Shine_Blur)" transform="matrix(0.99729094,-0.07355799,0.07355799,0.99729094,-31.357293,29.456529)"/></svg></html>' >>


code:
:: Art_Vector_Clit_Piercing [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><circle r="1.2" cy="435.60001" cx="268.29999" class="steel_piercing" id="XMLID_537_"/><circle r="1.2" cy="436.10001" cx="263.60001" class="steel_piercing" id="XMLID_538_"/></svg></html>' >>


code:
:: Art_Vector_Head_Outfit_Shine [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path sodipodi:nodetypes="ccc" id="path4027-75" d="m 308.69363,93.705843 c 6.12129,1.942001 8.41769,9.412737 8.67251,17.211417 -2.56499,-6.10053 -5.64578,-11.737253 -8.67251,-17.211417 z" style="display:inline;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:2.11298418;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#Filter_Shine_Blur)" transform="matrix(1.4598262,0,0,1.3808576,-143.26648,-38.263379)"/></svg></html>' >>


code:
:: Art_Vector_Navel_Piercing [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><circle r="1.2" cy="364.39999" cx="262.29999" class="steel_piercing" id="XMLID_515_"/><circle r="1.2" cy="368.60001" cx="262.29999" class="steel_piercing" id="XMLID_516_"/></svg></html>' >>


code:
:: Art_Vector_Pussy_Tattoo [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><path style="fill:none;stroke:none" d="m 247.43521,421.40369 c 11.48595,-7.47207 25.83395,-7.39381 43.33727,-0.45163" id="path4363" sodipodi:nodetypes="cc"/><text xml:space="preserve" id="text4365" sodipodi:linespacing="125%" style="font-size:12px;line-height:125%;text-align:center;text-anchor:middle" x="25.568281" y="0"><textPath xlink:href="#path4363" id="textPath4369" style="font-size:12px;text-align:center;text-anchor:middle">'+_art_pussy_tattoo_text+'</textPath></text></svg></html>' >>


code:
:: Art_Vector_Torso_Outfit_Shine [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#Filter_Shine_Blur)" d="m 343.38233,211.76475 c 7.68861,5.15453 13.5278,12.59965 19.26471,19.70588 0,0 -5.44118,-16.61764 -19.26471,-19.70588 z" id="path4902" sodipodi:nodetypes="ccc"/></svg></html>' >>


code:
:: Art_Vector_Torso_Outfit_Shine_Hourglass [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path sodipodi:nodetypes="ccc" id="path4027-70-6" d="m 319.74252,375.06332 c 4.22284,7.09969 13.30704,21.13279 19.66871,31.59093 -12.96362,-6.10053 -18.5743,-22.88972 -19.66871,-31.59093 z" style="display:inline;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#Filter_Shine_Blur)"/></svg></html>' >>


code:
:: Art_Vector_Torso_Outfit_Shine_Normal [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path sodipodi:nodetypes="ccc" id="path4027-70-1" d="m 332.13219,367.13946 c 1.41216,9.42307 -1.43557,29.939 7.27904,39.51479 -12.96362,-6.10053 -10.95321,-29.8094 -7.27904,-39.51479 z" style="display:inline;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#Filter_Shine_Blur)"/></svg></html>' >>


code:
:: Art_Vector_Torso_Outfit_Shine_Shoulder [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#Filter_Shine_Blur)" d="m 343.38233,211.76475 c 7.68861,5.15453 13.5278,12.59965 19.26471,19.70588 0,0 -5.44118,-16.61764 -19.26471,-19.70588 z" id="path4902" sodipodi:nodetypes="ccc"/></svg></html>' >>


code:
:: Art_Vector_Torso_Outfit_Shine_Unnatural [nobr]

<<print '<html><svg viewBox="0 0 560 1000" class="'+_art_display_class+'"><defs id="defs4360"><filter style="color-interpolation-filters:sRGB" inkscape:label="Filter_Shine_Blur" id="Filter_Shine_Blur" width="4" x="-2" height="4" y="-2"><feGaussianBlur stdDeviation="1.5 1.5" result="blur" id="feGaussianBlur4091-3"/></filter></defs><path sodipodi:nodetypes="ccc" id="path4027-70" d="m 310.91899,377.12214 c 5.98755,6.51146 19.77763,19.95632 28.49224,29.53211 -12.96362,-6.10053 -25.92724,-20.24266 -28.49224,-29.53211 z" style="display:inline;fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#Filter_Shine_Blur)"/></svg></html>' >>


code:
:: MOD_Edit Arcology Cheat Datatype Cleanup [nobr]

<<set $nextButton = "Continue", $nextLink = "Manage Arcology">>

<<set $ACitizens = Number($ACitizens) || 0>>
<<set $ASlaves = Number($ASlaves) || 0>>
<<set $shelterAbuse = Number($shelterAbuse) || 0>>

<<set $TSS.studentsBought = Number($TSS.studentsBought) || 0>>
<<set $TSS.schoolProsperity = Number($TSS.schoolProsperity) || 0>>

<<set $GRI.studentsBought = Number($GRI.studentsBought) || 0>>
<<set $GRI.schoolProsperity = Number($GRI.schoolProsperity) || 0>>

<<set $SCP.studentsBought = Number($SCP.studentsBought) || 0>>
<<set $SCP.schoolProsperity = Number($SCP.schoolProsperity) || 0>>

<<set $LDE.studentsBought = Number($LDE.studentsBought) || 0>>
<<set $LDE.schoolProsperity = Number($LDE.schoolProsperity) || 0>>

<<set $TGA.studentsBought = Number($TGA.studentsBought) || 0>>
<<set $TGA.schoolProsperity = Number($TGA.schoolProsperity) || 0>>

<<set $TCR.studentsBought = Number($TCR.studentsBought) || 0>>
<<set $TCR.schoolProsperity = Number($TCR.schoolProsperity) || 0>>

<<set $TFS.studentsBought = Number($TFS.studentsBought) || 0>>
<<set $TFS.schoolProsperity = Number($TFS.schoolProsperity) || 0>>

<<set $arcologies[0].ownership = Number($arcologies[0].ownership) || 0>>
<<set $arcologies[0].minority = Number($arcologies[0].minority) || 0>>

<<set $PC.actualAge = Number($PC.actualAge) || 35>>
<<set $PC.physicalAge = $PC.actualAge, $PC.visualAge = $PC.actualAge>>

The chanting grows louder and louder, CHEAT! CHEAT! CHEAT!

The Arcology morphs and changes shape, CHEAT! CHEAT! CHEAT!

The Arcology has been changed forever and you forfeit your CHEATING CHEATY SOUL!