@Spindraft
It will work in all browsers if you’re game is hosted online. I can’t help, change or bypass the fact that many of them place restrictions on certain features when running js in a local environment.
Search for Dropbox and/or dashingdon hosting. These are the two methods most of the authors here use to publish their games online.
@Lycoris
Hi, sorry about that, I just noticed the image links are broken. Yes you should essentially just copy one of the other script lines in its entirety and replace the href=“myjsfilepath” with the path to your copy of smPlugin.js. Don’t forget to include a copy of the file, else you’ll be referencing nothing.
*chuckle * That’s because there is not an actual line in the index file (and make sure your editing the index file in your mygame folder) that reads < script href=“myjsfilepath”>< /script>.
What CJW-senpai (<- I apologize in advance CJW, it was far too tempting not to) was saying is that you should copy one of the other < script> tags in its entirety, for example like this one: < script href=“…/scene.js”>< /script> (of course, make sure to remove the spaces in this script tag here before the “<”'s otherwise the script tag I give here won’t work) paste it in a new line with the other < script>'s, and replace the stuff in href=“blahblah” (or href=“…/scene.js”) in our example with the path to the smPlugin.js file.
Now regarding path, if you put it in the web folder, like you should, since it’s where all the other .js files are, since the index file we’re editing is in the mygame folder that’s in the web folder, your file path would be “…/smPlugin.js”, the “…/” is basically shorthand for “it’s in the parent folder of this folder” and so on and so on, so let’s say if you put the smPlugin.js file in the main dfabulich-choicescript-[insert-random-version-number-here] folder, your file path for it’d be, “…/…/smPlugin.js” since it’s in the main folder that is two folder levels separated from the index file in the mygame folder.
Well, what save feature did you want? The one with the “save” “load” “delete” bar on top? Or just the normal save system where you save via a choice in game?
Oh, for that you need the SmPluginMenuAddon.js file as well, and you need to follow the same procedure as before. The link to it ought to be at the bottom of the OP. To download the file (since it just shows up, but doesn’t auto download), just add ?dl=1 to the end of the link, that’ll trigger the file download from Dropbox’s end.
saveMod = {
mygame_save: "0" //Change null to the name of your game inside quotation marks, for e.g. : ,mygame_save: "terminal"
//This ensures your game saves are unique to your game and won't be overwrote by anyone else using this system.
,isLocalIE: false //Don't change this
,autoSave: false //true = Autosaves by default - Otherwise player must activate autosave.
};
Like, if my game is called “The Freakhouse, A Touch Of Lilium”, can I just do this?
saveMod = {
mygame_save: "freakhouse" //
By the way, I tried using the *sm_init command, but it doesn’t work The command is “non-existent”.
Uh oh, have you actually edited that file in that way? And for me to understand on my end, which file’s code are you looking at? In my game I didn’t need to touch the .js files,only use *sm_init like this: *sm_init tempestten | 5
of course replace “tempestten” with your game’s name.
Actually, if you’re comfortable with it, could you copy paste the first part of your startup.txt here? It’d let me see what you’re doing and help direct better.
[/code]
The save.js
[code]saveMod = {
mygame_save: "freakhouse" //Change null to the name of your game inside quotation marks, for e.g. : ,mygame_save: "terminal"
//This ensures your game saves are unique to your game and won't be overwrote by anyone else using this system.
,isLocalIE: false //Don't change this
,autoSave: false //true = Autosaves by default - Otherwise player must activate autosave.
}; [/code]
The game says that the *sm_init command is non-existent and won't work :disappointed:
I think I see the problem, move the *sm_init command under *title *author and *scenelist. That should help. Also, save.js is redundant there since you have smPlugin.js already there, there’s no need for a second save system.
Also, what about the save.js? It’s the plugin, right? And you need it for the addon to work, no?
I have seen it in games like “From Ashes We Rise”, by @Wraith and “Children of the Gods: The Hero Trials” by @Rohie, I wonder how they managed to get it right…
My bad, it should be “src=”, like the other script tags. Not “href=”.
If the commands are “non-existent” it means you’ve either got the path wrong in those < script > tags or you haven’t placed the appropriate .js file(s) in the web folder.
After changing href= to src= it still worked funny, and I had to update the save file with a newer smplugin file, but now it works like a charm! I’m so happy!!!
@Malebranche thank you very much for your patience!
@CJW Just installed it and it works fine after seeing post 295. This may be a stupid question that has been already answered but is it capped at 3 saves? Right now I have