Chapter skipping system

What’s required: a way to jump between chapters from any point of the story. Like, go through half of the first chapter, test something, then jump to the third chapter to test another thing, while the skipped choices are set manually or randomized. The point is to make the skip always accessible for the player at any given moment.

How I tried to make it: all randomizing stuff and manual settings of decisions are placed in the separate scenes file. There are no problems with this part. But to make the skip accessible from any part of the story I placed the link to this scene on the stats screen. In code it looks like this:

*stats*
*fake_choice
  #Skip to the certain chapter
    *goto_scene chapterskip

What’s wrong: the game indeed moves the player to the skip selection, and after that - to the chosen chapter… but it all remains on the stats screen. Therefore it’s impossible to view the stats, and the button “Return to the game” returns the player to the text before the skip attempt. It works this way both with *goto_scene and *gosub_scene (due to the nature of the stats screen, I suppose?). All variables changed during the skip on the stats screen are reverted to their initial values during this return.

Is it possible to make such skipping system, or the only solution is to use checkpoints and insert the skipping option at the start/end of each chapter?

I see two things I don’t think should be there. First, why write stats? And second, I don’t think a fake choice can goto a scene.

Stats is just a placeholder to show how it looks like in general. I didn’t copy actual *opposed_pair and other things from the tested game :sweat_smile:
And all *goto commands usually work perfectly well with *fake_choice, *goto_scene wasn’t an exception, if I’m not mistaken.

Huh… I’ve never seen fake_choice used with goto, but I guess that doesn’t necessarily mean it doesn’t work.

I don’t think there is a way to do this from the stats screen. It needs to be in a main file as otherwise it’ll break your game.

Also don’t use fake_choice, just choice.

1 Like

There’s a technical method of doing this. A command. I can’t remember the name. It sends you to a “real” scene from the stats screen.

3 Likes

Is it *redirect_scene ?

3 Likes

That’s the one.

Just checked, and it works as intended with *redirect_scene instead of *goto_scene. No issues with fake choice command either. Thanks for help!

1 Like

Okay, scratch that, it works only halfway correctly.

With *redirect_scene the game returns from the stats screen to normal mode and then goes to the listed scenes file, proceeding to work as usual. But once you go to the stats screen after that jump (to view the stats or whatever else) and return via the “Return to the game” button, it returns you to the point you were at before using *redirect_scene.

I’m not sure if it’s not a bug because the results kind of contradict the instruction text for *redirect_scene.

3 Likes