Extending... Character Dialog

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
User avatar
Shocking Alberto
Regular
Posts: 31
Joined: Sun Mar 29, 2020 4:58 am
Contact:

Extending... Character Dialog

#1 Post by Shocking Alberto » Thu Dec 10, 2020 10:56 pm

I'm trying out a couple ideas in order to do more with character dialog. The idea is fairly simple: Have a character appear and in the middle of the text block, their expression changes. What makes this slightly trickier is making the whole thing automatic at the point of the expression change while also having voice playback.

Here's what I've tried:

Code: Select all

show char normal
voice "char_voice_01"
char "I am saying some things "
extend " but I will smile as well!"
show char smile
In practice, this works just fine except it requires user input to get the second half of the text and expression transition. A second choice is using {nw}:

Code: Select all

show char normal
voice "char_voice_01"
char "I am saying some things{nw}"
" but I will smile as well!"
show char smile
Unfortunately, using {nw} won't automatically advance the text so long as the voice clip is playing which somewhat defeats the purpose of trying this. Another problem with this option is that since I have it set up so that a voiced line will be highlighted in history, only the first half of the line is highlighted which makes things look a bit weird.

I'm debating some workarounds, such as splitting up the voice file and sticking with using extend or maybe not even bothering with this effort but I'd appreciate any suggestions or advice from everyone. o/

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

Re: Extending... Character Dialog

#2 Post by Imperf3kt » Fri Dec 11, 2020 1:15 am

For this you'd actually want to use ATL instead of extend, I believe.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Latest Blackjack updates

User avatar
Remix
Eileen-Class Veteran
Posts: 1589
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Extending... Character Dialog

#3 Post by Remix » Sat Dec 12, 2020 6:24 am

You could try voice sustain with the {nw}... untested

Code: Select all

show char normal
voice "char_voice_01"
char "I am saying some things {nw}"

show char smile
voice sustain
extend " but I will smile as well!"
Not sure how you'd do the history bit though (tbh I thought extend would handle that itself)
Frameworks & Scriptlets:

User avatar
Shocking Alberto
Regular
Posts: 31
Joined: Sun Mar 29, 2020 4:58 am
Contact:

Re: Extending... Character Dialog

#4 Post by Shocking Alberto » Thu May 13, 2021 8:10 pm

Shoot, I don't know how I missed these responses.

Re: ATL
Hmm... Okay. Guess I'll need to see what I can use to do what I want to do. Appreciate you pointing me in a direction. '-')/

Re: voice sustain
Unfortunately, the result is the same where nothing transitions until the voice clip plays. Thanks for the suggestion though!

Post Reply

Who is online

Users browsing this forum: Google [Bot], Jackkel Dragon