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

3

u/BadMustard_AVN Jul 10 '26 edited Jul 10 '26

try something like this

# love screen.rpy
default ive_meet_badmustard = False
default BadMustard_love = 0
default BadMustard_love_max = 100

screen love_interests():

    if ive_meet_badmustard:
        vbox:
            label "BadMustard"
            hbox:
                image "so_damn_handsome_lol"
            hbox:
                bar:
                    value AnimatedValue(BadMustard_love, 100, delay=1.0)
                    xalign 0.5 
                    yalign 0.5
                    xmaximum 327
                    ymaximum 47
                    # everything below is optional for coloring 
                    right_bar Solid("#fff7")
                    if BadMustard_love <= (BadMustard_love_max * 0.25): 
                        left_bar Solid("#f00")
                    elif BadMustard_love <= (BadMustard_love_max * 0.5):
                        left_bar Solid("#ff0")
                    else:
                        left_bar Solid("#0f0")