Optimising gui.nvl for different sized text entries

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
willanik
Regular
Posts: 35
Joined: Fri Mar 24, 2017 7:44 pm
Contact:

Optimising gui.nvl for different sized text entries

#1 Post by willanik »

Hi everyone,

Newbie here, excited to be learning how to use Ren’py but a bit frustrated by a particular issue.

I am setting up a visual novel and am using nvl mode. My novel contains dialogue and also contains narrative. While the dialogue will be single sentences, I would like the narrative to be as long as several sentences at a time. I am not refreshing the nvl box after each entry and I am finding it impossible to set gui.nvl height to accommodate both large and small text entries. If I set it at a small amount, the narrative is cut off. If I set it at a large number the narrative is not cut off but the spaces between each subsequent entries of dialogue are too big.

I could refresh the nvl box after each entry but I would rather not to do this, preferring to have the narration/dialogue progressively take up the page.

I could have each sentence of my narrative as a discrete sentence, using “ ” marks to start each new sentence. But I would really prefer to avoid this too, so I can have several sentences capable of being presented and read in a single entry, as it makes the narrative flow better.

Can anyone help be with this? For example, is there a way to change gui.nvl height in the script?

Thanks in anticipation.
W

User avatar
jdlang
Newbie
Posts: 13
Joined: Wed Mar 22, 2017 2:59 pm
Contact:

Re: Optimising gui.nvl for different sized text entries

#2 Post by jdlang »

Several lines of text should easily fit in an nvl window. You could try writing an example part, see how many entries you can have before you need a clear, and then adjust config.nvl_list_length accordingly. One advantage of using list length instead of manual clears is that it scrolls text up (though you can't scroll back to things that are off screen).

willanik
Regular
Posts: 35
Joined: Fri Mar 24, 2017 7:44 pm
Contact:

Re: Optimising gui.nvl for different sized text entries

#3 Post by willanik »

jdlang wrote:Several lines of text should easily fit in an nvl window. You could try writing an example part, see how many entries you can have before you need a clear, and then adjust config.nvl_list_length accordingly. One advantage of using list length instead of manual clears is that it scrolls text up (though you can't scroll back to things that are off screen).
Thanks jd, I will play around with that. I still have an issue with gui.nvl_height. If I set it around 100 it is great for dialogue but too shallow for any extended narrative. But if I set it at 200 for the narrative I get big gaps between each part of the dialogue.

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

Re: Optimising gui.nvl for different sized text entries

#4 Post by Ocelot »

Set nvl_height to None. This will make height of nvl entry dynamic: just enough to accomodate size of text.
< < insert Rick Cook quote here > >

willanik
Regular
Posts: 35
Joined: Fri Mar 24, 2017 7:44 pm
Contact:

Re: Optimising gui.nvl for different sized text entries

#5 Post by willanik »

Ocelot wrote:Set nvl_height to None. This will make height of nvl entry dynamic: just enough to accomodate size of text.
Thanks Ocelot – I tried that, for example by setting gui.nvl_height = 0 and gui.nvl_spacing = 60. My font size is 30. And this is great for single or double line entries. But if a text entry runs beyond two lines, the next entry appears over the top of it. If I set gui.nvl_spacing at a higher level, say = 200 then the multi-line text entries are not overwritten but the gap between the one or two line text entries is unacceptably large.

Is it possible to change gui.nvl_spacing within the script.rpy to accommodate different sized blocks of text?

W

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

Re: Optimising gui.nvl for different sized text entries

#6 Post by Ocelot »

I tried that, for example by setting gui.nvl_height = 0
Not to 0. You should set it to None. None is not 0, they are different.
< < insert Rick Cook quote here > >

willanik
Regular
Posts: 35
Joined: Fri Mar 24, 2017 7:44 pm
Contact:

Re: Optimising gui.nvl for different sized text entries

#7 Post by willanik »

Ocelot wrote:
I tried that, for example by setting gui.nvl_height = 0
Not to 0. You should set it to None. None is not 0, they are different.
Brilliant :D Much better now, I did not appreciate the difference between None and 0.

Thanks Ocelot.

Post Reply

Who is online

Users browsing this forum: No registered users