[SOLVED] Menu text, transitions etc not working with "$ renpy.say"

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
User avatar
Kinmoku
Miko-Class Veteran
Posts: 591
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: VIDEOVERSE
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

[SOLVED] Menu text, transitions etc not working with "$ renpy.say"

#1 Post by Kinmoku »

Hi all,

Instead of using the normal dialogue (e "Hello") I'm using $ renpy.say(e, "Hello"), for reasons mentioned in a previous post: viewtopic.php?f=8&t=50909

Unfortunately, this stops certain things from working. Menu dialogue (a character asking a question) doesn't display. Using "extend "" " doesn't work either (and goes back to the last normal dialogue string). Also, transitions like hpunch and vpunch don't work.

Does anyone know why this is and what I need to do to correct it?

Thanks :wink:
Last edited by Kinmoku on Mon Aug 06, 2018 2:49 am, edited 1 time in total.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Menu text, transitions etc not working with "$ renpy.say"

#2 Post by trooper6 »

You don't need to use $renpy.say if all you want to do is pass arguments as part of a say statement. See: https://www.renpy.org/doc/html/dialogue ... -arguments.

But! If you are looking at speech bubbles, you may want to read the Patreon article that PyTom wrote all about speech bubbles...it is now open to non-Patreon supporters. And while, in the article, only the tail of the bubble moves, I'm sure you can use it as a model for your case.
https://patreon.renpy.org/speech-bubbles.html
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
Kinmoku
Miko-Class Veteran
Posts: 591
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: VIDEOVERSE
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Re: Menu text, transitions etc not working with "$ renpy.say"

#3 Post by Kinmoku »

trooper6 wrote: Fri Jul 20, 2018 2:12 pm But! If you are looking at speech bubbles, you may want to read the Patreon article that PyTom wrote all about speech bubbles...it is now open to non-Patreon supporters. And while, in the article, only the tail of the bubble moves, I'm sure you can use it as a model for your case.
https://patreon.renpy.org/speech-bubbles.html
Oh, that's cool. Unfortunately, it's not what I'm doing for this project so the tail isn't much help. My speech bubbles are appearing all over the place depending on the artwork/ cgs, of which there are many.

$renpy.say is working how I want it to, apart from the menu text and transitions. Here's an example of what I've got:

Code: Select all

    $ renpy.say(m, "What happened?! Are you okay?", window_style="window_wide_bottom_middle")
    $ renpy.say(k, "Y-yeah.\nI jus' scraped my knee.", window_style="window_small_s1_fall")
In screens.rpy:

Code: Select all

style window_small_s1_fall:
    left_padding 110
    right_padding 110
    xmaximum 505
    xfill True
    ysize 173
    xpos 130
    ypos 355
    background Image("gui/memorybox_small.png")
    
style window_wide_bottom_middle:
    left_padding 78
    right_padding 78
    xmaximum 778
    xfill True
    ysize 215
    xpos 570
    ypos 814
    background Image("gui/memorybox_wide.png")
So, what's changing for each line is text padding, text box graphic, size and position. I have 4 different styles of bubble and multiple locations depending on the artwork. It's a lot of work but I'm doing it this way for the comic/ story book appearance :) I'd just like to add some hpunches and such.

User avatar
Kinmoku
Miko-Class Veteran
Posts: 591
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: VIDEOVERSE
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Re: Menu text, transitions etc not working with "$ renpy.say"

#4 Post by Kinmoku »

I also thought I'd test generating translations (as I'd like to translate the game in future) and this doesn't work either! I think I'm going to need to use the old solution and define a character for each text box position/ window style...

EDIT: Okay, I'm stupid. I didn't realise I could use the arguments for window style! But I can, and they work perfectly with hpunch, menus and translations! Hurray :D

Here's what I ended up with in case it helps anyone:

Code: Select all

    m "It's working!" (window_style="window_small") with hpunch

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: [SOLVED] Menu text, transitions etc not working with "$ renpy.say"

#5 Post by trooper6 »

That is what I was trying to tell you in my post when I said you can use arguments with regular say statements. Glad you finally grokked it!
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: Andredron, Donmai