So when coding a Choice Script Game how do you make a Save Load Delete section?

I’m trying to finish up on the game i’m working on but I hate it when there’s no Save Load Delete and I think anyone who plays will get that vibe too.

Does anyone know how to code it and where to put it?

In your startup.txt, add the line

*sm_init gamename | 3

Where gamename is a unique name for your game (so you don’t have a problem with overwriting saves from other games), and 3 is the number of saveslots (so you can change to 5, etc).

Edit: This is for games on dashingdon, which is what I assume you’re asking about? There’s also a checkbox to click in the game details (“enable saves” or whatever).

Edit 2: Note that, if you have this line in your code and you’re testing/previewing your game via index.html, you’ll get an error (Non-existent command ‘sm_init’). So you can either add it in right before uploading, or do something like

*create privatetesting true
*if not(privatetesting)
	*sm_init gamename | 3

and then flip the true to false right before posting (which is helpful in that you can use privatetesting for other things, and/or just because you don’t have to look up the save command again).

1 Like

If you want make a save in your code without dashingdon you just have to follow the way in the wiki is easy wven if a little tiresome. And no very practical as dashingdon has the files adapted for the public

could you give me the link for that?

If you’re talking about save system found in many WIPs, you can find it on CJW’s save plugin. But to keep things simple, I’d suggest to follow the instruction as mentioned by @Gabs.

  1. In startup.txt, put the code
    *sm_init [yourgamenamehere] | [num of saveslot]
    Yourgamenamehere: put any non-space text here. This keyword is used to differentiate save files between different games.
    Num of saveslot: any number. Zero won’t work, tho.
  2. In your dashingdon homepage, go to your game menu. Go to Edit Details > :ballot_box_with_check: Check to use smPluginMenuAddon save plugin by CJW > activate it > Save.
3 Likes

In addition to that, for a local save system you’ll have to type in paths to those 2 plugins into index.html for the non vanilla JS to hook. Otherwise it won’t work as CS won’t recognize sm_init command.

Oh, and download the JS file from the threadlink I linked previously!

I wasn’t gonna post it to dashington I was gonna send it to choice script games. I just didnt know if I could put a save load delete section on it

Remember Cog doesn’t support sve files system so to send to them you have to erase it from your files i think.

Ah, in that case, you have to follow @poison_mara’s suggestion on creating your own save system. It’s not a complex process, but you need to set yourself a creative mind.

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.