Sadly, whilst it's a simple question... it's not a simple answer.
Plan-A
Forget it.
Seriously, most games don't have any sort of summary screen - and there isn't a huge portion of the VN community crying out for them. If your game didn't have one... nobody would miss it.
I get it... you have a vision for your game and you don't want to let a little thing like this defeat you. Learning is fun and so is stretching your technical knowledge in a challenging direction.
Still... forget it - it's too much of a headache for such a small feature.
Plan-B
Cheat.
Find a game or two with summary screens (or even stat screens) that you know about. Ignore the really BIG games - since their solutions will likely be too obtuse or complex for someone just starting out. Instead, find games that look okay or just plain bad... because if they can do it... so can you. You can always improve the look and feel of it all later.
Then look at their code.
Most games are compressed into
.rpa
archives. Just uncompress them using a tool like
UnRen and dive into their code to figure out how they wrote their
You must be registered to see the links
code and how they used variables to show that same information on that screen. Currently, the 0.8 doesn't unpack every single game, however 0.9-dev does 99% - so use that version.
If the game only ships with
.rpyc
compiled code rather than
.rpy
source files... that's okay, since UnRen also features a way of recreating the source code from the
.rpyc
files.
Plan-C
The hard way.
Read
You must be registered to see the links
.
What you are going to end up needing is a
You must be registered to see the links
statement at the point in your code you want to display the summary screen. You'll need a corresponding screen written in screen language with a matching name. It'll also need a
You must be registered to see the links
statement in the main screen definition.
call screen
will just display the named screen for the player.
modal True
ensures that only things that are part of this screen can be clicked on (ie. everything else is disabled while this screen is being shown).
At least one element of the screen will need to "end/close" the screen. That could be either an
You must be registered to see the links
to a label, or an
You must be registered to see the links
.
Depending on your needs, consider writing a separate summary screen for each episode/chapter. That way, you can just focus on the stuff that happened during "this" episode.
Then you need to design your screen...
Normally you would use something like
You must be registered to see the links
to place a fullscreen background image on the screen, then build a lot of other elements on top of it.
Beyond that, there are things like Frame, Grid, Fixed, Hbox, Vbox, Window and Viewport - which are all screen elements that "hold/contain" other screen elements. Viewpoint, Hbox and Vbox are all useful if you want to have a scrollable area.
You'd then have Text components, which are your fixed text. That could be captions or some data you want to display.
Clickable areas are usually Button, Imagebutton or Textbutton. Though you can also use Imagemaps and Hotspots.
Then there are things like VBar or Bar, which show numbers as either a virtual or horizontal bar.
The Text, Vbar or Bar statements would normally be linked to variables to show either directly or indirectly.
Then there is positioning everything, where you have two positioning styles. Either
xpos, ypos
or
xalign, yalign
. "pos" will use absolutely positioning on the screen, x pixels in one direction, y pixels in the other. "align" is a sliding scale from 0 to 1. Something aligned with 0.0 will have it's top/left edge against the top/left edge of the screen. 1.0 would have it's bottom/right edge against the bottom/right edge of the screen. 0.5 would be the middle of the displayable aligned with the middle of the screen in either (or both) x or y axis. You can use numbers less than 0 and greater than 1 if you want the displayable to extend beyond the edge of the screen.
If it's all feeling a bit overwhelming, just code a bunch of "Text" components within a single "Fixed" frame, with a Textbutton as your close/exit button.
As for examples... there isn't really a one-size-fits-all answer. I can only refer you to
Plan-B and say there is very little difference between a stats screen and a summary screen (except that a stats screen may often use
show screen
rather than
call screen
).
Plan-D
See Plan-A