Sending up the @Jacic signal as I believe she did a couple there. I did one years ago but all I remember is that it was a bit of a challenge to get it formatted right.
I used to be able to get the CS save feature to work with the compile feature built into the CS file you download from COG (not using the one on CSIDE) but I haven’t tried it out since all the problems with the browsers causing a revamp of the CS package to get everything working again, so I’m not sure if it’s still working as it used to. Would need to try it out and see.
If you need to include images, I’d use CSIDE’s ability to convert images into scenes, then compile the game with CSIDE. I don’t know how to get CSIDE to compile with the above save plug in though, so unless someone has more info on this, you may need to choose between the having images or a save plugin, or mess around with separate image hosting.
Edit: Might be worth also taking a look here. I’ve got some instructions on how to host a CS game on itch. I don’t think it’s changed much since then.
Unfortunately CSIDE doesn’t currently support any external JavaScript (including the save plugin). I’m working on improving this use-case for the next major version, but that’s not going to be in time to help you with this.
There are ways you could manually hack this stuff in, but I can’t think of any easy way to do it. You might be better off relying on a soft save system for the time being.
I’ve hacked together a version of choicescript that compiles with autosaving, which uses the save plugin. You can see how it works at A Paradox Between Worlds by red autumn. You’ll need to:
I’m thinking this might do it, in conjunction to what @Jacic said about compiling images into scenes using CSIDE. Haven’t had time to try yet, since I’m under the gun, but I wanted to get an answer out there before I needed it. @autumnchen
Is there more on how to do this? Sorry if the answer is easy/obvious–haven’t slept much. @CJW I would just need to get the Dark Pack logo in on the front page. It’d be nice if I could get my cover art in too.
Hopefully it’s not all too complicated. I’m working my ass off but, talking code to me, you might as well be talking to a chair. Cheers, all. Thanks for the help.
There’s documentation on image scenes under the “Basic Topics” category inside the app. You can access the option via right-clicking a project and selecting ‘Import → Image (as scene)’.
Also just be aware, when I’ve tried in the past (was a few years ago so may not apply now) to compile games that have CSIDE converted images in there with the compile program provided by COG (which it sounds like you’re planning on) it would crash it and not work. Try it out well in advance to make sure it’ll cope with including scene images if you are going to try to you don’t get caught out the day before the deadline if it doesn’t work.
CSIDE’s compile option has no problems with compiling the images into a game.
If you still have problems maybe see if “softly” (on the forums, I haven’t looked at it in depth to see if it’ll work with this scenario) might be suitable. Otherwise you can build checkpoints in the game (say at the start of each chapter) where you have “save variables”. I haven’t done this myself but it should be relatively straight forward (although messy if you have tonnes of variables.) I think from memory the code is something like this:
*comment start of chapter 2 save all variables that might change in this chapter so they can be reset
*set chapter2health health
*comment set a variable so can allow players to access that save point such as the one below.
*set chapter2 "started"
Then if someone wants to return to the start of chapter 2. (ie have a choice from the stats screen or something where you trigger each chapter to be available with a variable.)
ie
Restart game from...
*choice
*if (chapter2 = "started") #Chapter 2
*set health chapter2health
*goto_scene chapter2
etc
You can also have save points before death fail points instead if you want having a pre-save before the start of it and sending the player back to that point if you die rather than the start of a chapter.
Hmm, I tried this manual end-of-chapter auto-save, and I mostly have it working. However, whenever I navigate to a previous chapter from the stats screen, the “Show Stats” button becomes replaced with a “Return to Game” button. So, the stat values don’t reset, and if I hit “Return to Game,” I go back to where I was when I tried to return to an earlier scene. Please help! @Jacic@CJW
If you’re going to navigate out from the stats screen you need to use the *redirect_scene command. But by and large, I’d recommend you avoid doing that. Just stick the save code at the end of each chapter instead.
Entering the stats screen puts your game into a “stats mode” which messes things up if you try to go back to the game without properly exiting it.
Right now, I have a bunch of stat locking at the end of each chapter. Lots of *set c2_humane humane. You’re advising that, at the end of each chapter, I ask whether the player wants to proceed or go back? That would save me from “stats mode” mess ups, but would only allow replay at certain points, not mid-chapter. I’d opted for stats bc they could go back at any point if they don’t like the decision. However, I don’t want to get disqualified bc my game doesn’t work since I will have put hundreds of hours in. @CJW
My main worry is that the game will take 3-4 hours to play. So, if the judges and players set it down or close it, I don’t want them to have to start over and maybe quit.
I think in theory redirect_scene will work for the stats screen but I haven’t tried it myself.
I could be wrong but I don’t think @cup_half_empty’s save system – or any soft save system – will help you if someone quits your game. The word “soft” means lost on exit in this context, versus a hard save system that makes sure things stick around.
I’m afraid @CJW is right. If itch.io can’t preserve the current session state then a soft save system won’t be of much help. Your best bet, in that case, would be to tweak the ChoiceScript compiler.
Which is what the save plugin builds upon. That should make your “soft” saves appear “harder”, because there will be some limited persistence.
But it won’t give you save slots or anything.
Sorry about that @dwnsnee I didn’t realise redirecting from the stats menu caused that amount of problems either.
The only other thing I could suggest if you want a regular way of allowing the player to backtrack without end of chapter saves or if softly doesn’t work with the cs code change on itch would be a “return to last save point” option at each choice, although that might be a bit too clunky really?
ie
Something continues to stalk you in the darkness. Wounded, you'll not stand much chance if they decide to attack. Do you...
*choice
#Continue through the park
*goto park
#Retreat back the way you came
*goto retreat
#Return to last save point
*gosub ch2_save
*goto start_ch2
*label ch2_save
*set humane c2_humane
*set traditional c2_traditional
*set outgoing c2_outgoing
*set sensing c2_sensing
*set rational c2_rational
*set decisive c2_decisive
*set padre_rel c2_padre_rel
*set dakota_rel c2_dakota_rel
*set boone_rel c2_boone_rel
*set pavo_rel c2_pavo_rel
*set marisol_rel c2_marisol_rel
*set calixta_rel c2_calixta_rel
*goto_scene c2_dinero_sangriento
*return
Edit: The redirect_scene suggested by CJW should work fine from the sounds of it. It’s been added to the “advanced choicescript” page on the main cog site.
*redirect_scene : This command behaves kinda like *goto_scene , but you can only use it on the stats screen. On the stats screen, the game is in “stats mode,” and so the button at the top of the screen says “Return to the game” instead of “Stats.” Stats mode is like the Matrix; it’s not the real world. In stats mode, *goto_scene stays in stats mode, and it doesn’t affect the main game. If you “Return to the game,” you’ll be right back in “game mode” in the chapter where you left off, like waking from a dream. Use *redirect_scene on the stats screen to *goto_scene in the main game.
Whew. Almost done a wholedraft. Quicktest only produces this one error–it has from the beginning: TITLE TOO LONG (40 out of 30 characters): Vampire: The Masquerade - Blood Frontier.
What are the consequences of me leaving it alone? Will my title be truncated? Will everything crash?
Understatement: this is going poorly for me, though I’m certain that’s my fault. I downloaded the plugin from the link in number 1. I moved mygame.js into the web folder. However, I don’t have ChoiceScriptSavePlugin-master anywhere. Didn’t know where to put it and when I tried to open the README.md, the App Store couldn’t find a compatible reader in my region (U.S.) I’ve followed the instructions as posted on GitHub up to “The first edit is to include the script you just downloaded,” but when I open index.html (the one in the mygame folder) I’m prompted to upload the file online. When I do, my game runs, and I’m unable to edit anything.
Please help @autumnchen@CJW or anyone smarter than me. Pressed for time in game jam. Thanks for your patience with me.