Saving particular variables between playthroughs?

I’m kinda guessing this isn’t going to be a thing without having to manually reset every single variable except the ones I want saved between playthroughs but thought I’d ask the brains trust.

So, I’ve got a game that’s designed to be fairly short but played multiple times. I’m guessing having to set up your MC multiple times is going to be a bit annoying. So, is there a way to save only particular values?

I mean I know I can make checkpoint saves within the game (like *set haircoloursave haircolour) but those will get wiped between plays and so not work.

An alternative is to bypass the start up sequences with an achievement (ie if set an achievement for finishing a character creation) but then that will mean that none of the start up values that need resetting for the game to work will be able to be set which is also no good for my purposes.

Ideas? Just seeing if there is a QOL option here for players.

4 Likes

If you wanted to let them replay from the beginning with the same settings, then at the ‘end’ of the game don’t let it go to the ‘play again’ button and instead have a set of choices for “Starting Fresh” or “Lets go again” where the former ends the game normally and they remake the character while the latter could redirect to a scene resetting the event variables and then send the player back to the first label. But that is just my first intuition on how you would do that.

4 Likes

Yeah I think so too. You’d move all the story game file out of the startup and run a *goto_scene semi-reset from the “ending”, then goto_scene scene1 type pf thing so skipping the startup entirely after game one. It’s just super annoying to have to set up code to reset a tonne of variables manually just to save the character ones. Just wondering if there’s any other way around it, but don’t think so.

1 Like

I mean, you can just replace “create” with “set” with a copy of your startup file and you’ll have 90% of the work done lol,.

Assuming you are using a code editor that is decent, I use Visual Studio Code and they have a “Change all Occurences” option that would be particularly useful for things like that.

4 Likes

lol yeah true I guess. I use notepad ++ but you can ask it to find and change words so it’d be doable. I’d just have to make sure I do something about any variables that have settings for people who haven’t used the character creation option or else I can see code breakages in my future. It’s probably do-able with save values that don’t get reset unlike the rest so can be reloaded if the player wants. (It’s certainly do-able, just annoying. It’d be far nicer if I could just ask the game to carry over X, Y, Z varables somehow, but yeah I don’t think I can do that.

Why use notepad++?

I hope you don’t mind me asking, but a ton of authors use that kind of software, and I don’t understand it because with coding programs they tell you when something is wrong. Isn’t it really frustrating to try to fix bugs that way? I am curious.

Honestly? Probably because I’m oldschool and am just used to it. I don’t find it generally frustrating to find bugs (usually! There are very occasional exceptions) because the testers tell me approximately what is likely to have gone wrong now that I’m used to the error messages and what they are sometimes (not always clearly) implying has gone wrong. It’s also small, simple and free. Personal note the lizard logo is super cute on my desktop lol :lizard:

image

I use CSIDE occasionally. It’s a very good program, but for some reason doesn’t play at all well with anything I’ve previously saved in notepad. Not sure why, it seems to be only me I know of that has that issue. Since I have a lot of ongoing projects, it’d be a pain to port them over and I’m honestly happy cruising along with my lizard logo program.

2 Likes

Heh. I’m even older school - I use vi. But, like you say, when you are used to a tool there are very few issues with debugging. And choicescript is not that complicated.

2 Likes

I’d be appreciative if you wouldn’t sending me a PM with the details/symptoms of CSIDE not playing nice with files you’ve saved in Notepad++. One of my key design philosophies has always been that CSIDE shouldn’t lock you into using it, but that it instead should be able to drop in and out of a development process as desired by authors. Many use it for everything, others for nothing, and a good chunk just for debugging.

3 Likes
  • Copy startup.txt
  • CTRL-H replace *create with *set
  • Remove everything you want to keep
  • instead of *ending, use *goto_scene back to the beginning
1 Like

New Game Plus? (New Game+)

Its the Trope Namer afterall!

Simple. Lightweight. Does what I need it to do. Wrote 3 published CoGs with it.

Also, I can highlight a word by double-clicking and it highlights all other instances of that word in the document. I find that immensely helpful in avoiding redundancy. If another word processor or CSIDE can do that, I never figured out how.

5 Likes

That’s fairly common behaviour across most editors, CSIDE has a setting to enable it: Screenshot_2023-01-11-15-50-53-29_40deb401b9ffe8e1df2f1cc5ba480b12

5 Likes

I will once again proudly boast for Visual Studio Code, it has an innumerable amount of extensions that allow for you to do basically whatever you want.

I have an extension that will highlight anything selected after holding SHIFT+F8, and an extension for highlighting code or problems in code for Choice Script. Makes things so much easier for me, though not everyone might like the way it looks.

Some screencaps (to clean up things a bit)

HMMM

:thinking:

1 Like

I appreciate I didn’t help here, but we should refrain from turning this into a favourite editor thread :slight_smile:

1 Like

Cool. I tried CSIDE back when it first came out and I remember looking everywhere for something like that. Maybe I missed it.

1 Like

This may actually get me to install CSIDE! I’ve grown so comfortable with Notepad++ that I’d miss features like this, so that helps a lot.

Realizing that it’s a bit off topic, on the subject of saving variables between playthroughs:

I pulled this trick off twice, and both times people were like

Space Cat GIF - Space Cat Shocked GIFs

so I highly recommend going for it.

4 Likes