I'm not sure how to use this SugarCube configuration for specific passages?
Basically I'm looking for an option that will allow a player to set a higher difficulty by disabling all manual saves, including disk saves. So to do this I could disable manual saving on my save game passages.
If I can't work out a way to do that, I can imagine doing a system where I use an <<if>> macro to completely remove the save/load game links and just replace it with a simple "load autosave" button using Save.autosave.load(). Which, come to think of it, is a much simpler way to handle things.
Comments
Also, I thought you were using SugarCube 1.x? Save.autosave.load() is part of the 2.x Save API.
Beyond that. What didn't you understand? Seriously, I'm not trying to be difficult here.
For those wishing to use it, you assign config.saves.isAllowed a function, which is then called by the save system whenever any type of save is requested. Its return value (true or false) determines whether the save is allowed to happen. If the callback returns true, then the save is allowed to proceed. If the callback returns false, then the save is not allowed to proceed and, depending on the situation, the player may receive a message to that effect.
I was thinking of something that was placed in individual passages, but it rather sounds like you need to use Javascript in the script passage to reference what passages are allowed to be saved on.
All config object properties are scripting, so yes, that means they're best used within a script area (Story JavaScript [Twine 2] or a script-tagged passage [Twine 1]). And yes, one of the many things you could check for in config.saves.isAllowed is the current passage title.
Some examples: