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


#1

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?


#2

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).


#3

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


#4

could you give me the link for that?


#5

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.

#6

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.


#7

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


#8

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


#9

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


#10

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.