Novel mode (nvl) multiple dialogues in one line

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
famakki1
Regular
Posts: 55
Joined: Wed Oct 12, 2016 7:40 am
Contact:

Novel mode (nvl) multiple dialogues in one line

#1 Post by famakki1 »

Hi All,

I am trying to figure out if there is a way to have multiple dialogues show in one line/forma paragraph. For example

Code: Select all


play voice "voice0001.ogg"
character "\"This is my first voice line\""

", said the character."

play voice "voice0002.ogg"
character "\"This is my second voice line\"."

Normally Ren'Py will split this dialogue into multiple lines. I was wondering if it is possible to have the dialogue appear as one paragraph like the following:

"This is my first voice line", said the character. "This is my second voice line".
Last edited by famakki1 on Thu Feb 23, 2017 2:02 am, edited 2 times in total.

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

Re: Novel mode multiple dialogues in one line

#2 Post by Ocelot »

Will this help?

Code: Select all

play voice "voice0001.ogg"
character '"This is my first voice line"'

extend ", said the character."

play voice "voice0002.ogg"
extend '"This is my second voice line".'
< < insert Rick Cook quote here > >

famakki1
Regular
Posts: 55
Joined: Wed Oct 12, 2016 7:40 am
Contact:

Re: Novel mode multiple dialogues in one line

#3 Post by famakki1 »

Hi Ocelot,

Thanks a lot. Yes this seems to work perfectly! Thanks a bunch.

famakki1
Regular
Posts: 55
Joined: Wed Oct 12, 2016 7:40 am
Contact:

Re: Novel mode (nvl) multiple dialogues in one line [SOLVED]

#4 Post by famakki1 »

Hi,

I seem to have hit another wall. A new issue has popped, if I use extend, I cannot define multiple characters in same extend string. For example:

Code: Select all


play voice "voice0001.ogg"
character1 '"This is my first voice line as character 1"'

extend '", said the character."'

play voice "voice0002.ogg"
extend character2 '"This is my second voice line as character2".'


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

Re: Novel mode (nvl) multiple dialogues in one line

#5 Post by Ocelot »

In ADV case, I would use this:

Code: Select all

play voice "voice0001.ogg"
character1 '"This is my first voice line as character 1"'

extend '", said the character."'

play voice "voice0002.ogg"
# Yes, that means manually copying all previous text
# Note the {fast} tag. It displays everything before it instanteniously
character2 '"This is my first voice line as character 1", said the character. {fast}"This is my second voice line as character2".'
However, I think, it would look strange in NVL mode. The good way to handle it would to look into source, find out how extend character works and create new character, something like extend_new_character. Or read NVL documentation and stumble upon some obscure functions which will help you there.

I might do that later, when I have more time.
< < insert Rick Cook quote here > >

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

Re: Novel mode (nvl) multiple dialogues in one line

#6 Post by Imperf3kt »

Does Newline work?

"this is my sentence\NAnd this continues on a new line\N\Nand this continues on a new line, two lines below the above line."
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

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Novel mode (nvl) multiple dialogues in one line

#7 Post by philat »

Er, why do you want to do this? In any writing convention that I am familiar with, the line

"This is my first line," said the character. "This is my second."

would read as the same character speaking both lines.

famakki1
Regular
Posts: 55
Joined: Wed Oct 12, 2016 7:40 am
Contact:

Re: Novel mode (nvl) multiple dialogues in one line

#8 Post by famakki1 »

It is not entirely necessary to have multiple characters, but each character I have has a different font color associated with them. So, the first line:

"This is my first line" will be in green color for example. ,said the character is a line for the narrator in default white. Following by the second line being green.

To complicate things, I have defined the following character to be used as a narrator in novel mode:

Code: Select all

define nn = Character(None, kind=nvl)
This is due to the fact, if I do not define narrator as a character then the game automatically goes back to AVG mode when narrator is called since default narrator is meant for AVG mode. In order to force novel mode I have to define narrator as a character as well. Therefore the issue of needing multiple characters in the same string.

Of course I need to keep multiple dialogues in the same line to make the reading more natural.

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

Re: Novel mode (nvl) multiple dialogues in one line

#9 Post by Ocelot »

Well, you cannot really do that, without essentually creating new mode, different from ADV and NVL, as those are not intended to work that way.

BTW, you can do define narrator = nvl_narrator to redefine default narrator with another builtin narrator.
< < insert Rick Cook quote here > >

famakki1
Regular
Posts: 55
Joined: Wed Oct 12, 2016 7:40 am
Contact:

Re: Novel mode (nvl) multiple dialogues in one line

#10 Post by famakki1 »

Welp. It is a pretty basic feature in many visual novels I've seen so I was hoping I could replicate it. I got this idea from G-senjou no Maou.

For the time being I'll just use the solution Ocelet suggested. Since I do not show any character names I can get away by using just one character and manually adjusting the colors for each extend (if it is possible, I am pretty sure it is possible to override the default color settings for a specific segment of text like we can do italics {i} Text {/i}, but will have to look into documentation).

Since my game is mostly AVG I'd rather not change the default :(

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Novel mode (nvl) multiple dialogues in one line

#11 Post by philat »

I would use text tags with extend in that case. https://www.renpy.org/doc/html/text.htm ... -tag-color

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot]