"Despite warnings to remain where you were until the downgrade completed."
"You walked into a room that had not properly rendered in the midst of the transition."
"You are now in an unknown location."
nvl clear
d "Hello Mark!"
The first line appears, but when I click enter I get nothing, and then if I click enter again I still get nothing, but the third time when it gets to the adv portion it will display the "Hello Mark!" dialogue.
What I noticed is that if I separate each sentence with an nvl clear, everything works. But doing that defeats the whole purpose of nvl. I could also keep everything in one line, and that works. For instance:
"Despite warnings to remain where you were until the downgrade completed. {w}You walked into a room that had not properly rendered in the midst of the transition. {w}\n\nYou are now in an unknown location."
Using this work around I can achieve the result I want, as you can see here:
However, I really don't want to have to use \n\n every time I want to put a space between two nvl paragraphs. If I don't use that work around, then you can't see the "You are now in an unknown location." line, since it's a separate line from the previous string.
Here is the relevant portion of my gui.rpy code:
Code: Select all
## NVL-Mode ####################################################################
##
## The NVL-mode screen displays the dialogue spoken by NVL-mode characters.
## The borders of the background of the NVL-mode background window.
define gui.nvl_borders = Borders(10, 20, 0, 15) #Borders(0, 10, 0, 20)
## The maximum number of NVL-mode entries Ren'Py will display. When more entries
## than this are to be show, the oldest entry will be removed.
define gui.nvl_list_length = None #6
## The height of an NVL-mode entry. Set this to None to have the entries
## dynamically adjust height.
define gui.nvl_height = None #115
## The spacing between NVL-mode entries when gui.nvl_height is None, and between
## NVL-mode entries and an NVL-mode menu.
define gui.nvl_spacing = 15 #10
## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.nvl_name_xpos = 430
define gui.nvl_name_ypos = 0
define gui.nvl_name_width = 150
define gui.nvl_name_xalign = 1.0
## The position, width, and alignment of the dialogue text.
define gui.nvl_text_xpos = 450
define gui.nvl_text_ypos = 8
define gui.nvl_text_width = 590
define gui.nvl_text_xalign = 0.0
## The position, width, and alignment of nvl_thought text (the text said by the
## nvl_narrator character.)
define gui.nvl_thought_xpos = 240
define gui.nvl_thought_ypos = 450 #0
define gui.nvl_thought_width = 780
define gui.nvl_thought_xalign = 0.0
## The position of nvl menu_buttons.
define gui.nvl_button_xpos = 450
define gui.nvl_button_xalign = 0.0
Code: Select all
## NVL screen ##################################################################
##
## This screen is used for NVL-mode dialogue and menus.
##
## https://www.renpy.org/doc/html/screen_special.html#nvl
screen nvl(dialogue, items=None):
window:
style "nvl_window"
has vbox:
spacing gui.nvl_spacing
## Displays dialogue in either a vpgrid or the vbox.
if gui.nvl_height:
vpgrid:
cols 1
yinitial 1.0
use nvl_dialogue(dialogue)
else:
use nvl_dialogue(dialogue)
## Displays the menu, if given. The menu may be displayed incorrectly if
## config.narrator_menu is set to True, as it is above.
for i in items:
textbutton i.caption:
action i.action
style "nvl_button"
add SideImage() xalign 0.0 yalign 1.0
screen nvl_dialogue(dialogue):
for d in dialogue:
window:
id d.window_id
fixed:
yfit gui.nvl_height is None
if d.who is not None:
text d.who:
id d.who_id
text d.what:
id d.what_id
## This controls the maximum number of NVL-mode entries that can be displayed at
## once.
define config.nvl_list_length = gui.nvl_list_length
style nvl_window is default
style nvl_entry is default
style nvl_label is say_label
style nvl_dialogue is say_dialogue
style nvl_button is button
style nvl_button_text is button_text
#style nvl_window:
#xfill True
#yfill True
#background "gui/nvl.png"
#padding gui.nvl_borders.padding
style nvl_entry:
xfill True
ysize gui.nvl_height
style nvl_label:
xpos gui.nvl_name_xpos
xanchor gui.nvl_name_xalign
ypos gui.nvl_name_ypos
yanchor 0.0
xsize gui.nvl_name_width
min_width gui.nvl_name_width
text_align gui.nvl_name_xalign
style nvl_dialogue:
xpos gui.nvl_text_xpos
xanchor gui.nvl_text_xalign
ypos gui.nvl_text_ypos
xsize gui.nvl_text_width
min_width gui.nvl_text_width
text_align gui.nvl_text_xalign
layout ("subtitle" if gui.nvl_text_xalign else "tex")
style nvl_thought:
xpos gui.nvl_thought_xpos
xanchor gui.nvl_thought_xalign
ypos gui.nvl_thought_ypos
xsize gui.nvl_thought_width
min_width gui.nvl_thought_width
text_align gui.nvl_thought_xalign
layout ("subtitle" if gui.nvl_text_xalign else "tex")
style nvl_button:
properties gui.button_properties("nvl_button")
xpos gui.nvl_button_xpos
xanchor gui.nvl_button_xalign
style nvl_button_text:
properties gui.button_text_properties("nvl_button")