:: Options [nobr jump-to-safe jump-from-safe]

<style>
.subHeading {
	width: 85%;
	text-align: center;
	margin-top: 1.5em;
}
.scLink {
	width: 85%;
	text-align: center;
}
.scLink2 {
	width: 73%;
	text-align: center;
}
</style>

<<if lastVisited("Slave Interact") === 1>>
	<<set $storedLink = "Slave Interact">>
<<else>>
	<<set $storedLink = "Main">>
<</if>>

<<set $nextButton = "Back", $nextLink = $storedLink, $encyclopedia = "How to Play">>
<<set $passageSwitchHandler = App.EventHandlers.optionsChanged>>

<<set _options = new App.UI.OptionsGroup()>>
<<run _options.addOption("End of week autosaving is currently", "autosave")
.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>
<<includeDOM _options.render()>>

<br>
This save was created using FC version $ver build $releaseID.
<br>&nbsp;&nbsp;&nbsp;&nbsp;[[Apply Backwards Compatibility Update|Backwards Compatibility]]
<<if $secExpEnabled == 1>>
	<br>&nbsp;&nbsp;&nbsp;&nbsp;[[Apply Security Expansion mod backwards compatibility |SecExpBackwardCompatibility]]
<</if>>
<<if $SF.Toggle && $SF.Active >= 1>>
	<br>&nbsp;&nbsp;&nbsp;&nbsp;
	<<link "Apply Special Force Expansion mod backwards compatibility">>
		<<= App.SF.BC()>>
		<<goto "Options">>
	<</link>>
<</if>>
<br><<link "Reset extended family mode controllers">>
		<<run resetFamilyCounters()>>
		<<replace "#familyHint">>//@@.lightgreen;Done:@@ all family relations flushed and rebuilt.//<</replace>>
	<</link>>
<span id="familyHint">//Clears and rebuilds .sister and .daughter tracking.//</span>
<<if isNaN($rep)>>
	<br>[[Reset Reputation|Options][$rep = 0]]
<</if>>
<<if isNaN($cash)>>
	<br>[[Reset Money|Options][$cash = 500]]
<</if>>
<<if $releaseID == 1057>>
	<br>[[Free male anatomy removal due to accidentally flawed updater|Options][$PC.dick = 0, $PC.balls = 0, $PC.prostate = 0, $PC.scrotum = 0, $PC.ballsImplant = 0]] //Use this if your female PC picked up a few extra parts during the conversion process.//
<</if>>

<<if ($releaseID >= 1000) || $ver.startsWith("0.9") || $ver.startsWith("0.8") || $ver.startsWith("0.7") || $ver.startsWith("0.6")>>
	<br><br>
	''NEW GAME PLUS''
	<br>
	//You can begin a new game with up to five (or more) of your current slaves, although starting resources other than these slaves will be reduced. New Game Plus @@.yellow;MAY@@ work across versions. To attempt to migrate a save across versions://
	<br>&nbsp;&nbsp;&nbsp;&nbsp;//1) Save on this screen//
	<br>&nbsp;&nbsp;&nbsp;&nbsp;//2) Re-open the .html in a new tab then load the above save.//
	<br>&nbsp;&nbsp;&nbsp;&nbsp;//3) [[Activate New Game Plus.|New Game Plus][$ui = "start"]]
<<else>>
	//New Game Plus is not available because this game was not started with a compatible version.//
<</if>>
<br>

<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.Options)>>

<div class="tabbar">
	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Display')" id="tab Display">Display</button>
	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'CONTENT&FLAVOR')" id="tab CONTENT&FLAVOR">Content & flavour</button>
	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'MODS')" id="tab MODS">Mods</button>
	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'DEBUG/CHEATING')" id="tab DEBUG/CHEATING">Debug/cheating</button>
	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Experimental')" id="tab Experimental">Experimental</button>
</div>

<div id="Display" class="tabcontent">
	<div class="content">
		<h2>Reports</h2>

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("End week report descriptive details are", "showEWD")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("End week report performance details are", "showEWM")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Master Suite report details such as slave changes are", "verboseDescriptions")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Accordion effects on weekly reports are", "useAccordion")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Economic Tabs on weekly reports are", "useTabs")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Economic detail sheets for facilities are", "showEconomicDetails")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Economic report neighbor details such as trade impacts on culture are", "showNeighborDetails")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Numeric formatting is currently", "formatNumbers")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("This will comma-format numbers in some areas.")>>

		<<includeDOM _options.render()>>

		<h2>General</h2>

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("Color Control").customButton("Flip lightning", () => flipColors(setup.lightColorMap))>>

		<<run _options.addOption("Main menu leadership controls displayed", "positionMainLinks")
		.addValueList([["Above", 1], ["Above and below", 0], ["Below", -1]])>>

		<<run _options.addOption("New Model UI", "newModelUI")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Penthouse Facility Display", "verticalizeArcologyLinks")
		.addValueList([["Triple column", 3], ["Double Coloumn", 2], ["Single Column", 1], ["Collapsed", 0]])>>

		<<run _options.addOption("Main menu arcology description", "seeArcology")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Main menu desk description", "seeDesk")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Main menu newsfeed", "seeFCNN")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Tips from the Encyclopedia are", "showTipsFromEncy")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Help tooltips are", "tooltipsEnabled")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("This is mostly for new players. @@.exampleTooltip.noteworthy;Colored text@@ can have tooltips.")>>

		<<run _options.addOption("Main menu slave tabs are", "useSlaveSummaryTabs")
		.addValue("Enabled", 1).on().addValue("CardStyle", 2).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("The slave Quick list in-page scroll-to is", "useSlaveListInPageJSNavigation")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Condense special slaves into their own tab", "useSlaveSummaryOverviewTab")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Interactions with your fucktoys are", "fucktoyInteractionsPosition")
		.addValueList([["next to them", 1], ["at page bottom", 0]])>>

		<<run _options.addOption("Line separations are", "lineSeparations")
		.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

		<<includeDOM _options.render()>>

		<h2>Sidebar</h2>

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("Cash is", "Cash", $sideBarOptions)
		.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

		<<run _options.addOption("Upkeep is", "Upkeep", $sideBarOptions)
		.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

		<<run _options.addOption("Sex slave count is", "SexSlaveCount", $sideBarOptions)
		.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

		<<run _options.addOption("Room population is", "roomPop", $sideBarOptions)
		.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

		<<run _options.addOption("GSP is", "GSP", $sideBarOptions)
		.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

		<<run _options.addOption("Rep is", "Rep", $sideBarOptions)
		.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

		<<run _options.addOption("Confirmation before ending a week is", "confirmWeekEnd", $sideBarOptions)
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Enabling this will open a dialog box to confirm you meant to end a week.")>>

		<<if $secExpEnabled > 0>>
			<<run _options.addOption("Authority is", "Authority", $sideBarOptions)
			.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

			<<run _options.addOption("Security is", "Security", $sideBarOptions)
			.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

			<<run _options.addOption("Crime is", "Crime", $sideBarOptions)
			.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>
		<</if>>

		<<includeDOM _options.render()>>

		<h2>Images</h2>

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("Images are", "seeImages")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<includeDOM _options.render()>>

		<<if $seeImages > 0>>
			<div class="imageRef" style="width:200px;height:200px;margin-left:50px;">
				<<= SlaveArt(BaseSlave(), 0, 0)>>
			</div>

			<<set _options = new App.UI.OptionsGroup()>>

			<<run _options.addOption("", "imageChoice")
			.addValueList([["Revamped embedded vector art", 3], ["Non-embedded vector art", 2], ["NoX/Deepmurk's vector art", 1], ["Shokushu's rendered imagepack", 0]])>>

			<<if $imageChoice === 1>>
				<<run _options.addOption("").addComment('<span class="warning">Git compiled only, no exceptions.</span>')>>

				<<run _options.addOption("Face artwork is", "seeFaces")
				.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

				<<run _options.addOption("Highlights on shiny clothing are", "seeVectorArtHighlights")
				.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

				<<run _options.addOption("Height scaling", "seeHeight")
				.addValue("All images", 2).on().addValue("Small images", 1).neutral().addValue("Disabled", 0).off()>>

				<<run _options.addOption("Clothing erection bulges are", "showClothingErection")
				.addValue("Enabled", true).on().addValue("Disabled", false).off()>>
			<<elseif $imageChoice === 0>>
				<<run _options.addOption("").addComment(`You need """to"""
					<a href="https://mega.nz/#!upoAlBaZ!EbZ5wCixxZxBhMN_ireJTXt0SIPOywO2JW9XzTIPhe0">download the image pack</a>
					"""and""" put the 'renders' folder into the resources/ folder where this html file is.`
				)>>

				<<run _options.addOption("Slave summary fetish images are", "seeMainFetishes")
				.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>
			<<elseif $imageChoice === 3>>
				<<run _options.addOption("").addComment('<span class="warning">Git compiled only, no exceptions.</span>')>>

				<<run _options.addOption("Clothing erection bulges are", "showClothingErection")
				.addValue("Enabled", true).on().addValue("Disabled", false).off()>>
			<</if>>

			<<run _options.addOption("PA avatar art is", "seeAvatar")
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

			<<run _options.addOption("Slave images in lists are", "seeSummaryImages")
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

			<<run _options.addOption("Slave images in the weekly report are", "seeReportImages")
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

			<<includeDOM _options.render()>>
		<</if>>
	</div>
</div>

<div id="CONTENT&FLAVOR" class="tabcontent">
	<div class="content">
		<h2>Content</h2>

		//More granular control of what appears is in [[Description Options]].//

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("The difficulty setting is currently set to", "baseDifficulty")
		.addValueList([["Very easy", 1], ["Easy", 2], ["Default", 3], ["Hard", 4], ["Very hard", 5]])>>

		<<run _options.addOption("Slaves falling ill is currently", "seeIllness")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Will not affect existing ill slaves already in-game.")>>

		<<run _options.addOption("Extreme content like amputation is currently", "seeExtreme")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Will not affect extreme surgeries already applied in-game.")>>

		<<run _options.addOption("Bestiality related content is currently", "seeBestiality")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Watersports related content is currently", "seePee")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Incest content is currently", "seeIncest")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Pregnancy related content is currently", "seePreg")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Will not affect existing pregnancies already in-game.")>>

		<<run _options.addOption("Child gender to be generated based off dick content settings", "seeDicksAffectsPregnancy")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("<<if $seeDicksAffectsPregnancy === 1>>Currently <<print $seeDicks>>% of children will be born male. <</if>>Will not affect existing pregnancies already in-game.")>>

		<<if $seeDicksAffectsPregnancy > 0>>
			<<run _options.addOption("XX slaves can have sons", "adamPrinciple")
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
			.addComment("Will not affect existing pregnancies already in-game.")>>
		<</if>>

		<<run _options.addOption("Extreme pregnancy content like broodmothers is currently", "seeHyperPreg")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Will not affect existing hyperpregnancies already in-game.")>>

		<<run _options.addOption("Pregnancy complications due to multiples and body size are currently", "dangerousPregnancy")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Precocious puberty (pregnancy younger than $fertilityAge)", "precociousPuberty")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Will not affect existing precocious puberty cases already in-game.")>>

		<<run _options.addOption("Slaves with fat lips or heavy oral piercings may lisp", "disableLisping")
		.addValue("Yes", 0).on().addValue("No", 1).off()>>

		<<run _options.addOption("Disables the tiredness mechanic. //Temp option//", "disableTiredness")
		.addValue("Enabled", 0).on().addValue("Disabled", 1).off()>>

		<<run _options.addOption("Disables the long term damage mechanic. //Temp option//", "disableLongDamage")
		.addValue("Enabled", 0).on().addValue("Disabled", 1).off()>>

		<<run _options.addOption("Experimental male pronouns are currently", "diversePronouns")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Apply Backwards Compatibility after changing to update slave's pronouns. Not all scenes support male pronouns and this is not yet incorporated into the lore or mechanics.")>>

		<<run _options.addOption("Male slave names are currently", "allowMaleSlaveNames")
		.addValue("Enabled", true).on().addValue("Disabled", false).off()
		.addComment("This only affects slave generation and not your ability to name your slaves.")>>

		<<run _options.addOption("Missing slave names are currently", "showMissingSlaves")
		.addValue("Enabled", true).on().addValue("Disabled", false).off()>>

		<<includeDOM _options.render()>>

		<h2>Intersecting mechanics</h2>

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("Slave assets affected by weight is", "weightAffectsAssets")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Diet will still affect asset size.")>>

		<<run _options.addOption("Curative side effects are", "curativeSideEffects")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("If enabled, curatives have a chance to give slaves harmful side effects.")>>

		<<includeDOM _options.render()>>

		<h2>Flavour</h2>

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("Slave reactions to facility assignments are", "showAssignToScenes")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Post sex clean up", "postSexCleanUp")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Appraisal miniscenes on slave sale are", "showAppraisal")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Assignment performance vignettes on the end week report are", "showVignettes")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Slaves can have alternate titles", "newDescriptions")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Family titles for relatives", "allowFamilyTitles")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Limit family growth", "limitFamilies")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Restricts acquisition of additional relatives, by means other than birth, for slaves with families.")>>

		<<run _options.addOption("Distant relatives such as aunts, nieces and cousins are", "showDistantRelatives")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<includeDOM _options.render()>>
	</div>
</div>

<div id="MODS" class="tabcontent">
	<div class="content">
		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("The Special Force Mod is currently", "Toggle", $SF)
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		/*
		<<if $SF.Toggle > 0>>
			<<options $SF.Facility.Toggle>>
				<br>&nbsp;The support facility is
				<<option 1 "Enabled">>
				<<option 0 "Disabled">>
			<</options>>
		<</if>> //Prep for future content.//
		*/

		<<run _options.addOption("The Security Expansion mod is", "secExpEnabled")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("<div>The mod can be activated in any moment, but it may result in unbalanced gameplay if activated very late in the game.</div>
			<div>''If you are enabling the mod mid game for the first time, run the either the main or mod specific BC option listed near the top.''</div>")>>

		<<includeDOM _options.render()>>

		<<if $secExpEnabled > 0>>
			<h2>Security Expansion mod options</h2>


			<<if $terrain === "oceanic">>
				<div>Oceanic arcologies are not by default subject to external attacks. You can however allow them to happen anyway. If you choose to do so please keep in mind that descriptions and mechanics are not intended for naval combat but land combat.</div>
			<</if>>

			<<set _options = new App.UI.OptionsGroup()>>

			<<if $SecExp.settings.battle.enabled > 0 || $SecExp.settings.rebellion.enabled > 0>>
				<<run _options.addOption("Detailed battle statistics are", "showStats", $SecExp.settings)
				.addValue("Shown", 1).on().addValue("Hidden", 0).off()
				.addComment("Visability of detailed statistics and battle turns.")>>

				<<run _options.addOption("Difficulty is", "difficulty", $SecExp.settings)
				.addValueList([["Extremely hard", 2], ["Very hard", 1.5], ["Hard", 1.25], ["Normal", 1], ["Easy", 0.75], ["Very easy", 0.5]])>>

				<<run _options.addOption("Unit descriptions are", "unitDescriptions", $SecExp.settings)
				.addValue("Abbreviated", 1).addValue("Summarized", 0)>>
			<</if>>

			<<run _options.addOption("Battles are", "enabled", $SecExp.settings.battle)
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

			<<run _options.addOption("Rebellions are", "enabled", $SecExp.settings.rebellion)
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

			<<if $SecExp.settings.battle.enabled > 0>>
				<<run _options.addOption("Battle frequency", "frequency", $SecExp.settings.battle)
				.addValueList([["Extremely high", 2], ["Very high", 1.5], ["High", 1.25], ["Normal", 1], ["Low", 0.75], ["Very low", 0.5]])>>
			<</if>>

			<<if $SecExp.settings.rebellion.enabled > 0>>
				<<run _options.addOption("Rebellion buildup", "speed", $SecExp.settings.rebellion)
				.addValueList([["Extremely fast", 2], ["Very fast", 1.5], ["Fast", 1.25], ["Normal", 1], ["Slow", 0.75], ["Very slow", 0.5]])>>
			<</if>>


			<<if $SecExp.settings.battle.enabled > 0>>
				<<run _options.addOption("Commanders gain a prestige rank every 10 victories", "allowSlavePrestige", $SecExp.settings.battle)
				.addValue("Yes", 1).on().addValue("No", 0).off()>>
			<</if>>

			<<if $SecExp.settings.battle.enabled > 0>>
				<<run _options.addOption("Force battles", "force", $SecExp.settings.battle)
				.addValue("Yes", 1).on().addValue("No", 0).off()>>
			<</if>>
			<<if $SecExp.settings.rebellion.enabled > 0>>
				<<run _options.addOption("Force rebellions", "force", $SecExp.settings.rebellion)
				.addValue("Yes", 1).on().addValue("No", 0).off()
				.addComment("Rebellions take precedence over Battles.")>>
			<</if>>

			<<if $SecExp.settings.battle.enabled > 0>>
				<<run _options.addOption("Late game major battles are", "enabled", $SecExp.settings.battle.major)
				.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>
			<</if>>

			<<if $SecExp.settings.battle.enabled > 0 && $SecExp.settings.battle.major.enabled > 0>>
				<<run _options.addOption("Multiplier is", "mult", $SecExp.settings.battle.major)
				.addValueList([["Extremely high", 2], ["Very high", 1.5], ["High", 1.25], ["Normal", 1], ["Low", 0.75], ["Very low", 0.5]])>>

				<<run _options.addOption("This week a major battle is", "force", $SecExp.settings.battle.major)
				.addValue("Guaranteed", 1).on().addValue("Not guaranteed", 0).off()>>
			<</if>>

			<<if $SecExp.settings.battle.enabled > 0 && $SecExp.settings.battle.major.enabled > 0>>
				<<run _options.addOption("Gameover on battle loss", "gameOver", $SecExp.settings.battle.major)
				.addValue("Yes", 1).on().addValue("No", 0).off()>>
			<</if>>

			<<if $SecExp.settings.rebellion.enabled > 0>>
				<<run _options.addOption("Gameover on rebellion loss", "gameOver", $SecExp.settings.rebellion)
				.addValue("Yes", 1).on().addValue("No", 0).off()>>
			<</if>>

			<<includeDOM _options.render()>>

			<div class="subHeading">
			<<if $debugMode || $cheatMode || $cheatModeM>>
				''Debug/cheat''
				<<run MenialPopCap()>>

				<style>
					table.invisible {
						table-layout: fixed;
						border-collapse: separate;
						border-spacing: 5px;
						margin:1em auto;
					}
				</style>

				<table class="invisible">
				<tr style="text-align:center">
				<td colspan="2" >
				<<link "Set loyalty high" "Options">>
					<<for _i = 0; _i < $militiaUnits.length; _i++>>
						<<set $militiaUnits[_i].loyalty = random(80,100)>>
					<</for>>

					<<for _i = 0; _i < $slaveUnits.length; _i++>>
						<<set $slaveUnits[_i].loyalty = random(80,100)>>
					<</for>>

					<<for _i = 0; _i < $mercUnits.length; _i++>>
						<<set $mercUnits[_i].loyalty = random(80,100)>>
					<</for>>
				<</link>>
				| <<link "Set loyalty average" "Options">>
					<<for _i = 0; _i < $militiaUnits.length; _i++>>
						<<set $militiaUnits[_i].loyalty = random(40,60)>>
					<</for>>

					<<for _i = 0; _i < $slaveUnits.length; _i++>>
						<<set $slaveUnits[_i].loyalty = random(40,60)>>
					<</for>>

					<<for _i = 0; _i < $mercUnits.length; _i++>>
						<<set $mercUnits[_i].loyalty = random(40,60)>>
					<</for>>
				<</link>>
				| <<link "Set loyalty low" "Options">>
					<<for _i = 0; _i < $militiaUnits.length; _i++>>
						<<set $militiaUnits[_i].loyalty = random(20)>>
					<</for>>

					<<for _i = 0; _i < $slaveUnits.length; _i++>>
						<<set $slaveUnits[_i].loyalty = random(20)>>
					<</for>>

					<<for _i = 0; _i < $mercUnits.length; _i++>>
						<<set $mercUnits[_i].loyalty = random(20)>>
					<</for>>
				<</link>>
				| <<link "Randomize loyalty" "Options">>
					<<for _i = 0; _i < $militiaUnits.length; _i++>>
						<<set $militiaUnits[_i].loyalty = random(100)>>
					<</for>>

					<<for _i = 0; _i < $slaveUnits.length; _i++>>
						<<set $slaveUnits[_i].loyalty = random(100)>>
					<</for>>

					<<for _i = 0; _i < $mercUnits.length; _i++>>
						<<set $mercUnits[_i].loyalty = random(100)>>
					<</for>>
				<</link>>
				</td>
				</tr>

				<tr style="text-align:center">
				<td colspan="2">
				<<link "Give Authority" "Options">>
					<<set $SecExp.core.authority = Math.clamp($SecExp.core.authority + 1000, 0, 20000)>>
				<</link>>
				| <<link "Remove Authority" "Options">>
					<<set $SecExp.core.authority = Math.clamp($SecExp.core.authority - 1000, 0, 20000)>>
				<</link>>
				</td>
				</tr>

				<tr>
				<td style="text-align:right">
				<<link "Raise security" "Options">>
					<<set $SecExp.security.cap = Math.clamp($SecExp.security.cap + 5, 0, 100)>>
				<</link>>
				| <<link "Lower security" "Options">>
					<<set $SecExp.security.cap = Math.clamp($SecExp.security.cap - 5, 0, 100)>>
				<</link>>
				</td>

				<td style="text-align:left">
				<<link "Raise crime" "Options">>
					<<set $SecExp.core.crimeLow = Math.clamp($SecExp.core.crimeLow + 5, 0, 100)>>
				<</link>>
				| <<link "Lower crime" "Options">>
					<<set $SecExp.core.crimeLow = Math.clamp($SecExp.core.crimeLow - 5, 0, 100)>>
				<</link>>
				</td>
				</tr>

				<tr>
				<td style="text-align:right">
				<<link "Give militia manpower" "Options">>
					<<set $militiaFreeManpower += 30>>
					<<recalcManpower>>
				<</link>>
				| <<link "Remove militia manpower" "Options">>
					<<set $militiaFreeManpower = Math.max($militiaFreeManpower - 30, 0)>>
					<<recalcManpower>>
				<</link>>
				</td>

				<td style="text-align:left">
				<<link "Give mercs manpower" "Options">>
					<<set $mercFreeManpower += 30>>
					<<recalcManpower>>
				<</link>>
				| <<link "Remove mercs manpower" "Options">>
					<<set $mercFreeManpower = Math.max($mercFreeManpower - 30, 0)>>
					<<recalcManpower>>
				<</link>>
				</td>
				</tr>

				</table>
			<</if>>	/* closes cheatmode check */
			</div>
		<</if>> /* closes SecExp check*/
	</div>
</div>

<div id="DEBUG/CHEATING" class="tabcontent">
	<div class="content">
		<h2>Debug</h2>

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("DebugMode is", "debugMode")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("This will add a Display Variables and Bug Report passage to the sidebar.")>>

		<<if $debugMode > 0>>
			<<run _options.addOption("The custom function part of debug mode is", "debugModeCustomFunction")
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>
		<</if>>

		<<set _option =  _options.addOption("Genetics array")
		.customButton("Run test", () => Engine.play("test genetics"))>>
		<<if $cheatMode == 1>>
			<<run _option.customButton("Edit Genetics", () => Engine.play("Edit Genetics"))>>
		<<else>>
			<<run _option.addComment("Enable cheat mode to edit genetics.")>>
		<</if>>

		<<run _options.addOption("Rules Assistant").addCustomElement('<<button "Reset Rules">><<include "Init Rules">><<goto "Rules Assistant">><</button>>')>>

		<<run _options.addOption("Passage Profiler is", "profiler")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("Outputs performance data at the bottom of every passage.")>>

		<<includeDOM _options.render()>>

		<h2>Cheating</h2>

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("CheatMode is", "cheatMode")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("This will allow manual selection of events and unlock some options that would usually be restricted by progress.")>>

		<<if $cheatMode === 0>>
			<<includeDOM _options.render()>>
		<<else>>
			<<run _options.addOption("Sidebar Cheats are currently", "cheatModeM")
			.addValue("Shown", 1).on().addValue("Hidden", 0).off()>>

			<<run _options.addOption("Slave aging", "seeAge")
			.addValue("Enabled", 1).on().addValue("Celebrate birthdays, but don't age.", 2).neutral().addValue("Disabled", 0).off()>>

			<<includeDOM _options.render()>>

			<div class="scLink2">
			[[Add 100000 money|Options][$cheater = 1, cashX(100000, "cheating")]] | [[Add 10000 rep|Options][$cheater = 1, repX(10000, "cheating")]] //Cheating will be flagged in your save//
			</div>

			<div class="scLink2">
			<<= SectorCounts()>>
			<<link "Raise prosperity cap" "Options">>
				<<set $AProsperityCapModified += 10>>
			<</link>>
			| <<link "Lower prosperity cap" "Options">>
				<<set $AProsperityCapModified -= 10>>
			<</link>>

			<br>
			<<link "Raise prosperity" "Options">>
				<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity + 10, 0, $AProsperityCap)>>
			<</link>>
			| <<link "Lower prosperity" "Options">>
				<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity - 10, 0, $AProsperityCap)>>
			<</link>>

			<br>
			<<link "Give menial slaves" "Options">>
				<<set $menials = Math.clamp($menials + 30, 0, $PopCap)>>
			<</link>>
			| <<link "Remove menial slaves" "Options">>
				<<set $menials = Math.clamp($menials - 30, 0, $PopCap)>>
			<</link>>
			</div>

			/%
			<br>Thanks for making this a right pain twine
			<br>
			<<link "Add citizens" "Options">> /*Will no longer work as intended due to population changes*/
				<<set $lowerClass = Math.max($lowerClass + 200, 0)>>
			<</link>>
			| <<link "Remove citizens" "Options">> /*also no longer properly functional*/
				<<set $lowerClass = Math.max($lowerClass - 200, 0)>>
			<</link>>

			<br>
			<<link "Add slaves" "Options">> /*Will work to a limited degree, minimums and maximums for slaves are set through population*/
				<<set $NPCSlaves = Math.max($NPCSlaves + 200, 0)>>
			<</link>>
			| <<link "Remove slaves" "Options">> /*Will work to a limited degree*/
				<<set $NPCSlaves = Math.max($NPCSlaves - 200, 0)>>
			<</link>>
			%/
		<</if>>
	</div>
</div>

<div id="Experimental" class="tabcontent">
	<div style="fontWeight:bold">
		Experimental means just that: experimental. Options below are likely to be in an <span class="yellow">even more incomplete or broken state than usual.</span> <span class="red">THEY MAY NOT WORK AT ALL.</span> Make sure you back up your save before enabling any of these, and if you are that interested, consider helping to improve them.
	</div>

	<p>
		UI theme selector. Allows to select a single CSS file to be loaded. <span class="red">The file has to be located in the same directory as the HTML file otherwise it will simply not load at all.</span>
		<<includeDOM App.UI.Theme.selector()>>
	</p>

	<<set _options = new App.UI.OptionsGroup()>>

	<<if $seePreg !== 0>>
		<<run _options.addOption("Nursery is", "nursery", $experimental)
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("This will enable the experimental nursery, which allows players to interact with growing slave children. An alternative to the incubator.")>>
	<</if>>

	<<run _options.addOption("Food is", "food", $experimental)
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
	.addComment("This will enable the experimental food supply and demand system, as well as a new farmyard building and assignments.")>>

	<<if $seeExtreme === 1 && $seeBestiality === 1>>
		<<run _options.addOption("Animal Ovaries are", "animalOvaries", $experimental)
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("This will allow slaves to be impregnated by animals.")>>
	<</if>>

	<<if $seeExtreme === 1>>
		<<run _options.addOption("Dinner party", "dinnerParty", $experimental)
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
		.addComment("This will enable a controversial but very broken event. Warning: Snuff, cannibalism.")>>
	<</if>>

	<<includeDOM _options.render()>>
</div>

src/uncategorized/options.tw