Text speed question

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
Qualcuno
Newbie
Posts: 3
Joined: Fri Aug 03, 2018 6:10 am
Contact:

Text speed question

#1 Post by Qualcuno »

Hello everyone, I'm an ex game developer from Italy who chose Renpy to come back to make games :)
Great engine so far!

My question:
with text flow letter by letter, is there a way to slow the text flow when there is a comma, a dot, like, for example, Phoenix Wright serie do?
I think it'is more natural to read

Thank you!

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
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: Text speed question

#2 Post by Remix »

Easiest is to just do it inline...

e "Hello World! {cps=1.0}W{/cps}elcome to Ren'Py."

The W of Welcome would take 1 second to appear (1.0 characters per second)

Alternatively, you could just use

e "Hello World! {w=1.0}Welcome to Ren'Py."

The text would pause/wait at the {w} bit and continue after either a user click or 1.0 seconds had passed.

{w=[float delay]} is a bit more user friendly
Frameworks & Scriptlets:

Qualcuno
Newbie
Posts: 3
Joined: Fri Aug 03, 2018 6:10 am
Contact:

Re: Text speed question

#3 Post by Qualcuno »

Thank you, I know this tag but I can't use it for every single , or : in my texts.

In Pw games if you have a , : . Etc the text pauses a bit accordingly to the natural reading flow:
https://youtu.be/YqmrJl9G4Zo
You see at 4.30

It can be a useful feature for the feature if it isn't in the engine

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
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: Text speed question

#4 Post by Remix »

Easy to add your own...

Code: Select all

init python:

    pause_symbols = ['.', ',', ';', ':']

    def add_pauses( str_to_test ):
        
        for symbol in pause_symbols:

            str_to_test = str_to_test.replace(
                symbol, 
                "{symbol}{{w=1.0}}".format( symbol=symbol ) 
            ) 

        return str_to_test

    config.say_menu_text_filter = add_pauses

label start:

    "This. Should. Pause, at; each: symbol ... "
Frameworks & Scriptlets:

Qualcuno
Newbie
Posts: 3
Joined: Fri Aug 03, 2018 6:10 am
Contact:

Re: Text speed question

#5 Post by Qualcuno »

Perfect, thank you :)

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot], piinkpuddiin, snotwurm