[Solved] NVL: making line breaks the same size as gui.nvl_spacing

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
Salaline
Newbie
Posts: 4
Joined: Tue Feb 09, 2021 3:10 am
Projects: The Isekai Club
itch: salaline
Contact:

[Solved] NVL: making line breaks the same size as gui.nvl_spacing

#1 Post by Salaline »

Hi,
I'm trying to display a paragraph of text in NVL mode (a say statement) and then, on clicking, add several more paragraphs below the first one (all bundled in a 2nd say statement so that they appear simultaneously). The problem is that the spacing between the 1st say statement and 2nd is the value of gui.nvl_spacing but to space the paragraphs within the 2nd say statement the only solution I've found is to put in \n\n in the string, which results in a different break size.

Is there a better way to break up the paragraphs in the second say statement while making them appear simultaneously, or a way to adjust the spacing of \n? Not sure how to proceed, and I'd greatly appreciate it if anybody knows what a solution could be.

Edit: Solved! Should have looked at the documentation more. If you put {vspace=x} within a say statement, x being a number indicating the height of the break (same as gui.nvl_spacing), you can create and manually adjust paragraph breaks without making new say statements as is the case with triple quoted strings. More info can be found at https://www.renpy.org/doc/html/text.htm ... ght=vspace.
Last edited by Salaline on Fri Oct 22, 2021 10:55 am, edited 5 times in total.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: NVL: making line breaks the same size as gui.nvl_spacing

#2 Post by Imperf3kt »

You could use triple quoted strings. Those will appear formatted exactly how you type them.

For example,
_("""like this

Will leave a space equal to line height.
""")
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Salaline
Newbie
Posts: 4
Joined: Tue Feb 09, 2021 3:10 am
Projects: The Isekai Club
itch: salaline
Contact:

Re: NVL: making line breaks the same size as gui.nvl_spacing

#3 Post by Salaline »

Imperf3kt wrote: Tue Oct 19, 2021 4:12 pm You could use triple quoted strings. Those will appear formatted exactly how you type them.

For example,
_("""like this

Will leave a space equal to line height.
""")
Thank you, but it seems that monologue mode breaks each line-seperated text chunk into it's own say statement so the paragraphs don't appear at the same time.

Post Reply

Who is online

Users browsing this forum: No registered users