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.
One of the stories in my current project is about someone with a ridiculously long name. While later on it gets stated all at once as part of the gag, when the name first appears in its full form we've got a bit of buildup with the name displayed in segments that get attached to the displayed text with each line.
voice "full_name.ogg"
e "[segment1]"
e "[segment1][segment2]"
e "[segment1][segment2][segment3]"
e "[segment1][segment2][segment3][segment4]"
While playing it as a sound effect *could* achieve this effect, that has a couple of drawbacks:
It probably won't play well with translation
It puts voice in the SFX channel, meaning it plays with volumes
The line might end up overlapping the next actual voice segment if the user skips through the relevant lines
Is there a way to achieve this? I *could* break it up into separate files for each segment during that part if absolutely necessary, but I feel that'd really take away from the effect and energy of the performance...
I can't offer you a solution for the audio file off the top of my head, but for your text, you should really consider using extend https://www.renpy.org/doc/html/dialogue ... characters
As a bonus, you could play audio in between each section of dialogue in the same way you outlined in your opening post
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
There's a python module named Pydub (https://pypi.org/project/pydub/) that allows you to manipulate audio in a number of different ways.
I looked online to find tutorials for splitting audio and didn't find anything that obviously does what you want it to do, but I still think it could be a good place to start experimenting.
Thank you both for the ideas! The extend keyword is particularly helpful—allowed me to do a *lot* to simplify that bit of the script. Will take a look at that dub module as well!