NVL: show full page by enabling no-wait {nw} / auto-continue on every block until next `nvl clear`

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
komehara
Regular
Posts: 36
Joined: Fri Jan 31, 2020 10:08 pm
Projects: Spirit Link
Tumblr: hsandt
Deviantart: hsandt
Github: hsandt
itch: komehara
Contact:

NVL: show full page by enabling no-wait {nw} / auto-continue on every block until next `nvl clear`

#1 Post by komehara »

I'm working on a sound novel using NVL mode and I'm trying to emulate showing a full page of a book, pause and require user input there, then continue to the next page.

Right now, each paragraph = 1 block of text and the user must press Space to advance to the next paragraph. It's not bad, but sometimes I really just want to display the whole text, more like Inky would do in the standard web template (and many text adventure engines, in fact).

The manual solution is to add {nw} at the end of every text block (before the closing double quote), except the one before nvl clear. I have some script to automate text processing but it's difficult for me to check if there is an `nvl clear` next because I'm processing text line by line.

I wonder if there is not a command to enable some "sticky" no-wait mode until I disable it. Then I'd only need to enable it at the start of each "page", and disable it before the next `nvl clear`.

I tried to fix this on user side, letting them enable Auto option with Auto time = 0: but it also auto-advances after the last paragraph of the "page", instead of stopping there (and I don't see a command to force disabling Auto - it would also be bad for UX for users who actually use Auto with Auto time > 0 and want the game to automatically continue to the next page when they are done reading).

For now I see two solutions:
a. Improve my text-processing script to detect the presence of `nvl clear` even if it's several lines below, and not add suffix {nw} if there is one after the current text
b. Instead of working with isolated paragraphs, join them together with newlines, causing them to be a big block of text that is displayed at once - do this for every page. But do not use the triple """ """ monologue quotes which breaks paragraphs back into blocks by adding pauses, which would defeat the purpose.

User avatar
komehara
Regular
Posts: 36
Joined: Fri Jan 31, 2020 10:08 pm
Projects: Spirit Link
Tumblr: hsandt
Deviantart: hsandt
Github: hsandt
itch: komehara
Contact:

Re: NVL: show full page by enabling no-wait {nw} / auto-continue on every block until next `nvl clear`

#2 Post by komehara »

Update:

I managed to implement b. in my script converter, my text now looks like "Line1\n\nLine2\n\nLine3" (it's very long in a text editor, I need to use auto-wrap or I see nothing). It works!

In the meantime I thought about a third solution c.

c. Add `pause` before the next `nvl clear` to cancel the effect of the previous `{nw}`.

It should be much easier to implement in my script converter, as I don't need to *predict* a future `nvl clear`, just insert a pause before it when I detect `nvl clear`. It should also give me more control over pauses as I just have to add `pause` when I really want to (harder to break a \n\n multi-paragraph text block when I need to, although possible by adding some custom markers in my original script).

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

Re: NVL: show full page by enabling no-wait {nw} / auto-continue on every block until next `nvl clear`

#3 Post by Ocelot »

You do know that you can disable monologue mode, and work with triple-quoted string like with normal text, right?
< < insert Rick Cook quote here > >

User avatar
komehara
Regular
Posts: 36
Joined: Fri Jan 31, 2020 10:08 pm
Projects: Spirit Link
Tumblr: hsandt
Deviantart: hsandt
Github: hsandt
itch: komehara
Contact:

Re: NVL: show full page by enabling no-wait {nw} / auto-continue on every block until next `nvl clear`

#4 Post by komehara »

No, I didn't know it. I must have read the doc too fast, it's indicated at the end of https://www.renpy.org/doc/html/dialogue ... logue-mode

So I tried this:

Code: Select all

# Disable monologue break
rpy monologue none

label start:
    """
    text1

    text2

    text3

    """
and it works, thanks! The text all appears at once, which is slightly different visually from the blocks of text appearing one by one with its own animation (if text speed is high, this will show off as small pauses between paragraphs).

In the meantime I switched to the block + {nw} method because it gave me more control and the possibility to insert comments between paragraphs. But for people who directly write in Renpy and/or don't need such extra comments, this sounds like a good solution to display text page by page for NVL.

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

Re: NVL: show full page by enabling no-wait {nw} / auto-continue on every block until next `nvl clear`

#5 Post by Ocelot »

For comments between paragraphs you can use ignored tags:

Code: Select all

label start:
    """
    text1
{# ↑ This should not be translated at all}
    text2

    text3{# ← Should always be on its own line}

    """
< < insert Rick Cook quote here > >

User avatar
komehara
Regular
Posts: 36
Joined: Fri Jan 31, 2020 10:08 pm
Projects: Spirit Link
Tumblr: hsandt
Deviantart: hsandt
Github: hsandt
itch: komehara
Contact:

Re: NVL: show full page by enabling no-wait {nw} / auto-continue on every block until next `nvl clear`

#6 Post by komehara »

Thanks, this should fully work with comments, with the advantage, like my previous "multi\n\nline\n\nstring", to display at once on screen, unlike chaining paragraphs ending with "{nw}". This offers two advantages over "{nw}":

1. When setting text speed to max, the whole page of text appears at once, instead of showing paragraphs one by one, admittedly with a very short time gap between them, nevertheless a perceptible time gap (when text speed is not max, because characters appear progressively, the gap between paragraph is not much perceptible)
2. When not setting text speed to max, and player wants to skip paragraphs (either because they want to go to next page, or just to stop progressive text display which can be bothering the reader if reading more slowly and still looking at text above - for a more paper-like experience), they only need to press Space/Enter once. With "{nw}", they must press it one time for each paragraph.

If there was an option to completely remove the time gap between paragraphs (i.e. {nw} will immediately chain to the next text block) then 1. wouldn't be an issue so player could at least set text speed to max for instant page display (paper book experience). In the meantime, """disabled monologue""" or "multiline\n\nstring" seem the better options for full page display.

However, I started working on voice integration, and there it broke: it is more flexible to work with small chunks of voice, one per paragraph, than one voice file per page. For instance, Renpy has a feature that waits for voice acting to end before auto-advancing to the next paragraph (whether using Auto mode or because of {nw}). This really works well with one voice file per paragraph. With one file for the whole page, since the user must press Space to advance anyway, this will still show but only in Auto mode, and there won't be particular sync in the middle of the page.

In other words, I can use the """disabled monologue""" or "multiline\n\nstring" for full page display at once (with or without fading), but I'd need to record one voice file per page for it to work together with voice acting, and forget about per-paragraph sync.

Post Reply

Who is online

Users browsing this forum: Google [Bot]