ChoiceScript Saving Plugin (Update: April 2023)

So, I accidentally saved a game while in the stats screen, which seems to break the save :worried: Would there be any way to update around this bug? It’s just completely stuck on stats with no way to return to the game :disappointed_relieved:

1 Like

I know that this has been the case for pretty much as long as the plugin’s been around. That said, if it can’t be fixed, would it be possible to disable the plugin on the stats screen? :thinking:

1 Like

OK, so to set up a demo on DashingDon, do I need to download and include smPlugin.js and smPluginAddOn.js. or just include the code for saving in my setup and scene files? The way the game creation screen on DashingDon is written is looks like I don’t have to include the .js files myself? I’m trying to sort this out now, instead of having to go back and do a ton of work later :slight_smile:

*Edited for 1D10T style typos! I think I need more coffee!!

Lessa

1 Like

You just need to include the save command (*sm_init name | number) right at the bottom of startup, then check the save feature on Dashingdon.com

Name: title of project

Number: amount of save slots - 1 to 5

1 Like

Just to make sure I’m understanding, as long as I include the save command in startup, then DashingDon will take care of anything else necessary? Or I have to add save prompts in the scenes as well? Sorry for the dingaling questions, sleep isn’t my best friend at the moment so I’m working through perpetual brain fog :frowning:

Lessa

You will just have to keep it in startup, nowhere else. The site, Dashingdon.com, requires you to manually check the option. If you do both correctly, then you will have successfully enabled the save feature.

Thank you so much @Janus_Prospero ! You have made my day! Also, huge thanks to @CJW . Just creating this and making it available for use elevates you to incredible human status :smiley: Not to mention all the help you give every day. One in a billion rock star!

Lessa

4 Likes

Bug Fix Release

Hi folks, AbrahamAriel Ā· GitHub (afraid I don’t know their forum handle, if they’re on here) pointed out that a recent change to the menu buttons in ChoiceScript broke ChoiceScriptSavePlugin.

They even kindly submitted a fix, which I’ve incorporated and released:

You’ll need to replace your current ChoiceScriptSavePlugin.js file with the contents at the link above in order to use it with the latest version of ChoiceScript.

@dashingdon FYI.

3 Likes

Do authors need to change anything in their startup or will the same command we have been using still enable it when uploading to ink or dashingdon’s?

No code changes required, the script just won’t inject itself properly without the update.

Okay, so the update is something I, with my WiP demo, do not really need to fuss with?

If you’re relying solely on dashingdon to host your game and provide the save plugin, then you have nothing to do indeed (that’s on Dash).

1 Like

Yes, saves don’t play nicely with modifications underfoot. It’s stored in your browser’s local storage, rather than a file. You can clear local storage items manually, but it’s a little fiddly. You’ll want to read around the topic.

1 Like

Hey Carey, I just wanted to let you know that I have the same problem reported by other people, whereby the game doesn’t load mid-scene, but only at the start of it (I didn’t even think it was supposed to load mid-scene until now!)

Is it something you eventually figured out the cause of? I use Dashingdon, so I don’t understand what else I could do other than use the sm_init command.

In case you want to take a look for yourself, the game can be reached at this link: After Dark

Thank you in advance for your attention, and for your hard work over the past ten years!

Check this response to a slightly different issue. The reasoning is the same. If people save a game and you then update it, saves are very likely to break. There really isn’t a great deal we can do about this, aside from perhaps detecting when a save is out-of-date and warning people.

I had a quick flick through your game and saving worked fine for me as it is right now.

2 Likes

Thank you for the very quick reply! I’ll link your answer in the game’s thread then.

I’ve tried the latest version of the plugin, and no save slots appeared on top of the screen. I’ve followed every instruction to the letter, but I can’t seem to get the quick save function working. Did I miss something?

Does this work with the newest version of ChoiceScript?

If you mean with regards to checkpoints, I’m honestly not sure. I don’t have the free time to check myself at the moment, but please feel free to try it and report back. I would imagine some tweaks may be needed.

I’m sorry I can’t be of more direct help at the moment.

1 Like

Ah, I just saw this thread… did anybody try to use the checkpoints? Do they work with CSIDE?