Keeping NVL screen from disappearing when using ADV

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
Treladon
Regular
Posts: 40
Joined: Sat Dec 31, 2016 3:20 pm
Projects: ToMaG, Feinted Game
Organization: Kuehler-Corrada Productions
Deviantart: Journie
Contact:

Keeping NVL screen from disappearing when using ADV

#1 Post by Treladon »

Hello,

So what I've been wanting to do is basically use NVL mode for narration and ADV mode for character dialogue (EDIT: I'd like to add that I'm trying to keep the NVL screen from disappearing when I switch back to ADV). I know this isn't normally possible, so I've tried to define a pseudo-NVL screen that displays text I append to a list. However, all that happens is that the window displays for a second, then disappears. Could someone help me?

Here is the relevant code:

Code: Select all

screen new_nvl(nar_dialogue=[]): #basically a copy of screen nvl_dialogue found in screens.rpy
    window:
        style "nvl_window"
        has vbox:
            spacing gui.nvl_spacing
            for d in nar_dialogue:
                window:
                    id d.window_id
                    fixed:
                        yfit gui.nvl_height is None
                        text d:
                            id d.narsay_id
                            
init python:
	nar_dialogue=[]
        def nar(nar_say):
            nar_dialogue.append(nar_say)
        def nar_clear():
            global nar_dialogue
            nar_dialogue[:]=[]
            return nar_dialogue
Here's an example of the code that would execute this in-game:

Code: Select all

    show screen new_nvl
    $nar("Valemira decided that she couldn't truly be in hell unless she knew it.")
    $nar("The thought struck her suddenly when one of the sisters knocked on the door to say, quite incredulously,")
    $nar("that she had received a visitor.")
    $nar_clear
    hide screen new_nvl
The only other page I could find related to this is this one, which seemed to end with no solution.
Last edited by Treladon on Fri Apr 20, 2018 3:36 pm, edited 2 times in total.
WIP: The Tasks of Messengers and Guardians - Progress Page Here!

User avatar
Morhighan
Miko-Class Veteran
Posts: 975
Joined: Sun Jun 27, 2010 12:54 pm
Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
Organization: MysteryCorgi
Tumblr: MysteryCorgi
Deviantart: MysteryCorgi
Soundcloud: MysteryCorgi
itch: MysteryCorgi
Location: USA
Contact:

Re: Using ADV and NVL concurrently?

#2 Post by Morhighan »

I very frequently used ADV for dialogue and NVL for narration. I usually do it like this...

Code: Select all

define n = Character(None, kind=nvl)
define v = Character('Valemira', color="#ffffff")


label start:

	n "Valemira decided that she couldn't truly be in hell unless she knew it."
	n "The thought struck her suddenly when one of the sisters knocked on the door to say, quite incredulously, that she had received a visitor."
	nvl clear
	
	v "Hello? Who is it?"

I'm not sure what you are doing in the first post, as it seems a bit over-complicated to me. NVL mode works pretty instantly once you assign it to a character. Just make sure to use "nvl clear" after every line that you want to have a break. I hope this helps! :)

User avatar
Treladon
Regular
Posts: 40
Joined: Sat Dec 31, 2016 3:20 pm
Projects: ToMaG, Feinted Game
Organization: Kuehler-Corrada Productions
Deviantart: Journie
Contact:

Re: Using ADV and NVL concurrently?

#3 Post by Treladon »

Morhighan wrote: Tue Apr 10, 2018 8:58 pm I very frequently used ADV for dialogue and NVL for narration. I usually do it like this...

Code: Select all

define n = Character(None, kind=nvl)
define v = Character('Valemira', color="#ffffff")


label start:

	n "Valemira decided that she couldn't truly be in hell unless she knew it."
	n "The thought struck her suddenly when one of the sisters knocked on the door to say, quite incredulously, that she had received a visitor."
	nvl clear
	
	v "Hello? Who is it?"

I'm not sure what you are doing in the first post, as it seems a bit over-complicated to me. NVL mode works pretty instantly once you assign it to a character. Just make sure to use "nvl clear" after every line that you want to have a break. I hope this helps! :)
Thanks for the reply! I guess I should have made myself a little clearer. I'm trying to keep the NVL screen from disappearing every time I switch back to ADV. Does that seem feasible to you?
WIP: The Tasks of Messengers and Guardians - Progress Page Here!

User avatar
Treladon
Regular
Posts: 40
Joined: Sat Dec 31, 2016 3:20 pm
Projects: ToMaG, Feinted Game
Organization: Kuehler-Corrada Productions
Deviantart: Journie
Contact:

Re: Keeping NVL screen from disappearing when using ADV

#4 Post by Treladon »

Is this really more trouble than it's worth? I'm really stuck over here.
WIP: The Tasks of Messengers and Guardians - Progress Page Here!

User avatar
Qlara
Regular
Posts: 80
Joined: Fri Nov 28, 2014 10:22 am
Completed: Carmilla
Skype: kantonija
itch: visualgothic
Location: Berlin
Contact:

Re: Keeping NVL screen from disappearing when using ADV

#5 Post by Qlara »

This is just an idea (but it's a quick and easy test); perhaps you could create a character and customize that character's window to look like your desired nvl screen. Since you want to show things simultaneously, you probably want that window in the upper half somewhere.

Code: Select all

define v = Character ('Ada', color="#c4dfff", what_color="#c4dfff", what_xpos=220)
define h = Character (None, what_size=25, what_ypos=-100) # this window should now be above the other one
v "Valemira decided that she couldn't truly be in hell unless she knew it." (multiple=2)
mh "This should be above the other text now" (multiple=2)
I just dropped that code into the Ren'Py Demo and got both windows together, but haven't tested beyond that. Maybe you could try playing with that.
https://www.renpy.org/doc/html/multiple.html

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]