Re-learning the save system before testing it

So, if I’m not mistaken, the save system for WIP games isn’t really mentioned in the wiki, and I’ve forgotten in which sintax I have to set it up. With that in mind, would someone be able to assist me?
Also, due to several times I have implemented the save system it ended up being broken, is there a way that I can test it, without uploading everything to Dashing Don?

Anyway, I hope that you all have a good rest of your Sunday.

1 Like

In the create page on DashingDon, next to the option to activate the save plugin, there’s a link How do I use this? with very simple instructions, which I reproduced below.


Place the following code snippet in your startup.txt file before any story text:

*sm_init mygame | 3

Where ‘mygame’ is a unique identifier for your game (to prevent other games from overwriting saves) and ‘3’ is the number of save slots you wish to allow for your game (more than 6 is not recommended).

More information on this plugin available here.

1 Like

Do I still need the SM_save, or just the SM_init? Now?
Also, for future reference, what’s the key combination to get the bar sign on my keyboard? I think it’s something like shift and something else, but am not quite sure what.

*sm_init is to boot the saving system. *sm_save and *sm_load are used if you want to manually save and load game states, for example, for checkpoints. Generally speaking, most authors don’t use these other commands and just let the players choose when they want to save and load.

I don’t know what you mean by “bar sign”.

Most keyboards have it next to or near the enter key.

1 Like

Is there any place in particular where I should put the save commands? I put it directly after the scene_list in the startup scene, but it just throws up an error.

After all created variables. You will aslo need to *comment it out every time you test the game.

@ArchivistAlpha096 always good practice to show the text or code of the error you’re getting. It’s hard to advise if we don’t know the nature of the problem.

To clarify what @Phantmwolf is saying: you’ll need to comment the commands out when running the automated tests (quicktest and randomtest). You should be able to manually test the game just fine.

1 Like

I think I figured it out, although now it’s saying that the SM plugin seemingly hasn’t been inabled. I checked the box on the edit page to put said plugin in, so unless I didn’t put something into the startup, not quite sure what’s going on?

Also, can you name the saves anything you want, such as:

*sm_init mygame1 | 4

or do I need to put in the actual name of the game?

“mygame1” is a unique id for your game, it’s not a name of a particular save. I highly recommend making it something more unique to avoid clashing with other games :slight_smile:

1 Like

So, something like:
The line chronicles line of line 2nd line chance
Something like that? I seem to remember the save having an issue with a lengthy title, but I’ll have to redo that to see if it’s accurate or not.

sm_init the_line_chronicles | 4

Will likely be fine, unless you know of another ChoiceScript game with the same title.

1 Like