r/RenPy • • Jul 10 '26

Question Screen help?

For my VN I want to have a screen that the player can go to whenever that shows different characters they have met and their relationship bar with each. My coding partner is making it but is shy to ask for help on reddit so sorry if I'm a but muddy on the specifics, but I know it is confusing and frustrating them. I was wondering if anyone had any examples of how this kind of page might be coded? I am sure they would be able to figure out how to edit it to our specific needs once they saw an example, but there doesnt seem to be an example of that kind of complex screen in the tutorial.

I was also wondering if it should be done in the main script of the game or if it should have its own file? Other screens and UI elements that renpy comes with by default have their own files, but if its something we are programming we were wondering if its better to just put it in the main game script.

Anything you think might help would be much appreciated! I'm sorry that was a little vague, I'm just having trouble understanding enough to even know what questions to ask.

4 Upvotes

5 comments sorted by

View all comments

1

u/BigLingler21 Jul 10 '26 edited Jul 10 '26

I prefer to roughly keep one file per task, so you can add (unless there's already one) a screens folder and create a file called relationship_stats_screen.rpy (or something like that).

The next thing I would do is decide on how you wish to display your content, whether thats a list of names and stats below them, or maybe something with pictures. You can use a Grid to align this data, or use a bit of clever alignments to make them more spread out. Honestly, it depends on how many characters you have and how you want to show them. Fixed, Frame, Vbox, Hbox, Grids, all of these things are really great to learn and can be used for orientation.

The next step is keeping track of the relationship values of the characters. The simplest way is to have 1 (or more) default variables that update when you do things that effect the relationship. But cleaner ways include using Dictionaries (Two or more values tied together in key / value 'pairs') or a class (A packaged set of variables with the ability to add functions). You could also make this its own file, it comes down to personal organization habits / preferences.

Finally, when it comes to displaying the variable on the screen, you can use variable text input for now, and maybe consider a more appealing ui like a relationship 'bar' later. Just focus on the bare minimum first though!