ChoiceScript Saving Plugin (Update: April 2023)

It does not. I wonder if there is something wrong with the smPluginMenuAddon.js file that I have? Is there perhaps, a newer version of this file?

I donā€™t think so. The dropbox version is the latest, as far as I know.

Again, if I were to guess, smPluginMenuAddon.js is not recognized and doesnā€™t load. You can try starting the game in Chrome just to double check that itā€™s not browser related. --allow-file-access-from-files shortcut attribute to Chrome.exe will allow local files to be accessed (txt in this case), so choicescript will work.

If itā€™s the same in Chrome, then you probably have a typo to smPluginMenuAddon.js path in the index.html or something similar.

1 Like

I will give that a try. Thank you for the assistance.

1 Like

It was indeed a typo. I neglected to put the " before the tag in my index file. Thank you for helping me correct this issue!

2 Likes

Itā€™s the second argument. Try the above.

I tried. Itā€™s still popping up for me. I just kind of deleted the alertify lines if thatā€™s okay with you?

Hmm, might be a bug. Iā€™ll make a note to take a look, thank you. Sure, that shouldnā€™t cause any problemsā€¦

Works on my end without pop ups. The slot name does not update and will say ā€œNo dataā€ until browser page is refreshed. Loads just fine though.

Iā€™m having trouble with the saving system. I search all the similar threads but i didnā€™t find the way to install it properly:P

  1. smPluginMenuAddon.js downloaded and put in the web folder.
  2. where/who should i add script src="ā€¦/smplugin.js" to the index.html on the web folder ?

I dont know if that helps but by refreshing the game the error Iā€™m getting is:
startup line 19: Non-existet command ā€˜sm_intā€™

All the helps is appreciated

Update: I download the smPlugin.js and i put in my web folder. How i go to the next step and add index.html?
i mean how i do this: smPlugin MUST come BEFORE the add-on file in index.html

with kind regards,
Sersor

I couldnā€™t figure it out so I just *comment it out until I upload startup.txt to dashingdon.

Also, desperate, not desparate :wink:

1 Like

under .../web/mygame/, find the index.html file

Go to the 36th line, and add the script.
Or just follow :point_down:t4: this example

<script>window.version="UNKNOWN"</script>
<script src="../version.js"></script>
<script src="../persist.js"></script>
<script src="../alertify.min.js"></script>
<script src="../util.js"></script>
<link href="../style.css" rel="stylesheet" type="text/css">
<style id="dynamic"></style>
<script src="../ui.js"></script>
<script src="../scene.js"></script>
<script src="../navigator.js"></script>
<script src="../smPlugin.js"></script>               <<<<< This is the line you add
<script src="../smPluginMenuAddon.js"></script>      <<<<< This is the line you add
<script src="mygame.js"></script>
<link href="../alertify.css" rel="stylesheet" type="text/css">
3 Likes

Thank you very much! I finally made it :sunglasses:

I apologize if this is the wrong thread on which to mention it, but I have noticed on two separate WIPs using what I assume is one of these plugins that the date listed by the save gives the wrong month. The dates are given in European format and today for example should be 4/8/2018 in European format but instead the save shows as 4/7/2018. I do not know how much of a problem this might be, but it is something of which to be aware and might need to be fixed.

2 Likes

Oh yes! Well spotted. Definitely a bug, Iā€™ll see about patching it soon.

2 Likes

Need some help. When my browser loads up my game, Iā€™m locked into a constant loop of if it click ā€œOKā€:

And then Iā€™m locked up in this loop if I click ā€œCancelā€:

If I hit ā€œCancelā€ after this, Iā€™m given this prompt:

And then if I hit ā€œCancelā€ after this, my game sorts itself out.

Hereā€™s my code:

Wait - my game sorted itself out. I clicked too fast between the messages that followed the initial ā€œCancelā€ loop. Can someone double my code just in case? Thank you!

After this, I got a little lost on how to implement this save option in my game :joy: Sorry, Iā€™m still new to choice script but if someone could explain to me how to include this file as a script in index.html , i would be very grateful.

Continuing the discussion from Saving System Plugin:

Umm, so iā€™ve been trying to follow the instructions from this post but the link for the pluggin lead me to a page that says error 404.

Are the links in this post still functional or am I doing something wrong? :joy:

edit: iā€™ve been reading some tutorials for adding the saving option but it seems this is the one everyone uses? However i canā€™t seem to understand the process very well

If youā€™re hosting a WIP on dashingdon, then add this after your variables in startup:

*sm_init mygame | 3

Replace ā€œ3ā€ with whatever number you want, though I believe it is recommended not to go higher than six. Then, after uploading your game to the site, edit the game details and check the box that says something like ā€œuse saving pluginā€ and your WIP should have the saving feature when you link it. Hope this helps you!

3 Likes

I did as you instructed, but when opening the game, is there supposed to be a saving icon? Or does it save the game automatically?

It should show the option to select/save/load and a drop-down menu with as many slots as you specified in startup. Sometimes it takes a few seconds to show up, though. Are you using dashingdon?