Conversation Menus (ren'py)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Guidman64
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 11:04 am
Projects: How the Fallen
Contact:

Conversation Menus (ren'py)

#1 Post by Guidman64 »

I want my game to have conversation bars, similar to menu choices. So basically I am trying to both organize/group the conversation and give the reader the reader more control over game. For example I want to have 3 different conversations with a character and I want them to have all 3 conversations before the story continues to next day/hour (i.e. "money", "friends", "job"):

Code: Select all

menu:
	"money":
        	 p "random conversation"
        	 m "response"
        	 return
	"Friends":
		p "random conversation"
         	m "response"
         	return
         "Job":
         	p "random conversation"
         	m "response"
        	return
label menu_end:  (or) 
label  day_2:
If I write it this way I only get to pick one menu choice and then it ends game, it does not go to day 2 conversations.

How can I write this code to have all conversations, jump to next day when finished, and line up on the x-axis just above the conversation screen?
Very new to this, and thank you in advance for your help.

philat
Eileen-Class Veteran
Posts: 1895
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Conversation Menus (ren'py)

#2 Post by philat »

Several options discussed in this thread: viewtopic.php?t=51347

Guidman64
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 11:04 am
Projects: How the Fallen
Contact:

Re: Conversation Menus (ren'py)

#3 Post by Guidman64 »

philat wrote: Tue Jan 15, 2019 8:47 pm Several options discussed in this thread: viewtopic.php?t=51347
I appreciate your link, but I tested the codes that they wrote and I keep getting tons of errors. I corrected a few of them but one I don't know how to write.
they had:

Code: Select all

label flowers:
     menu flowers:
        "White" if white:
            $ white = 0
             call white
         "Red"  if red:
            $ red = 0
             call red
         "Yellow" if yellow:
             $ yellow = 0
              call yellow  
          if white == 0 and red == 0 and yellow == 0:
              jump continue
           else:
               jump flowers
label continue:  
the part I could not correct was:

Code: Select all

       
        if white == 0 and red == 0 and yellow == 0:
              jump continue
              
Not sure if this will work even if, none of the other's advanced properly (kept repeating menu).

Guidman64
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 11:04 am
Projects: How the Fallen
Contact:

Re: Conversation Menus (ren'py)

#4 Post by Guidman64 »

I did make another menu button "Continue". Where I just jumped to next label. It seems a bit crude seeing that they can just push "continue" and skip over conversations.

I would really like to learn to write the code so the menu choices, if possible, disappear or at the least advance to next label when all menus have been read.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Conversation Menus (ren'py)

#5 Post by Per K Grok »

Guidman64 wrote: Wed Jan 16, 2019 12:41 am I did make another menu button "Continue". Where I just jumped to next label. It seems a bit crude seeing that they can just push "continue" and skip over conversations.

I would really like to learn to write the code so the menu choices, if possible, disappear or at the least advance to next label when all menus have been read.
Try this

Code: Select all

default white=1
default red=1
default yellow=1

Code: Select all

label flowers:
    menu:
        "White" if white:
            $ white = 0
            jump white
        "Red" if red:
            $ red = 0
            jump red
        "Yellow" if yellow:
            $ yellow = 0
            jump yellow
    jump go_on

label white:
    "bla bla bla"
    jump flowers

label red:
    "bla bla bla"
    jump flowers

label yellow:
    "bla bla bla"
    jump flowers

label go_on:
    "Game continues"

Guidman64
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 11:04 am
Projects: How the Fallen
Contact:

Re: Conversation Menus (ren'py)

#6 Post by Guidman64 »

Great thank you very much, that will be perfect, appreciate your time.

Another thing, what do we write in the code to have the menus line centered horizontally above the text screen.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Conversation Menus (ren'py)

#7 Post by Per K Grok »

Guidman64 wrote: Wed Jan 16, 2019 1:13 pm ---

Another thing, what do we write in the code to have the menus line centered horizontally above the text screen.
screens.rpy

screen choice(items):

-----

Code: Select all

style choice_vbox:
    xalign 0.5
    yalign 0.5
    yanchor 0.5

Guidman64
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 11:04 am
Projects: How the Fallen
Contact:

Re: Conversation Menus (ren'py)

#8 Post by Guidman64 »

sorry to bother again, trying to find the info online but not sure how to word it correctly, everything is sending me to change starting menu screen, when I want choice menu buttons. So that leave me needing your help again; thankyou for your patience.

I went to screens.rpy, changed the choice_box but it stayed vertical so I changed all the vbox to hbox but 2 problems arose:

1. menu choices were in middle of screen instead of above text box
2. menu choice boxes were to big and broke the choices into 2 different screens

I tried this guys code, which did not work for me either (https://f95zone.com/threads/renpy-how-c ... lly.12783/), not sure why it worked for him and not me, guessing it's the custom box?

So I guess what I need to change the box size (how/where do we do that) or do I need to build a custom box?

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Conversation Menus (ren'py)

#9 Post by rayminator »

if you look in your gui.rpy find it should be on line 205

Code: Select all

define gui.choice_button_width = 790
define gui.choice_button_height = None
define gui.choice_button_tile = False
define gui.choice_button_borders = Borders(100, 5, 100, 5)
define gui.choice_button_text_font = gui.text_font
define gui.choice_button_text_size = gui.text_size
define gui.choice_button_text_xalign = 0.5
define gui.choice_button_text_idle_color = "#000000"
define gui.choice_button_text_hover_color = "#ffffff"

Guidman64
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 11:04 am
Projects: How the Fallen
Contact:

Re: Conversation Menus (ren'py)

#10 Post by Guidman64 »

HA, Ha! That works perfect Thank you both for your help.

So new at this, I'm still learning what everything is called. Really appreciate everyone's time and patience.

ps. I put the ypos (from screens.rpy) to = .71 and that put it where I wanted just above the talk menu.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]