Variable retaining value upon game completion

After digging through topics for a while, I couldn’t find anything like this or a method that would reach close. I wonder if there is an existing method or a planned feature that would introduce a specific parameter allowing the game to retain the value of a variable after the game is finished and played again.
E.g.: ‘play again’ is pressed, but not if ‘restart’ is performed.

For example:

*set sacrificed_self true retainsacrificed_self boolean now retains the value ‘true’ for subsequent playthroughs.

I’m working on something that would benefit from this, and I think there are stories heavy on replayability that could also profit from this feature.

Of course, the same can be achieved with a simple choice asking if you have already completed the game once, or a set of questionnaires that tunes the subsequent playthroughs, but those are always more disrupting than the mentioned process in the background.

So… do you think the result would match the effort, or it would not be worth introducing this feature, and it would be just a convenient parameter barely used? At the moment, do you or do you not see yourself using it? :slight_smile:

1 Like

You can set an achievement and check for it. IIRC, achievements persist through play-throughs.

I don’t like the aesthetics of it, though. The player is aware of the flag as soon as you set it to true. So unless you can make the achievement feel natural, it may be just as much a disruptive experience. Not to mention the fact that it must be a flag (true or false) and not a value (how many times died, for example).

On the other hand, you can replicate the final message of a ChoiceScript game (instead of allowing the default message when the game hits *ending), and implement your own restart subroutine to reset all variables except those you want to persist. This can be some work but I believe it’s feasible.

5 Likes

This is exactly what I did for A Kiss from Death. Combined it with achievements, too.

5 Likes