Using Rez @plot and @scene to turn a long introduction into a sequence of flashbacks

So, in my game I had an introductory scene that grew to be 6 cards and counting (a Rez card is analogous to a Twine passage). I like what I’ve written but this risks being boring right at the start given that you have no meaningful choices here. This stuff already happened and is just world building.

It occurred to me that instead of using this for an introductory scene, I could make this a flashback scene and then spread the world building over a series of night times. What would that take to do?

%% @plot is a plot clock a la Blades in the Dark
@plot p_flashbacks {
  %% 6 stages corresponds to 6 flashbacks whose content
  %% will be in cards with id c_flashback_1 to c_flashback_6
  stages: 6

  %% Default priority value for which plots goes first
  priority: 1

  %% Property returning the card for the current flashback
  card: ^p{
    return $(`c_flashback_${this.cur_stage}`);
  }
}

%% @scene's are like scenes in a movie or a play
@scene s_flashback {
  initial_card_id: #c_flashback_1

  %% Link this scene to the flashback plot
  plot_id: #p_flashbacks

  %% Called when the scene starts, sets the initial card
  %% presented to the player to the current card in the
  %% flashback sequence
  on_start: (scene) => {
    scene.initial_card = scene.plot.card();
  }

  %% Before resuming the previous scene, advance the
  %% plot so you get a different flashback next time
  on_finish: (scene) => {
    scene.plot.advance();
  }
}

%% @cards present HTML content to the player
%% There will be 6 of these one for each stage of the flashback plot
@card c_flashback_1 {
  content: ```
     <p>First bit of flashback</p>
     <p><a resume>Drift off…</a></p>
  ```
}

@card c_flashback_2 {
  content: ```
    <p>Second bit of flash back</p>
    <p><a resume>Wake from a fitful sleep</a></p>
  ```
}

%% and so on

Worked first time and really nicely.

Whenever the player sleeps I can check if the p_flashbacks plot is still active and, if so, first interlude to the flashback scene. The on_start callback ensures the scene starts with the next card in the flashback sequence.

Before the previous scene gets resumed the on_finish callback advances the plot so that next time the player will get a different flashback (or none at all if the plot is now complete).

This is the first time I’ve put @scene and @plot together. Rez @plot elements are akin to plot clocks from Blades in the Dark although they optionally support more complex behaviours.

1 Like