Page 1 of 1

Simple question about dialogue

Posted: Mon Jul 22, 2019 10:24 am
by bdaywans
So I know I can use \n for line breaks if I wanted things like

Code: Select all

npc "This is \ntwo lines of text"
to produce:

Code: Select all

This is
two lines of text
but if I had a speech or monologue with a lot of dialogue for a character is there a shortcut I've missed or would I have to do

Code: Select all

npc "First sentence"
npc "Second sentence"
npc "Third sentence"
npc "and so on..."
or is there a way to add returns in a paragraph I've overlooked?

Re: Simple question about dialogue

Posted: Mon Jul 22, 2019 10:48 am
by srksrk 68
Well, in your second example, sentence two clears out sencence one when displayed, and thereafter sentence three clears sentence two and so on, so you only see one sentence at a time.

I do not quite know what you want to achieve. If you want to have all sentences displayed (each after a mouse click for instance), you could do something like:

Code: Select all

npc "First sentence{p}Second sentence{p}Third sentence{p}and so on..."

Re: Simple question about dialogue

Posted: Mon Jul 22, 2019 11:19 am
by Remix
\n is going to be easier than typing {p=0} each time...

For info, if you wanted one character to 'say' multiple lines, one after another (with a click between each) you could use:

Code: Select all

    npc """First paragraph (line of dialogue)

        Second line (spoken as a new dialogue due to 2 preceding line-breaks)

        Third dialogue
        with no line-breaks between the words (all condensed to one line as only 1 line-break here)

        Fourth{p=0}with a line-break

        Fifth{vspace=10}with a line-break that is 10px larger"""

Re: Simple question about dialogue

Posted: Mon Jul 22, 2019 2:31 pm
by bdaywans
srksrk 68 wrote: Mon Jul 22, 2019 10:48 am Well, in your second example, sentence two clears out sencence one when displayed, and thereafter sentence three clears sentence two and so on, so you only see one sentence at a time.

I do not quite know what you want to achieve. If you want to have all sentences displayed (each after a mouse click for instance), you could do something like:

Code: Select all

npc "First sentence{p}Second sentence{p}Third sentence{p}and so on..."
Thanks both. I think I poorly explained this though.

I quoted @srksrk 68 because of their point about each npc quote clearing the window which was my intent. As a better example, if I were to have a character making several comments in one window I will use \n but the {p} sounds like a good idea in case I want to emphasize something, or have a pause between a reaction (right now I'm doing things like

Code: Select all

npc "..."
npc "... ..."
npc "... ... ..."
where as

Code: Select all

npc  "... {p}... {p}..." 
would be a LOT easier so thanks for that.

However, what I was referring to more was if there was a LOT of dialogue from a single character that I wanted to spread out across a number of screens. If they have 4 lines of long dialogue and I only wanted 2 sentences max per screen I could do

Code: Select all

npc "Sentence one. \nSentence two"
# or
npc "Sentence One {p} Sentence two."
But if I wanted these spread out I am under the impression I'd have to do it like...

Code: Select all

npc "Sentence One \nSentence Two"
npc "Sentence Three \nSentence Four"
What I was wondering about is if I have to add the "npc" portion for ever time I want to clear the screen and add new dialogue is is there a short hand that will keep my character speaking but use a click to advance to the next screen like:

Code: Select all

npc "Sentence One {p}Sentence Two (#some sort of click to advance the screen) Sentence Three (#click again to advance the screen) Sentence Four"
@remix, is that what your use of the """ would do? Sorry, too new to know what that meant.

Based on your replies I'm guessing no but hope I explained it better this time

Re: Simple question about dialogue

Posted: Mon Jul 22, 2019 4:26 pm
by srksrk 68
Have you already found this?

https://www.renpy.org/doc/html/text.html

There are all the text tags and more explained. It is also possible to define your own tags. If you don't find what you need there, I do not know where else to look...

Re: Simple question about dialogue

Posted: Mon Jul 22, 2019 5:07 pm
by Remix
bdaywans wrote: Mon Jul 22, 2019 2:31 pm @remix, is that what your use of the """ would do? Sorry, too new to know what that meant.
Yes... inside triple quotes, if you do 2 line-breaks it effectively creates a new say

Code: Select all

    npc "Line 1"
    npc "Line 2"
Is the same as

Code: Select all

    npc """Line 1
    
    Line 2"""
    
    # or 
    
    npc """
    Line 1
    
    Line 2
    """
However, what I was referring to more was if there was a LOT of dialogue from a single character that I wanted to spread out across a number of screens.
If they have 4 lines of long dialogue and I only wanted 2 sentences max per screen I could do

Code: Select all

npc "Sentence one. \nSentence two"
# or
npc "Sentence One {p} Sentence two."
But if I wanted these spread out I am under the impression I'd have to do it like...

Code: Select all

npc "Sentence One \nSentence Two"
npc "Sentence Three \nSentence Four"
You'd maybe use

Code: Select all

    npc """Sentence One \nSentence Two
    
    Sentence Three \nSentence Four"""
    
    # or (for neatness, maybe)
    
    npc """
    Sentence One 
    \nSentence Two
    
    Sentence Three 
    \nSentence Four"""

Re: Simple question about dialogue

Posted: Mon Jul 22, 2019 11:59 pm
by bdaywans
Remix wrote: Mon Jul 22, 2019 5:07 pm
bdaywans wrote: Mon Jul 22, 2019 2:31 pm @remix, is that what your use of the """ would do? Sorry, too new to know what that meant.
Yes... inside triple quotes, if you do 2 line-breaks it effectively creates a new say

Code: Select all

    npc "Line 1"
    npc "Line 2"
Is the same as

Code: Select all

    npc """Line 1
    
    Line 2"""
    
    # or 
    
    npc """
    Line 1
    
    Line 2
    """
However, what I was referring to more was if there was a LOT of dialogue from a single character that I wanted to spread out across a number of screens.
If they have 4 lines of long dialogue and I only wanted 2 sentences max per screen I could do

Code: Select all

npc "Sentence one. \nSentence two"
# or
npc "Sentence One {p} Sentence two."
But if I wanted these spread out I am under the impression I'd have to do it like...

Code: Select all

npc "Sentence One \nSentence Two"
npc "Sentence Three \nSentence Four"
You'd maybe use

Code: Select all

    npc """Sentence One \nSentence Two
    
    Sentence Three \nSentence Four"""
    
    # or (for neatness, maybe)
    
    npc """
    Sentence One 
    \nSentence Two
    
    Sentence Three 
    \nSentence Four"""
WONDERFUL! Thanks!

I was initially hoping to us it to save lines but if it'll at least save me having to add so many quotes and keep typing npc over and over that's still a win!