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.
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?
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:
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!
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!
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!
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.
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