diff --git a/src/gui/css/options.css b/src/gui/css/options.css index eaaa502438caf7810c0b83ed84863fa6c76f1aac..fc2ad5bced6c6cf2be11fc4abd4644f8c4d7a945 100644 --- a/src/gui/css/options.css +++ b/src/gui/css/options.css @@ -83,3 +83,24 @@ div.options-group input { div.options-group input.number { width: 50px; } + +.subHeading { + width: 85%; + text-align: center; + margin-top: 1.5em; +} +.scLink { + width: 85%; + text-align: center; +} +.scLink2 { + width: 73%; + text-align: center; +} + +table.invisible { + table-layout: fixed; + border-collapse: separate; + border-spacing: 5px; + margin:1em auto; +} \ No newline at end of file diff --git a/src/gui/options/options.tw b/src/gui/options/options.tw index b5df4232895fee2e73c527ec9edc780472672753..ca66ab0ffb92b01a2d5066879ccc78c592c88172 100644 --- a/src/gui/options/options.tw +++ b/src/gui/options/options.tw @@ -1,21 +1,5 @@ :: 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>> @@ -23,724 +7,5 @@ <</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()>> - -<div> - This save was created using FC version $ver build $releaseID. You are currently playing version: <<= App.Version.base>>, mod version: <<= App.Version.pmod>>, build: <<= App.Version.release>><<if App.Version.commitHash>>, commit: <<= App.Version.commitHash>><</if>> -</div> -<div class="indent"> - [[Apply Backwards Compatibility Update|Backwards Compatibility]] -</div> -<<link "Reset extended family mode controllers">> - <<run resetFamilyCounters()>> - <<replace "#family-hint">>//@@.lightgreen;Done:@@ all family relations flushed and rebuilt.//<</replace>> -<</link>> -<span id="family-hint">//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> //1) Save on this screen// - <br> //2) Re-open the .html in a new tab then load the above save.// - <br> //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="tab-bar"> - <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'display')" id="tab display">Display</button> - <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'content&flavor')" id="tab content&flavor">Content & flavour</button> - <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'mods')" id="tab mods">Mods</button> - <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'debug&cheating')" id="tab debug&cheating">Debug/cheating</button> - <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'experimental')" id="tab experimental">Experimental</button> -</div> - -<div id="display" class="tab-content"> - <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("End week societal effects from slaves are", "compressSocialEffects", $UI) - .addValue("Expanded", 0).on().addValue("Compacted", 1).off()>> - - <<run _options.addOption("Accordion on week end defaults to", "useAccordion") - .addValue("Open", 0).on().addValue("Collapsed", 1).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("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("Hide tabs in Slave Interact", "slaveInteractLongForm") - .addValue("Enabled", true).on().addValue("Disabled", false).off()>> - - <<run _options.addOption("Line separations are", "lineSeparations") - .addValue("Shown", 1).on().addValue("Hidden", 0).off()>> - - <<includeDOM _options.render()>> - - <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> - - <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="tab-content"> - <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 only father daughters", "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 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="tab-content"> - <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() - .addComment("<div>This mod is triggered after week 72. It is non-canon where it conflicts with canonical updates to the base game.</div>")>> - - <<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>")>> - - <<includeDOM _options.render()>> - - <<if $secExpEnabled > 0>> - <<if Object.values(V.SecExp).length === 0>> - <<include "SecExpBackwardCompatibility">> - <<goto "Options">> - <</if>> - <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("Visibility 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'' - <<set _popCap = 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.core.security = Math.clamp($SecExp.core.security + 5, 0, 100)>> - <</link>> - | <<link "Lower security" "Options">> - <<set $SecExp.core.security = Math.clamp($SecExp.core.security - 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>> - <</link>> - | <<link "Remove militia manpower" "Options">> - <<set $militiaFreeManpower = Math.max($militiaFreeManpower - 30, 0)>> - <</link>> - </td> - - <td style="text-align:left"> - <<link "Give mercs manpower" "Options">> - <<set $mercFreeManpower += 30>> - <</link>> - | <<link "Remove mercs manpower" "Options">> - <<set $mercFreeManpower = Math.max($mercFreeManpower - 30, 0)>> - <</link>> - </td> - </tr> - - </table> - <</if>> /* closes cheatmode check */ - </div> - <</if>> /* closes SecExp check*/ - </div> -</div> - -<div id="debug&cheating" class="tab-content"> - <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">><<run initRules()>><<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.value)>> - <</link>> - | <<link "Remove menial slaves" "Options">> - <<set $menials = Math.clamp($menials - 30, 0, _popCap.value)>> - <</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="tab-content"> - <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> - - <<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>> - - <<run _options.addOption("New event", "tempEventToggle") - .addValue("Enabled", 1).on().addValue("Disabled", 0).off()>> - <<includeDOM _options.render()>> -</div> +<<includeDOM App.UI.optionsPassage()>> \ No newline at end of file diff --git a/src/gui/options/optionsPassage.js b/src/gui/options/optionsPassage.js new file mode 100644 index 0000000000000000000000000000000000000000..b57c41f46611e3f0a12a3daf294a072629359233 --- /dev/null +++ b/src/gui/options/optionsPassage.js @@ -0,0 +1,1061 @@ +App.UI.optionsPassage = function() { + const el = new DocumentFragment(); + V.passageSwitchHandler = App.EventHandlers.optionsChanged; + el.append(intro()); + + // Results + const results = document.createElement("div"); + results.id = "results"; + el.append(results); + + App.UI.tabBar.handlePreSelectedTab(V.tabChoice.Options); + + // TODO: move me + /** + * + * @param {string} id + * @param {Node} element + * @returns {HTMLSpanElement} + */ + function makeSpanIded(id, element) { + const span = document.createElement("span"); + span.id = id; + span.append(element); + return span; + } + + const tabCaptions = { + display: 'Display', + "contentFlavor": 'Content & flavour', + mods: 'Mods', + "debugCheating": 'Debug & cheating', + experimental: 'Experimental' + }; + + const tabBar = App.UI.DOM.appendNewElement("div", el, '', "tab-bar"); + tabBar.append( + App.UI.tabBar.tabButton('display', tabCaptions.display), + App.UI.tabBar.tabButton('content-flavor', tabCaptions.contentFlavor), + App.UI.tabBar.tabButton('mods', tabCaptions.mods), + App.UI.tabBar.tabButton('debug-cheating', tabCaptions.debugCheating), + App.UI.tabBar.tabButton('experimental', tabCaptions.experimental), + ); + + el.append(App.UI.tabBar.makeTab('display', makeSpanIded("content-display", display()))); + el.append(App.UI.tabBar.makeTab('content-flavor', makeSpanIded("content-content-flavor", contentFlavor()))); + el.append(App.UI.tabBar.makeTab('mods', makeSpanIded("content-mods", mods()))); + el.append(App.UI.tabBar.makeTab('debug-cheating', makeSpanIded("content-debug-cheating", debugCheating()))); + el.append(App.UI.tabBar.makeTab('experimental', makeSpanIded("content-experimental", experimental()))); + + return el; + + function intro() { + let links; + let options; + let r; + const el = new DocumentFragment(); + + options = new App.UI.OptionsGroup(); + options.addOption("End of week autosaving is currently", "autosave") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + el.append(options.render()); + + App.UI.DOM.appendNewElement("div", el, `This save was created using FC version ${V.ver} build ${V.releaseID}. You are currently playing version: ${App.Version.base}, mod version: ${App.Version.pmod}, build: ${App.Version.release}${App.Version.commitHash ? `, commit: ${App.Version.commitHash}` : ``}`); + + links = []; + links.push(App.UI.DOM.passageLink("Apply Backwards Compatibility Update", "Backwards Compatibility")); + + links.push( + App.UI.DOM.link( + `Reset extended family mode controllers`, + () => { + resetFamilyCounters(); + const span = document.createElement("span"); + span.classList.add("note"); + App.UI.DOM.appendNewElement("span", span, "Done: ", "lightgreen"); + span.append("all family relations flushed and rebuilt."); + jQuery("#results").empty().append(span); + }, + [], + "", + "Clears and rebuilds .sister and .daughter tracking." + ) + ); + + + if (isNaN(V.rep)) { + links.push( + App.UI.DOM.link( + `Reset Reputation (${V.rep})`, + () => { + V.rep = 0; + jQuery("#results").empty().append(`Reputation reset to ${V.rep}`); + }, + [], + "Options" + ) + ); + } + + if (isNaN(V.rep)) { + links.push( + App.UI.DOM.link( + `Reset Money (${V.cash})`, + () => { + V.cash = 500; + jQuery("#results").empty().append(`Cash reset to ${V.cash}`); + }, + [], + "Options" + ) + ); + } + + if (V.releaseID === 1057) { + links.push( + App.UI.DOM.link( + `Free male anatomy removal due to accidentally flawed updater`, + () => { + V.PC.dick = 0; + V.PC.balls = 0; + V.PC.prostate = 0; + V.PC.scrotum = 0; + V.PC.ballsImplant = 0; + jQuery("#results").empty().append(`Cash reset to ${V.cash}`); + }, + [], + "Options", + "Use this if your female PC picked up a few extra parts during the conversion process.", + ) + ); + } + + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(links)); + + if ((V.releaseID >= 1000) || V.ver.startsWith("0.9") || V.ver.startsWith("0.8") || V.ver.startsWith("0.7") || V.ver.startsWith("0.6")) { + App.UI.DOM.appendNewElement("h3", el, `NEW GAME PLUS`); + r = []; + r.push(`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`); + r.push(App.UI.DOM.makeElement("span", "MAY", "yellow")); + r.push(`work across versions. To attempt to migrate a save across versions:`); + App.Events.addNode(el, r, "div", "note"); + + const ngpInstructions = document.createElement("ol"); + App.UI.DOM.appendNewElement("li", ngpInstructions, "Save on this screen", "note"); + App.UI.DOM.appendNewElement("li", ngpInstructions, "Re-open the .html in a new tab then load the above save.", "note"); + App.UI.DOM.appendNewElement( + "li", + ngpInstructions, + App.UI.DOM.link( + "Activate New Game Plus.", + () => { + V.ui = "start"; + }, + [], + "New Game Plus" + ), + "note" + ); + el.append(ngpInstructions); + } else { + App.UI.DOM.appendNewElement("div", el, `New Game Plus is not available because this game was not started with a compatible version.`, "note"); + } + return el; + } + + function display() { + const el = new DocumentFragment(); + let options; + let r; + + App.UI.DOM.appendNewElement("h2", el, "Reports"); + + options = new App.UI.OptionsGroup(); + + options.addOption("End week report descriptive details are", "showEWD") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("End week report performance details are", "showEWM") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Master Suite report details such as slave changes are", "verboseDescriptions") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("End week societal effects from slaves are", "compressSocialEffects", V.UI) + .addValue("Expanded", 0).on().addValue("Compacted", 1).off(); + + options.addOption("Accordion on week end defaults to", "useAccordion") + .addValue("Open", 0).on().addValue("Collapsed", 1).off(); + + options.addOption("Economic Tabs on weekly reports are", "useTabs") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Economic detail sheets for facilities are", "showEconomicDetails") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Economic report neighbor details such as trade impacts on culture are", "showNeighborDetails") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Numeric formatting is currently", "formatNumbers") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("This will comma-format numbers in some areas."); + + el.append(options.render()); + + App.UI.DOM.appendNewElement("h2", el, "General"); + + options = new App.UI.OptionsGroup(); + + options.addOption("Main menu leadership controls displayed", "positionMainLinks") + .addValueList([["Above", 1], ["Above and below", 0], ["Below", -1]]); + + options.addOption("New Model UI", "newModelUI") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Penthouse Facility Display", "verticalizeArcologyLinks") + .addValueList([["Triple column", 3], ["Double Coloumn", 2], ["Single Column", 1], ["Collapsed", 0]]); + + options.addOption("Main menu arcology description", "seeArcology") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Main menu desk description", "seeDesk") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Main menu newsfeed", "seeFCNN") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Tips from the Encyclopedia are", "showTipsFromEncy") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + 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."); + + options.addOption("Main menu slave tabs are", "useSlaveSummaryTabs") + .addValue("Enabled", 1).on().addValue("CardStyle", 2).on().addValue("Disabled", 0).off(); + + options.addOption("The slave Quick list in-page scroll-to is", "useSlaveListInPageJSNavigation") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Condense special slaves into their own tab", "useSlaveSummaryOverviewTab") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Interactions with your fucktoys are", "fucktoyInteractionsPosition") + .addValueList([["next to them", 1], ["at page bottom", 0]]); + + options.addOption("Hide tabs in Slave Interact", "slaveInteractLongForm") + .addValue("Enabled", true).on().addValue("Disabled", false).off(); + + options.addOption("Line separations are", "lineSeparations") + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + el.append(options.render()); + + r = []; + r.push(`UI theme selector. Allows to select a single CSS file to be loaded.`); + r.push(App.UI.DOM.makeElement("span", `The file has to be located in the same directory as the HTML file otherwise it will simply not load at all.`, "red")); + r.push(App.UI.Theme.selector()); + App.Events.addParagraph(el, r); + + App.UI.DOM.appendNewElement("h2", el, "Sidebar"); + + options = new App.UI.OptionsGroup(); + + options.addOption("Cash is", "Cash", V.sideBarOptions) + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + options.addOption("Upkeep is", "Upkeep", V.sideBarOptions) + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + options.addOption("Sex slave count is", "SexSlaveCount", V.sideBarOptions) + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + options.addOption("Room population is", "roomPop", V.sideBarOptions) + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + options.addOption("GSP is", "GSP", V.sideBarOptions) + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + options.addOption("Rep is", "Rep", V.sideBarOptions) + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + options.addOption("Confirmation before ending a week is", "confirmWeekEnd", V.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 (V.secExpEnabled > 0) { + options.addOption("Authority is", "Authority", V.sideBarOptions) + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + options.addOption("Security is", "Security", V.sideBarOptions) + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + options.addOption("Crime is", "Crime", V.sideBarOptions) + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + } + + el.append(options.render()); + + + App.UI.DOM.appendNewElement("h2", el, "Images"); + if (V.seeImages > 0) { + App.Events.drawEventArt(el, BaseSlave()); + } + + options = new App.UI.OptionsGroup(); + + options.addOption("Images are", "seeImages") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + if (V.seeImages > 0) { + options.addOption("Image style is", "imageChoice") + .addValueList([["Revamped embedded vector art", 3], ["Non-embedded vector art", 2], ["NoX/Deepmurk's vector art", 1], ["Shokushu's rendered imagepack", 0]]); + + if (V.imageChoice === 1) { + options.addOption("").addComment('<span class="warning">Git compiled only, no exceptions.</span>'); + + options.addOption("Face artwork is", "seeFaces") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Highlights on shiny clothing are", "seeVectorArtHighlights") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Height scaling", "seeHeight") + .addValue("All images", 2).on().addValue("Small images", 1).neutral().addValue("Disabled", 0).off(); + + options.addOption("Clothing erection bulges are", "showClothingErection") + .addValue("Enabled", true).on().addValue("Disabled", false).off(); + } else if (V.imageChoice === 0) { + 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.` + ); + + options.addOption("Slave summary fetish images are", "seeMainFetishes") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + } else if (V.imageChoice === 3) { + options.addOption("").addComment('<span class="warning">Git compiled only, no exceptions.</span>'); + + options.addOption("Clothing erection bulges are", "showClothingErection") + .addValue("Enabled", true).on().addValue("Disabled", false).off(); + } + + options.addOption("PA avatar art is", "seeAvatar") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Slave images in lists are", "seeSummaryImages") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Slave images in the weekly report are", "seeReportImages") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + } + el.append(options.render()); + + return el; + } + + function contentFlavor() { + const el = new DocumentFragment(); + let r; + let options; + + App.UI.DOM.appendNewElement("h2", el, "Content"); + + r = []; + r.push("More granular control of what appears is in"); + r.push(App.UI.DOM.passageLink("Description Options", "Description Options")); + App.Events.addNode(el, r, "div", "note"); + + options = new App.UI.OptionsGroup(); + + options.addOption("The difficulty setting is currently set to", "baseDifficulty") + .addValueList([["Very easy", 1], ["Easy", 2], ["Default", 3], ["Hard", 4], ["Very hard", 5]]); + + 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."); + + 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."); + + options.addOption("Bestiality related content is currently", "seeBestiality") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Watersports related content is currently", "seePee") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Incest content is currently", "seeIncest") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + 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."); + + options.addOption("Child gender to be generated based off dick content settings", "seeDicksAffectsPregnancy") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment(`${(V.seeDicksAffectsPregnancy === 1) ? `Currently ${V.seeDicks}% of children will be born male. ` : ``}Will not affect existing pregnancies already in-game.`); + + if (V.seeDicksAffectsPregnancy === 0) { + options.addOption("XX slaves only father daughters", "adamPrinciple") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("Will not affect existing pregnancies already in-game."); + } + + 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."); + + options.addOption("Pregnancy complications due to multiples and body size are currently", "dangerousPregnancy") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption(`Precocious puberty (pregnancy younger than ${V.fertilityAge})`, "precociousPuberty") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("Will not affect existing precocious puberty cases already in-game."); + + options.addOption("Slaves with fat lips or heavy oral piercings may lisp", "disableLisping") + .addValue("Yes", 0).on().addValue("No", 1).off(); + + options.addOption("Disables the long term damage mechanic. //Temp option//", "disableLongDamage") + .addValue("Enabled", 0).on().addValue("Disabled", 1).off(); + + 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."); + + 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."); + + options.addOption("Missing slave names are currently", "showMissingSlaves") + .addValue("Enabled", true).on().addValue("Disabled", false).off(); + + el.append(options.render()); + + App.UI.DOM.appendNewElement("h2", el, `Intersecting mechanics`); + + options = new App.UI.OptionsGroup(); + + options.addOption("Slave assets affected by weight is", "weightAffectsAssets") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("Diet will still affect asset size."); + + 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."); + + el.append(options.render()); + + App.UI.DOM.appendNewElement("h2", el, `Flavour`); + + options = new App.UI.OptionsGroup(); + + options.addOption("Slave reactions to facility assignments are", "showAssignToScenes") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Post sex clean up", "postSexCleanUp") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Appraisal miniscenes on slave sale are", "showAppraisal") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Assignment performance vignettes on the end week report are", "showVignettes") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Slaves can have alternate titles", "newDescriptions") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Family titles for relatives", "allowFamilyTitles") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + 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."); + + options.addOption("Distant relatives such as aunts, nieces and cousins are", "showDistantRelatives") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + el.append(options.render()); + return el; + } + + function mods() { + const el = new DocumentFragment(); + let options; + + options = new App.UI.OptionsGroup(); + + options.addOption("The Special Force Mod is currently", "Toggle", V.SF) + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("<div>This mod is triggered after week 72. It is non-canon where it conflicts with canonical updates to the base game.</div>"); + + 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>"); + + el.append(options.render()); + + if (V.secExpEnabled > 0) { + if (Object.values(V.SecExp).length === 0) { + el.append(App.UI.DOM.renderPassage("SecExpBackwardCompatibility")); + Engine.play("Options"); + } + App.UI.DOM.appendNewElement("h2", el, `Security Expansion mod options`); + if (V.terrain === "oceanic") { + App.UI.DOM.appendNewElement("div", el, `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.`); + } + options = new App.UI.OptionsGroup(); + + if (V.SecExp.settings.battle.enabled > 0 || V.SecExp.settings.rebellion.enabled > 0) { + options.addOption("Detailed battle statistics are", "showStats", V.SecExp.settings) + .addValue("Shown", 1).on().addValue("Hidden", 0).off() + .addComment("Visibility of detailed statistics and battle turns."); + + options.addOption("Difficulty is", "difficulty", V.SecExp.settings) + .addValueList([["Extremely hard", 2], ["Very hard", 1.5], ["Hard", 1.25], ["Normal", 1], ["Easy", 0.75], ["Very easy", 0.5]]); + + options.addOption("Unit descriptions are", "unitDescriptions", V.SecExp.settings) + .addValue("Abbreviated", 1).addValue("Summarized", 0); + } + + options.addOption("Battles are", "enabled", V.SecExp.settings.battle) + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + options.addOption("Rebellions are", "enabled", V.SecExp.settings.rebellion) + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + if (V.SecExp.settings.battle.enabled > 0) { + options.addOption("Battle frequency", "frequency", V.SecExp.settings.battle) + .addValueList([["Extremely high", 2], ["Very high", 1.5], ["High", 1.25], ["Normal", 1], ["Low", 0.75], ["Very low", 0.5]]); + } + + if (V.SecExp.settings.rebellion.enabled > 0) { + options.addOption("Rebellion buildup", "speed", V.SecExp.settings.rebellion) + .addValueList([["Extremely fast", 2], ["Very fast", 1.5], ["Fast", 1.25], ["Normal", 1], ["Slow", 0.75], ["Very slow", 0.5]]); + } + + + if (V.SecExp.settings.battle.enabled > 0) { + options.addOption("Commanders gain a prestige rank every 10 victories", "allowSlavePrestige", V.SecExp.settings.battle) + .addValue("Yes", 1).on().addValue("No", 0).off(); + } + + if (V.SecExp.settings.battle.enabled > 0) { + options.addOption("Force battles", "force", V.SecExp.settings.battle) + .addValue("Yes", 1).on().addValue("No", 0).off(); + } + if (V.SecExp.settings.rebellion.enabled > 0) { + options.addOption("Force rebellions", "force", V.SecExp.settings.rebellion) + .addValue("Yes", 1).on().addValue("No", 0).off() + .addComment("Rebellions take precedence over Battles."); + } + + if (V.SecExp.settings.battle.enabled > 0) { + options.addOption("Late game major battles are", "enabled", V.SecExp.settings.battle.major) + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + } + + if (V.SecExp.settings.battle.enabled > 0 && V.SecExp.settings.battle.major.enabled > 0) { + options.addOption("Multiplier is", "mult", V.SecExp.settings.battle.major) + .addValueList([["Extremely high", 2], ["Very high", 1.5], ["High", 1.25], ["Normal", 1], ["Low", 0.75], ["Very low", 0.5]]); + + options.addOption("This week a major battle is", "force", V.SecExp.settings.battle.major) + .addValue("Guaranteed", 1).on().addValue("Not guaranteed", 0).off(); + } + + if (V.SecExp.settings.battle.enabled > 0 && V.SecExp.settings.battle.major.enabled > 0) { + options.addOption("Gameover on battle loss", "gameOver", V.SecExp.settings.battle.major) + .addValue("Yes", 1).on().addValue("No", 0).off(); + } + + if (V.SecExp.settings.rebellion.enabled > 0) { + options.addOption("Gameover on rebellion loss", "gameOver", V.SecExp.settings.rebellion) + .addValue("Yes", 1).on().addValue("No", 0).off(); + } + + el.append(options.render()); + + const subHeading = document.createElement("div"); + subHeading.classList.add("subHeading"); + + if (V.debugMode || V.cheatMode || V.cheatModeM) { // TODO make me a fucking function + App.UI.DOM.appendNewElement("div", subHeading, "Debug/cheat", "bold"); + let td; + let links; + const table = document.createElement("table"); + table.classList.add("invisible"); + el.append(table); + + let tr = document.createElement("tr"); + tr.style.textAlign = "center"; + + td = createTd(); + links = []; + links.push( + App.UI.DOM.link( + "Set loyalty high", + () => { + changeLoyalty("high"); + }, + [], + "Options" + ) + ); + links.push( + App.UI.DOM.link( + "Set loyalty average", + () => { + changeLoyalty("average"); + }, + [], + "Options" + ) + ); + links.push( + App.UI.DOM.link( + "Set loyalty low", + () => { + changeLoyalty("low"); + }, + [], + "Options" + ) + ); + links.push( + App.UI.DOM.link( + "Randomize loyalty", + () => { + changeLoyalty("random"); + }, + [], + "Options" + ) + ); + + td.append(App.UI.DOM.generateLinksStrip(links)); + tr.append(td); + table.append(tr); + + tr = document.createElement("tr"); + tr.style.textAlign = "center"; + td = createTd(); + links = []; + links.push(App.UI.DOM.link( + "Give Authority", + () => { + V.SecExp.core.authority = Math.clamp(V.SecExp.core.authority + 1000, 0, 20000); + }, + [], + "Options" + )); + links.push(App.UI.DOM.link( + "Remove Authority", + () => { + V.SecExp.core.authority = Math.clamp(V.SecExp.core.authority - 1000, 0, 20000); + }, + [], + "Options" + )); + td.append(App.UI.DOM.generateLinksStrip(links)); + tr.append(td); + table.append(tr); + + + tr = document.createElement("tr"); + td = document.createElement("td"); + td.style.textAlign = "right"; + links = []; + links.push(App.UI.DOM.link( + "Raise security", + () => { + V.SecExp.core.security = Math.clamp(V.SecExp.core.security + 5, 0, 100); + }, + [], + "Options" + )); + links.push(App.UI.DOM.link( + "Lower security", + () => { + V.SecExp.core.security = Math.clamp(V.SecExp.core.security - 5, 0, 100); + }, + [], + "Options" + )); + tr.append(App.UI.DOM.generateLinksStrip(links)); + tr.append(td); + + td = document.createElement("td"); + td.style.textAlign = "left"; + links = []; + links.push(App.UI.DOM.link( + "Raise crime", + () => { + V.SecExp.core.crimeLow = Math.clamp(V.SecExp.core.crimeLow + 5, 0, 100); + }, + [], + "Options" + )); + links.push(App.UI.DOM.link( + "Lower crime", + () => { + V.SecExp.core.crimeLow = Math.clamp(V.SecExp.core.crimeLow - 5, 0, 100); + }, + [], + "Options" + )); + tr.append(App.UI.DOM.generateLinksStrip(links)); + tr.append(td); + table.append(tr); + + tr = document.createElement("tr"); + td = document.createElement("td"); + td.style.textAlign = "right"; + links = []; + links.push(App.UI.DOM.link( + "Give militia manpower", + () => { + V.militiaFreeManpower += 30; + }, + [], + "Options" + )); + links.push(App.UI.DOM.link( + "Remove militia manpower", + () => { + V.militiaFreeManpower = Math.max(V.militiaFreeManpower - 30, 0); + }, + [], + "Options" + )); + tr.append(App.UI.DOM.generateLinksStrip(links)); + tr.append(td); + + td = document.createElement("td"); + td.style.textAlign = "left"; + links = []; + links.push(App.UI.DOM.link( + "Give mercs manpower", + () => { + V.mercFreeManpower += 30; + }, + [], + "Options" + )); + links.push(App.UI.DOM.link( + "Remove mercs manpower", + () => { + V.mercFreeManpower = Math.max(V.mercFreeManpower - 30, 0); + }, + [], + "Options" + )); + tr.append(App.UI.DOM.generateLinksStrip(links)); + tr.append(td); + table.append(tr); + subHeading.append(table); + el.append(subHeading); + } /* closes cheatmode check */ + } /* closes SecExp check*/ + return el; + + function createTd() { + const td = document.createElement("td"); + td.style.columnSpan = "2"; + return td; + } + + /** + * + * @param {"high"|"average"|"low"|"random"} level + */ + function changeLoyalty(level) { + const numberMap = new Map([ + ["high", [80, 100]], + ["average", [40, 60]], + ["low", [20]], + ["random", [100]], + ]); + + for (const unit of V.militiaUnits) { + unit.loyalty = numberGenerator(); + } + for (const unit of V.slaveUnits) { + unit.loyalty = numberGenerator(); + } + for (const unit of V.mercUnits) { + unit.loyalty = numberGenerator(); + } + + function numberGenerator() { + const range = numberMap.get(level); + if (range[1]) { + return random(range[0], range[1]); + } else { + return random(range[0]); + } + } + } + } + + function debugCheating() { + const el = new DocumentFragment(); + let options; + let option; + let links; + let r; + const popCap = menialPopCap(); + + App.UI.DOM.appendNewElement("h2", el, `Debug`); + + options = new App.UI.OptionsGroup(); + + 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 (V.debugMode > 0) { + options.addOption("The custom function part of debug mode is", "debugModeCustomFunction") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + } + + option = options.addOption("Genetics array") + .customButton("Run test", () => { }, "test genetics"); + if (V.cheatMode === 1) { + option.customButton("Edit Genetics", () => { }, "Edit Genetics"); + } else { + option.addComment("Enable cheat mode to edit genetics."); + } + + options.addOption("Rules Assistant").customButton("Reset Rules", () => { initRules(); }, "Rules Assistant"); + + options.addOption("Passage Profiler is", "profiler") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("Outputs performance data at the bottom of every passage."); + + el.append(options.render()); + + App.UI.DOM.appendNewElement("h2", el, `Cheating`); + + options = new App.UI.OptionsGroup(); + + 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 (V.cheatMode === 0) { + el.append(options.render()); + } else { + options.addOption("Sidebar Cheats are currently", "cheatModeM") + .addValue("Shown", 1).on().addValue("Hidden", 0).off(); + + options.addOption("Slave aging", "seeAge") + .addValue("Enabled", 1).on().addValue("Celebrate birthdays, but don't age.", 2).neutral().addValue("Disabled", 0).off(); + + el.append(options.render()); + + links = []; + + links.push( + App.UI.DOM.link( + `Add ${commaNum(100000)} money`, + () => { + V.cheater = 1; + cashX(100000, "cheating"); + }, + [], + "Options" + ) + ); + + links.push( + App.UI.DOM.link( + `Add ${commaNum(10000)} rep`, + () => { + V.cheater = 1; + repX(10000, "cheating"); + }, + [], + "Options" + ) + ); + + r = []; + r.push(App.UI.DOM.generateLinksStrip(links)); + r.push(App.UI.DOM.makeElement("span", "Cheating will be flagged in your save", "note")); + App.Events.addNode(el, r, "div", "scLink2"); + + + SectorCounts(); + + links = []; + links.push( + App.UI.DOM.link( + "Raise prosperity cap", + () => { + V.AProsperityCapModified += 10; + }, + [], + "Options" + ) + ); + + links.push( + App.UI.DOM.link( + "Lower prosperity cap", + () => { + V.AProsperityCapModified -= 10; + }, + [], + "Options" + ) + ); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(links), "scLink2"); + + + links = []; + links.push( + App.UI.DOM.link( + "Raise prosperity", + () => { + V.arcologies[0].prosperity = Math.clamp(V.arcologies[0].prosperity + 10, 0, V.AProsperityCap); + }, + [], + "Options" + ) + ); + + links.push( + App.UI.DOM.link( + "Lower prosperity", + () => { + V.arcologies[0].prosperity = Math.clamp(V.arcologies[0].prosperity - 10, 0, V.AProsperityCap); + }, + [], + "Options" + ) + ); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(links), "scLink2"); + + links = []; + links.push( + App.UI.DOM.link( + "Give menial slaves", + () => { + V.menials = Math.clamp(V.menials + 30, 0, popCap.value); + }, + [], + "Options" + ) + ); + + links.push( + App.UI.DOM.link( + "Remove menial slaves", + () => { + V.menials = Math.clamp(V.menials - 30, 0, popCap.value); + }, + [], + "Options" + ) + ); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(links), "scLink2"); + + links = []; + + // Will no longer work as intended due to population changes + links.push( + App.UI.DOM.link( + "Add citizens", + () => { + V.lowerClass = Math.max(V.lowerClass + 200, 0); + }, + [], + "Options" + ) + ); + + // also no longer properly functional + links.push( + App.UI.DOM.link( + "Remove citizens", + () => { + V.lowerClass = Math.max(V.lowerClass - 200, 0); + }, + [], + "Options" + ) + ); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(links), "scLink2"); + + links = []; + // Will work to a limited degree, minimums and maximums for slaves are set through population + links.push( + App.UI.DOM.link( + "Add slaves", + () => { + V.NPCSlaves = Math.max(V.NPCSlaves + 200, 0); + }, + [], + "Options" + ) + ); + + // Will work to a limited degree + links.push( + App.UI.DOM.link( + "Remove slaves", + () => { + V.NPCSlaves = Math.max(V.NPCSlaves - 200, 0); + }, + [], + "Options" + ) + ); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(links), "scLink2"); + } + return (el); + } + + function experimental() { + const el = new DocumentFragment(); + let options; + let r; + + r = []; + r.push(`Experimental means just that: experimental. Options below are likely to be in an`); + r.push(App.UI.DOM.makeElement("span", `even more incomplete or broken state than usual.`, "yellow")); + r.push(App.UI.DOM.makeElement("span", `THEY MAY NOT WORK AT ALL.`, "red")); + r.push(`Make sure you back up your save before enabling any of these, and if you are that interested, consider helping to improve them.`); + App.Events.addNode(el, r, "div", "bold"); + + options = new App.UI.OptionsGroup(); + + if (V.seePreg !== 0) { + options.addOption("Nursery is", "nursery", V.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."); + } + + options.addOption("Food is", "food", V.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 (V.seeExtreme === 1 && V.seeBestiality === 1) { + options.addOption("Animal Ovaries are", "animalOvaries", V.experimental) + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("This will allow slaves to be impregnated by animals."); + } + + if (V.seeExtreme === 1) { + options.addOption("Dinner party", "dinnerParty", V.experimental) + .addValue("Enabled", 1).on().addValue("Disabled", 0).off() + .addComment("This will enable a controversial but very broken event. Warning: Snuff, cannibalism."); + } + + options.addOption("New event", "tempEventToggle") + .addValue("Enabled", 1).on().addValue("Disabled", 0).off(); + + el.append(options.render()); + return el; + } +};