Note: I’m going to leave these templates up for reference, but I strongly recommend using the inbuilt ChoiceScript checkpoint code instead which has been implemented as of November 2023. It’s quicker, easier (especially for incorporating multiple slots), more flexible, and far less error-prone!
Hey all! I’ve made two template games for making save/load checkpoints for your game.
I’d noticed that there are a lot of instructions around on the forum about how to do this, but if like me you learn best by looking at examples, here you are!
Template 1: load to the start of the chapter or section that you just played.
Updated with a template for making checkpoints within a scene file, and a heads-up about using *create not *temp in those circumstances (thank you @Doriana-Gray!)
It was mentioned to me, and I saw comments elsewhere on the forum, that *hide_reuse and *disable_reuse behave incorrectly when using checkpoints in this way, and that when an option is picked on a previous playthrough, it’s not available to pick when replaying. However, when I tested the template I couldn’t replicate that and as far as I could tell, using those commands seems to be working…? Please let me know if you can shed any light, or if the template game behaves incorrectly for you, and I’ll amend as needed.
Edit: made another correction unrelated to the savepoint code - I was on implicit control flow autopilot and the error didn’t get caught by RT for some reason.
Yeah, it’s how I’ve done it in Royal Affairs etc and it’s seemed solid. It’s a slog but I found it kind of satisfying in a weird way, haha! I’m doing it as I go for my new project which is its own slightly different faff
Good to hear that those commands have been working properly for you! I hadn’t heard anyone having trouble where I’d implemented it so I wonder if the code has changed since the posts I saw (from my cursory look, they were from a few years ago).
That’s one of my main issues with save points. I’ve literally had to remove every choice that has a “disable reuse” on it and set it as a choice variable that can be reset if I decide to add a save poin which is a heap more work and annoying to code. That’s interesting you’re not having problems with that though, has something changed more recently? (I’ve just assumed that it was continuing to be an issue.)
Yeah, I’m not sure if the code has changed in the meantime - please do poke around in the template and see if it behaves oddly, but I couldn’t get it to show the errors which is good news in principle, though a bit confusing.
By the way I’ve edited the first post to include a link to a guide to generate variable lists quickly!
Can you check if that happens in the Chapter 3 section, where it uses *goto [label]? When I tested that section, the *hide_reuse and *disable_reuse seemed to work OK. I may well have missed something or have misunderstood, though, so please let me know if it isn’t!
So glad I found this! Thanks for your work and the way you presented the system. I think I’ve got it running in a few of the hub zones of my WIP. Having a checkpoint style system like this will really encourage exploration!
If it’s a released game, the saved variables will be kept whether or not a browser window or app is closed, the usual way players can keep their progress. So when playing a game like Royal Affairs which was released with checkpoints, you can stop playing in the middle of Chapter 3, for example, return to it later, complete Chapter 3, and then replay it using the checkpoint.
If it’s a WIP or otherwise unpublished game on Dashingdon or another website, refreshing or navigating away will lose progress including checkpoints. If CJW’s save plugin is enabled, that will keep your progress and if you loaded from a save slot, you could then also use the checkpoint to replay as desired.
Oh! I didn’t realise that. That’s really handy to know. So if you load a save point as a goto_scene will it restore all the *disable_reuse choices to their original state (so all can be selected again)? If that’s all that’s needed it would be far easier for my future projects to just run it through a blank scene or a reload save scene and then back again to the original file rather than fluffing around with choice variables that get reset with the saves.