Text Speed

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
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Text Speed

#1 Post by akemicchi »

I have a few questions, particularly about changing the text speed.


Is there any way I would be able to set the speed of text, despite what's chosen in preferences? I don't want to take out the text speed option on preferences, though! I only want the speed to change for a few lines, and then the text speed goes back to the default. Can this be done?

Can I also make it so that the user can't abort the slow text, and the story auto-continues after a certain time? I know that ui.text and Text have these (set the cps, and making it abortable), but what about for normal say dialogues? How would I go about doing that?

One more:
Is it possible to have multiple speeds in different parts of a line? For example, this line, "Ready....... set... GO!" Would there be a way to make it so that "Ready" will be shown at a different speed than "set" and "GO!"?

... And, yes, I know that doing this might be annoying to some people. xD; I still want to know.

Also~! What's the difference between python: and python hide: ?

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Text Speed

#2 Post by monele »

One more:
Is it possible to have multiple speeds in different parts of a line? For example, this line, "Ready....... set... GO!" Would there be a way to make it so that "Ready" will be shown at a different speed than "set" and "GO!"?
I remember asking that for the Phoenix spoof and the answer at the time was "no", not possible. And this because it displays characters based on the time elapsed since the screen of dialogue appeared.
Also~! What's the difference between python: and python hide: ?
python hide will not save any variables you create/modify within it. This is useful when doing temporary computation with variables you don't really want to keep. I think it's also useful when using some external Python systems.

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: Text Speed

#3 Post by akemicchi »

Aww, really? Ah well. Thanks for letting me know, monele! <3
monele wrote:python hide will not save any variables you create/modify within it. This is useful when doing temporary computation with variables you don't really want to keep. I think it's also useful when using some external Python systems.
So that's what it does! Thanks again! I was just arbitrarily using python and python hide in my script. XD;; Heh heh..

EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: Text Speed

#4 Post by EvilDragon »

Too bad for the first question.

My other question is what does

init (some number) python

mean?
Angels of paradise, angels of sacrifice
Please let me be under your wings...

chronoluminaire
Eileen-Class Veteran
Posts: 1153
Joined: Mon Jul 07, 2003 4:57 pm
Completed: Elven Relations, Cloud Fairy, When I Rule The World
Tumblr: alextfish
Skype: alextfish
Location: Cambridge, UK
Contact:

Re: Text Speed

#5 Post by chronoluminaire »

EvilDragon wrote:Too bad for the first question.

My other question is what does

init (some number) python

mean?
An "init (number) python" block is just a combination of an "init (number)" block and a "python" block.

You already know what a "python" block does: it marks all the lines in it as being python code rather than Ren'Py code.

An "init (number)" block is run once, at the start of the game. Ren'Py accumulates all the init blocks it can find, and runs them all, in number order. So it'll run any "init -99999" blocks before any "init -5" blocks, then "init -1" blocks, then "init" blocks, then "init 1" blocks, then "init 2", and so on.

Note that a lot of Ren'Py internals use "init (number)" with (number) less than zero. Your game code should generally use "init" blocks with no number or with positive numbers. The higher the number, the later it runs.

So an "init (number) python" block is just a python block that runs with the other "init (number)" blocks.
I released 3 VNs, many moons ago: Elven Relations (IntRenAiMo 2007), When I Rule The World (NaNoRenO 2005), and Cloud Fairy (the Cute Light & Fluffy Project, 2009).
More recently I designed the board game Steam Works (published in 2015), available from a local gaming store near you!

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Text Speed

#6 Post by PyTom »

Actually, init -99 to init 99 are reserved for the user, while Ren'Py can use stuff outside that range. We use positive init numbers for some of the compatibility code.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Text Speed

#7 Post by JQuartz »

akemicchi wrote:Is there any way I would be able to set the speed of text, despite what's chosen in preferences? I don't want to take out the text speed option on preferences, though! I only want the speed to change for a few lines, and then the text speed goes back to the default. Can this be done?
I know of a way although the method is rather inefficient (as all my methods are...) but it should be okay if it's just a few lines.

Code: Select all

    e "This is shown in default speed."
    $ Jspeed=_preferences.text_cps
    $ _preferences.text_cps=1
    "Ready....... set... (This is shown slowly){w=5}{nw}"
    $ _preferences.text_cps=0
    "GO! (This is shown immediately)" 
    $ _preferences.text_cps=Jspeed
    "Back to default speed"
Can I also make it so that the user can't abort the slow text, and the story auto-continues after a certain time? I know that ui.text and Text have these (set the cps, and making it abortable), but what about for normal say dialogues? How would I go about doing that?
Auto continue, yes ({nw} text tag) but can't abort, no. Unless you want to use ui.text and then disguise it as normal say dialogues.
Is it possible to have multiple speeds in different parts of a line? For example, this line, "Ready....... set... GO!" Would there be a way to make it so that "Ready" will be shown at a different speed than "set" and "GO!"?
Use different lines for GO like all other (at least those I seen) VN with races do.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: Text Speed

#8 Post by akemicchi »

Yessssss--! Just what I wanted. Thank you so much, JQuartz. <3

EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: Text Speed

#9 Post by EvilDragon »

JQuartz wrote:Unless you want to use ui.text and then disguise it as normal say dialogues.
How to do this? Can you give an example of one line of unabortable say? This would help me (and others, as I see) a lot :D
Angels of paradise, angels of sacrifice
Please let me be under your wings...

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: Text Speed

#10 Post by akemicchi »

Hm... Well, in the Renpy Wiki, at the List of Properties, there's a text property called slow_abortable, which will make it so that slow text cannot be aborted. But... I just tried using it, and it doesn't work? XD; Erm.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Text Speed

#11 Post by JQuartz »

akemicchi wrote:Yessssss--! Just what I wanted. Thank you so much, JQuartz. <3
Oops I just realized something...If the player quits the game/returns to the main menu while the speed had been slowed down, the next time the player starts the game, the speed of the text will be slow.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]