Ren'Py Multiple Textlines

dakila

New Member
Mar 31, 2018
9
0
Hello,

i want to do 5 Lines of Text that will be shown to the player like:

1) Hello!

after 1 second:

1) Can you hear me? <--- This will be shown where "Hello" was before, and so on..
2) Hello! <-- This goes one Line down.

after 5 lines

1) Whaaaaaaaaa....
2) Someone there???
3) Heeeeello?!
4) Can you here me?
5) Hello! <--- This disapear after it goes one line down..

Can someone help me?

Thank you :)
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
2,989
6,993
This is for multiple characters:



To continue displaying text of the same character you have to continue by using a special character named extend:

Example from the linked page:

Python:
# Show the first line of dialogue, wait for a click, change expression, and show
# the rest.

show eileen concerned
e "Sometimes, I feel sad."
show eileen happy
extend " But I usually quickly get over it!"

# Similar, but automatically changes the expression when the first line is finished
# showing. This only makes sense when the user doesn't have text speed set all the
# way up.

show eileen concerned
e "Sometimes, I feel sad.{nw}"
show eileen happy
extend " But I usually quickly get over it!"
 
Last edited:

dakila

New Member
Mar 31, 2018
9
0
Wow, amazing! Thank you :)

One other question, is it possible to put a zero in front of 1 for a time like 01, 02, 03... 09, 10, 11, 12?
Thank you :)
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
My gut feeling is that you're trying to do something very stylized that sounds good on paper, but will annoy certain players.

Players have an expectation about how RenPy games present dialogue to them. If you mess with that, some people will be annoyed.
Or put another way, by forcing specific timing on people - you are taking away the player's ability to play at their own pace.
Maybe someone wants to read "Hello!"... go make a cup of coffee and then continue reading.

But to answer your question: It's possible to introduce specific timings and such with a combination of .
Specifically {w} (Wait) and {nw} (No Wait).
Additionally, you can move to the line below by adding a {p} (Paragraph) tag.

{w} and {p} both include a countdown timer before dialogue continues. Like {w=2} to include a "wait 2 seconds" pause. You can also set the timer to zero, for no pause.

To complicate your plan further, some people (including myself) play in what is known as "slow text mode".
This is what happens when you go into the game's preferences and move the "Text Speed" slider to the left. Instead of appearing instantly, each character is revealed one after another. How fast or how slow depends on how far you move the slider.

To give the impression of the text moving down a line at time, you must override the "slow mode" text by using the {fast} tag. Again, you're overriding the player's choices about how they want to play the game.

But here's code that might do something like you have planned...

Python:
define vc = Character("Voice")

label start:

    scene black with fade

    vc "Hello!{fast}{w=1}{nw}"
    vc "Can you hear me?{p=0}Hello!{fast}{w=1}{nw}"
    vc "Heeeeello?!{p=0}Can you hear me?{p=0}Hello!{fast}{w=1}{nw}"
    vc "Someone there???{p=0}Heeeeello?!{p=0}Can you hear me?{p=0}Hello!{fast}{w=1}{nw}"
    vc "Whaaaaaaaaa....{p=0}Someone there???{p=0}Heeeeello?!{p=0}Can you hear me?"

    "*** THE END ***"

    return

By all means, try this code and see if it does what you were aiming for. But honestly, there's nothing wrong with this either:
(and it will annoy a lot less people).

Python:
define vc = Character("Voice")

label start:

    scene black with fade

    vc "Hello!"
    vc "Can you hear me?"
    vc "Heeeeello?!"
    vc "Someone there???"
    vc "Whaaaaaaaaa...."

    "*** THE END ***"

    return

I'd suggest trying both these bits of code... Then go into preferences and move the "Text Speed" slider a long way to the left and then replay the same dialogue to see the difference. Then keep in mind that while you personally might prefer the original way, that slider is there to give other players the choice.
Then maybe go back and remove the {fast} tags to see why I felt I needed to include them to achieve what you were aiming for.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,369
15,285
My gut feeling is that you're trying to do something very stylized that sounds good on paper, but will annoy certain players.
I want to put a lot of emphasis on this.

Oh, sure, it really add a level of dynamism in the dialogs, and can shorten a dialog line, using the delay to add the depth that would have needed words.
"I do {w=0.5}not{w=0.5} want to suck your dick !" would have a better effect that "I do {b}not{/b} want to suck your dick !" or even "I do... not... want to suck your dick !". Not need to add a second dialog line to enforce her refusal.


But there's two issues.

Firstly, people don't read at the same speed, and it's even worse when most players are not native English speakers. So, a too short delay will totally kill your effect, while messing with their reading.
They'll be in the middle of the sentence when the next part will appear, what will catch their eyes. They'll try to see where the addition starts, they try to find where they quit their reading.
In the end, they'll know the end of the dialog line before they know the middle, and they'll read the start twice.

Secondly, many people are impatient. So, a too long delay will annoy them. They'll click to pass to the next dialog line, what here will be just few words more.
Half the time they'll not notice the change immediately and, thinking that there where a bug, will click again. It's at this moment that their brain will catch that there were few words added to the previous dialog line, what will make them rollback, wait... click because they've be tired to wait, but it will be right when the rest of the dialog line appear, what will again make them pass to the next dialog line without had the time to read what was added.

Whatever you'll do, you'll never find a delay that would please both of those persons. And having a dynamic delay (that the player could configure) is possible but it need a really dirty hack and I'm still not sure that it really worth it.



Side note: And now because of your example, I feel the need to listen to The Wall... Is There Anybody Out There...