Unfortunately, Config.history.controls doesn’t do anything after the game has already started, so you’ll need to use something like this instead:
<<button "Toggle History Controls">>
<<run $("#ui-bar-history").toggle()>>
<</button>>
That uses the jQuery .toggle() method to toggle the visibility of the history controls, so clicking that button a second time would make the controls visible again.
However, that won’t permanently keep that hidden by itself, since if you load a saved game then the controls will be back. Thus you’ll also need to keep track if that’s supposed to be hidden, and then re-hide it if necessary when a save is loaded. So, the above code changes to:
Actually, upon further testing, I find that when loading ANY save, regardless of whether or not the history was previously disabled, the game is loading with history buttons disabled. This is easily fixed by simply refreshing the browser, but can you think of why this might be happening? I think if I implement this as-is, I’m going to get a lot of confused bug reports.
Config.saves.onLoad = function (save) {
if (save.state.history[save.state.index].variables.hideHistory) {
$("#ui-bar-history").css("display", "none");
}
};
instead and that should fix that problem.
P.S. Note that, after toggling this on, you’ll have to go to the next passage before saving for this to work, because the save system doesn’t normally save any changes which happen in the current passage.
Understood. I don’t expect that anyone will try to save on the start page…but you never know what weird shit players will do. I will test this out and come back here to confirm.
Seems to be working exactly as intended! I even put a Toggle Hardcore Mode button on the sidebar so if people chicken out, they can go back to normal mode. Thanks again!