Ren'Py How can I exactly add a summary after an episode?

Nov 14, 2020
20
4
Hello! I have a question, probably a noob question but please help - how can I exactly add a summary after the episode ends with what the MC did or didn't do with different characters and also relationship points? I know it has to be done with 'screen', but how exactly the code should look like please? I feel quite lost especially with screens :(
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,611
2,258
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 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 .
What you are going to end up needing is a 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 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 to a label, or an .
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 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
 
Nov 14, 2020
20
4
OMG, I love your answer! :) Thank you so much! I guess I have too ambitious plans overall for the very first game. But well I'm a completionist and overachiever when it comes to games. I will try and stick with the ambitious plan as much as possible!
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,504
8,040
Just use NVL:

I know that it is out of date, but you can see a few screenshots and perhaps even try out a few things out of it anyways.
NVL is perfect for what you want to do (imho), if you believe the same, simply look on google for some more recent material about it. Pretty simple to use.
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,557
My new game is detective game, so you go around detecting things sort of. One of my beta testers suggested to add a summary screen, not only for the episode just played, but for when you come back for the next one 2 months and 15 other games later.

The screen itself is just a quick job as I only added as a last thought just before the last release so I have not laid it out anyway special, bit it is simple to call.

Python:
"That's it folks for this EP. Stay safe."
    
    "Do you want read your case notes?"
    menu:
        "Yes":
            jump case_notes
        "No":
            $ MainMenu(confirm=False)()
Python:
label case_notes:
    call screen case_notes1

screen case_notes1:
    image "black.jpg"
    text "This is a summary of what has happened so far, you will be able view it every episdoe." at top
    vbox:
        xalign 0.5
        yalign 0.1
        text "Stuff here."
        text "And here."
        text "I like boobs."
        text "And bums."
        text "Blah blah."
        text "You get the point."
      
    vbox:
        xalign 0.5
        yalign 0.9
        textbutton "Quit" action Jump("byebye")

label byebye:
    $ MainMenu(confirm=False)()
Where I jump to case_notes just to call the screen, you could just call it first and not jump anywhere, the reason I have is in case I want to add any varibles later on that the screen language don't like.
 
Nov 14, 2020
20
4
Thanks guys, you all have been very helpful I pick bits and pieces from everyone! I feel even more motivated to get on with my game for such a nice community!
 
  • Like
Reactions: mickydoo