Problems using voice in NVL mode/ center yalign

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: 560
Joined: Mon Aug 11, 2014 9:39 am
Completed: One Night Stand
Projects: Love IRL, Memories
Tumblr: gamesbykinmoku
itch: kinmoku
Location: Germany
Contact:

Problems using voice in NVL mode/ center yalign

#1 Post by Kinmoku » Wed Feb 09, 2022 5:51 am

Hi all,

I have a problem displaying my nvl text which uses voice. I want a block of text to be centered vertically, but my voice files are split in two. At the moment, the code has yalign 0.5 and works as it should... However, the additional lines appear underneath and are squashed at the bottom of the screen. I would like the whole block of text to be vertically aligned, not just the first line.

I know the best way to do this is to have a bigger paragraph and break it up with {w} or {nw}, but I have two voice files and I want to keep them separate so the player isn't overwhelmed by narration.

I either need a solution to start the second voice file mid paragraph (and use {w}), or I need to be able to center yalign a block of text.

I have several voiced narration blocks like this, so the height will be different each time, meaning I can't tweak the padding to make it work (unless I make several nvl styles...)

Here is my text block:

Code: Select all

voice "voice/session1_line1.ogg"
    n "This is my first line of dialogue which is a lot longer than the next two."

    voice "voice/session1_line2.ogg"
    n "This is the second line…{w=1.0}{nw}"

    voice sustain
    n "...which is split into another."

    nvl clear
And my nvl code in GUI:

Code: Select all

define gui.nvl_height = None

define gui.nvl_text_xpos = 0.5
define gui.nvl_text_ypos = 0.5
I feel like this is probably possible, but after searching the forums for a while, I can't find a solution for this particular problem.

Thank you in advance :)

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

Re: Problems using voice in NVL mode/ center yalign

#2 Post by Kinmoku » Tue Feb 22, 2022 12:54 pm

Just bumping this in case anyone can help.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Problems using voice in NVL mode/ center yalign

#3 Post by Ocelot » Wed Feb 23, 2022 1:55 pm

I would like a minimal reproducible example, so I could poke around and see, what is causing you problems, instead of guessing.

SOme thoughts:
Kinmoku wrote:
Wed Feb 09, 2022 5:51 am
I have several voiced narration blocks like this, so the height will be different each time, meaning I can't tweak the padding to make it work (unless I make several nvl styles...)
You can pass style you want to use to the character, so it would be different from normal. Alternatively, you can even change the layout of copy of say screen itself and make segment, where you have problems, use that screen.
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: Bing [Bot], _ticlock_