Sugarcube: Disable autosave on specific passages

Twine 2.2.1, Sugarcube 2.35.0

I have autosaves enabled, but I want to disable autosave on specifically tagged passages. I remember it being easily done but I can’t find where I’ve done it before and it is somehow the least searchable query I have ever come across for something so blatantly necessary and easy to do. Please, dear god please, send help, please, please…

Hello, and welcome to the forum!

What you need is Config.saves.autosave (described here in the Sugarcube 2 docs).

So, if you put the following in your story JavaScript:

Config.saves.autosave = function () {
	if (tags().contains("noautosave")) {
		return false;
	return true;

then the game will autosave in all passages except those tagged “noautosave”.

1 Like

Mwah I love you let’s get married bye I love you