Ren'Py How to code multiple POV selection?

immortalkid69

Member
Jun 13, 2022
215
46
Any idea how we can code POV selection right when the game starts? Like giving the player the option to choose which character's POV they wanna play through? For example, MC POV, FMC POV, or both together.
 

Niv-Mizzet the Firemind

Active Member
Mar 15, 2020
571
1,109
A dead simple way would be this:

Python:
label start:
    scene pov_choice # a relevant image
    menu:
        "Which pov do you want to play"
        "Male":
            jump male_pov
        "Female":
            jump female_pov
I didn't have time to test this, but it should work.
 

immortalkid69

Member
Jun 13, 2022
215
46
A dead simple way would be this:

Python:
label start:
    scene pov_choice # a relevant image
    menu:
        "Which pov do you want to play"
        "Male":
            jump male_pov
        "Female":
            jump female_pov
I didn't have time to test this, but it should work.
Yeah this would be the simple way to do. But I was thinking of a more stylish way of doing it like providing the images of the characters on the screen with a button under them which would let the player choose the POV.

So if there are 2 characters, there would be three images(MC image, FMC image, and an image of them together for mixed POV) of the characters with an option under each image to let the player select the POV. Is this possible or too much work?
 

Niv-Mizzet the Firemind

Active Member
Mar 15, 2020
571
1,109
Then you'd probably need a screen with buttons. What I'd do is something like this:

Code:
screen pov_choice:
    add background_image # an image to set as background, alternatively you could do
                         # scene whatever previously in the label
    
    imagebutton:
        xpos 100 ypos 100 # the 100 are random values, you should change them as necessary
        idle "female_pov_idle.jpg" # the path to the image
        hover "female_pov_hover.jpg"
        action Jump("female_pov")
        
        xpos 200 ypos 200
        idle "male_pov_idle.jpg"
        hover "male_pov_hover.jpg"
        action Jump("male_pov")
        
        xpos 300 ypos 300
        idle "both_pov_idle.jpg"
        hover "both_pov_hover.jpg"
        action Jump("both_pov")
        
    label start:
        ...
        call screen pov_choice
I haven't tested it for bugs, but that's the general idea.
 

immortalkid69

Member
Jun 13, 2022
215
46
Then you'd probably need a screen with buttons. What I'd do is something like this:

Code:
screen pov_choice:
    add background_image # an image to set as background, alternatively you could do
                         # scene whatever previously in the label
   
    imagebutton:
        xpos 100 ypos 100 # the 100 are random values, you should change them as necessary
        idle "female_pov_idle.jpg" # the path to the image
        hover "female_pov_hover.jpg"
        action Jump("female_pov")
       
        xpos 200 ypos 200
        idle "male_pov_idle.jpg"
        hover "male_pov_hover.jpg"
        action Jump("male_pov")
       
        xpos 300 ypos 300
        idle "both_pov_idle.jpg"
        hover "both_pov_hover.jpg"
        action Jump("both_pov")
       
    label start:
        ...
        call screen pov_choice
I haven't tested it for bugs, but that's the general idea.
thx i will check this out once i am back on my pc
 

immortalkid69

Member
Jun 13, 2022
215
46
Then you'd probably need a screen with buttons. What I'd do is something like this:

Code:
screen pov_choice:
    add background_image # an image to set as background, alternatively you could do
                         # scene whatever previously in the label
   
    imagebutton:
        xpos 100 ypos 100 # the 100 are random values, you should change them as necessary
        idle "female_pov_idle.jpg" # the path to the image
        hover "female_pov_hover.jpg"
        action Jump("female_pov")
       
        xpos 200 ypos 200
        idle "male_pov_idle.jpg"
        hover "male_pov_hover.jpg"
        action Jump("male_pov")
       
        xpos 300 ypos 300
        idle "both_pov_idle.jpg"
        hover "both_pov_hover.jpg"
        action Jump("both_pov")
       
    label start:
        ...
        call screen pov_choice
I haven't tested it for bugs, but that's the general idea.
1673542616608.png

I got this error. Any solution?
 

Niv-Mizzet the Firemind

Active Member
Mar 15, 2020
571
1,109
View attachment 2305836

I got this error. Any solution?
Yeah, I'm an idiot.
Python:
screen pov_choice:
    add background_image # an image to set as background, alternatively you could do
                         # scene whatever previously in the label
  
    imagebutton:
        xpos 100 ypos 100 # the 100 are random values, you should change them as necessary
        idle "female_pov_idle.jpg" # the path to the image
        hover "female_pov_hover.jpg"
        action Jump("female_pov")
        
    imagebutton:
        xpos 200 ypos 200
        idle "male_pov_idle.jpg"
        hover "male_pov_hover.jpg"
        action Jump("male_pov")
        
    imagebutton:
        xpos 300 ypos 300
        idle "both_pov_idle.jpg"
        hover "both_pov_hover.jpg"
        action Jump("both_pov")
      
    label start:
        ...
        call screen pov_choice
 

immortalkid69

Member
Jun 13, 2022
215
46
Yeah, I'm an idiot.
Python:
screen pov_choice:
    add background_image # an image to set as background, alternatively you could do
                         # scene whatever previously in the label

    imagebutton:
        xpos 100 ypos 100 # the 100 are random values, you should change them as necessary
        idle "female_pov_idle.jpg" # the path to the image
        hover "female_pov_hover.jpg"
        action Jump("female_pov")
      
    imagebutton:
        xpos 200 ypos 200
        idle "male_pov_idle.jpg"
        hover "male_pov_hover.jpg"
        action Jump("male_pov")
      
    imagebutton:
        xpos 300 ypos 300
        idle "both_pov_idle.jpg"
        hover "both_pov_hover.jpg"
        action Jump("both_pov")
    
    label start:
        ...
        call screen pov_choice
for the "add background_image" part, my image name is "selection". So it shows as "add selection". But exception raised that "selection" is not defined. (NameError). The "selection.png" is in the images folder of my game.
 

immortalkid69

Member
Jun 13, 2022
215
46
Tryadd "selection" or
add "images/selection.png"
great it works but how to let players know what to do when they see these 3 images? Because I was expecting something like prompting the players to select which pov they want and a small text for each image which depicts what pov each image belongs to.

Like the image of the girl would have the text "FMC POV" and so on.
 

immortalkid69

Member
Jun 13, 2022
215
46
Yeah, I'm an idiot.
Python:
screen pov_choice:
    add background_image # an image to set as background, alternatively you could do
                         # scene whatever previously in the label
 
    imagebutton:
        xpos 100 ypos 100 # the 100 are random values, you should change them as necessary
        idle "female_pov_idle.jpg" # the path to the image
        hover "female_pov_hover.jpg"
        action Jump("female_pov")
       
    imagebutton:
        xpos 200 ypos 200
        idle "male_pov_idle.jpg"
        hover "male_pov_hover.jpg"
        action Jump("male_pov")
       
    imagebutton:
        xpos 300 ypos 300
        idle "both_pov_idle.jpg"
        hover "both_pov_hover.jpg"
        action Jump("both_pov")
     
    label start:
        ...
        call screen pov_choice
Actually I noticed that when I click on female pov, the dialogues in that pov are coming from the male pov label. Any idea why?