Ren'Py A few dialogue lines while animation is running

Vollezar

Gingers are love. Gingers are life.
Game Developer
Aug 14, 2020
1,202
5,250
We are trying to figure out how to have a few dialogue lines that are displayed during an animation. I see it done in other games where during sex animation characters say different things. How is it done?
Thanks.
 
  • Like
Reactions: Fatalmasterpiece

MissFortune

I Was Once, Possibly, Maybe, Perhaps… A Harem King
Respected User
Game Developer
Aug 17, 2019
4,917
8,030
Do you mean dialogue between two (or more) characters while the animation is running? Just hiding and showing the text/dialogue box as needed is probably the easiest way. Probably not the cleanest, but it works.

So, basically:


Code:
window hide
image animation1 with dissolve (or however you insert your animations.)
window show
mc "Shut up and bender over, you stupid cow."
j "Yes master"
window hide
image andimation 2, etc.
window show (when your animations are over and characters are talking again.)
 
Last edited:
  • Like
Reactions: Vollezar

MidnightArrow

Member
Aug 22, 2021
499
429
There's a few ways to do it but AFAIK all of them require you to know ATL first. If you know ATL it'll be easy to figure out.
 
  • Like
Reactions: Vollezar

Vollezar

Gingers are love. Gingers are life.
Game Developer
Aug 14, 2020
1,202
5,250
Do you mean dialogue between two (or more) characters while the animation is running? Just hiding and showing the text/dialogue box as needed is probably the easiest way. Probably not the cleanest, but it works.

So, basically:


Code:
window hide
image animation1 with dissolve (or however you insert your animations.)
window show
mc "Shut up and bender over, you stupid cow."
j "Yes master"
winodw hide
image andimation 2, etc.
window show (when your animations are over and characters are talking again.)
Thank you.

There's a few ways to do it but AFAIK all of them require you to know ATL first. If you know ATL it'll be easy to figure out.
Don't even know what ATL is.
I am not the programmer, just asking because I was interested in how it's done. Our coder is new to these games and has never done a thing like this.
 

MidnightArrow

Member
Aug 22, 2021
499
429
Don't even know what ATL is.
I am not the programmer, just asking because I was interested in how it's done. Our coder is new to these games and has never done a thing like this.
That's what I figured. I suggest you get your coder to learn it ASAP.

 
  • Like
Reactions: Vollezar

LightmanP

Well-Known Member
Modder
Game Developer
Oct 5, 2020
1,672
15,507
We are trying to figure out how to have a few dialogue lines that are displayed during an animation. I see it done in other games where during sex animation characters say different things. How is it done?
Thanks.
MissFortune gave you an example, I'd just use something a bit simpler like:
Code:
scene animation with dissovle
pause
mc "Bla-bla"
grill "Oh, yeah, bla-bla"
 
  • Like
Reactions: Vollezar

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
It seems you've already been given the right answer a couple of times already, but I thought it might help to understand why they're the right answers.

The simple answer is that RenPy leaves the latest background image on screen until it's told to replace it.
(actually it's not JUST the background image - but let's keep this simple)...

So this is pretty normal for a RenPy script:

Python:
label start:

    scene mypicture01 with fade

    "dialogue 1"
    "dialogue 2"
    "more dialogue"

    scene mypicture02 with dissolve

    "dialogue 4"
    "*** THE END ***"

    return

The first 3 lines are shown against the background image mypicture01 and the final 2 lines are delivered while mypicture02 is being shown.

Now just imagine that mypicture01 is an animation instead of a static image... the animation (usually loops) in the background until the player advances to mypicture02. That's it... just do that and your animation continues to play, while the player is reading the text.

My preferred method is to actually show the animation for a few seconds (using a timed pause) before the first line of dialogue is overlaid on top of it.

Python:
label start:

    scene myanimation01 with fade
    pause 2.5

    "dialogue 1"
    "dialogue 2"
    "more dialogue"

    scene mypicture02 with dissolve

    "dialogue 4"
    "*** THE END ***"

    return

If the animation loops, I'd normally show it for 2 or 3 seconds before showing the first first line of dialogue. If the animation doesn't loop, I'd probably aim to show 80% to 90% of it before continuing (i.e. for a 8 second animation, I might use pause 6.5 after it). This is all very much personal preference though.

For reference, ATL is just a way of creating a specific type of animation... usually by looping through a series of static images with a tiny pause between each picture. (A lot like the old animations done by drawing a series of stickman images in the corner of a book and using your thumb to flip through the images quickly).

You don't have permission to view the spoiler content. Log in or register now.

A looping ATL animation might look like:

Python:
image ch1_mast:
    "bg_ch1_mast5.png"
    pause 0.25
    "bg_ch1_mast6.png"
    pause 0.25
    "bg_ch1_mast7.png"
    pause 0.25
    "bg_ch1_mast8.png"
    pause 0.25
    repeat

# much later...

    scene ch1_mast with dissolve
    pause 3.0

    "ooooooOOOOOO!!!!"

I'm not entirely sure the window hide and window show are needed (I could be wrong). But as I understand things... the scene command automatically does window hide and the next line of dialogue automatically does a window show. So when a scene is immediately followed by a line of dialogue without any sort of pause happening (including a transition), it happens so fast that you never see the dialogue window disappear.
 
Last edited:

MidnightArrow

Member
Aug 22, 2021
499
429
For reference, ATL is just a way of creating a specific type of animation... usually by looping through a series of static images with a tiny pause between each picture. (A lot like the old animations done by drawing a series of stickman images in the corner of a book and using your thumb to flip through the images quickly).
ATL is the way to create every kind of animation AFAIK, though most of the time it's hidden under the hood by Renpy. Another way you can do it is create text displayables and use them during a nonlooping animation like any other image.

 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
ATL is the way to create every kind of animation AFAIK [...]

I was more thinking of the "other" types of animations being things like .webm or .mp4 movie files. That is... animations created using rendering tools like Daz3D, Blender, Adobe After-Effects or even Adobe Premier - to name just a few.
 

MidnightArrow

Member
Aug 22, 2021
499
429
I was more thinking of the "other" types of animations being things like .webm or .mp4 movie files. That is... animations created using rendering tools like Daz3D, Blender, Adobe After-Effects or even Adobe Premier - to name just a few.
I see now. I'd just call those "videos" because it gets really confusing when it comes to ATL lol.