Possible to Automate Text Transitions?

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
Belgerum
Regular
Posts: 110
Joined: Thu Nov 06, 2014 12:24 am
Skype: belgerum09
Soundcloud: Belgerum
itch: Belgerum
Contact:

Possible to Automate Text Transitions?

#1 Post by Belgerum »

Yo. I'm working on a VN project that uses NVL text displays that look like the following:

Code: Select all

nv "This is the first line." with Dissolve(0.4)
nv "There are also two more lines." with Dissolve(0.4)
nv "Sample Paragraph." with Dissolve(0.4)
nvl clear
with Dissolve(0.4)

nv "Here's another one." with Dissolve(0.4)
nv "It's the same haiku format." with Dissolve(0.4)
nv "What a time to live." with Dissolve(0.4)
nvl clear
with Dissolve(0.4)
I'm using the "Dissolve(0.4)" transitions so that the lines fade in instead of instantly showing up on click. As you can see, it makes the code a little bit redundant and bloated, and means I have to copy and paste the same transition onto each line.

Is there a way to automate this kind of thing, setting a default transition that lines of text are shown with? Perhaps with a config or character variable?

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

Re: Possible to Automate Text Transitions?

#2 Post by Imperf3kt »

Why not adjust the cps setting (characters per second)
I think the effect is much nicer.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Belgerum
Regular
Posts: 110
Joined: Thu Nov 06, 2014 12:24 am
Skype: belgerum09
Soundcloud: Belgerum
itch: Belgerum
Contact:

Re: Possible to Automate Text Transitions?

#3 Post by Belgerum »

I'm not looking to have characters appear one-by-one. I want the entire nvl line to appear at once with the fade effect. The current code accomplishes this, and I'm not looking for a different visual effect. What I'm asking is if there is a way to make the current method less tedious to write and program.

User avatar
Reinoka
Newbie
Posts: 9
Joined: Fri Oct 14, 2016 11:10 pm
Deviantart: reinoka
Contact:

Re: Possible to Automate Text Transitions?

#4 Post by Reinoka »

Code: Select all

init:
    $ default_transition = Dissolve(0.4)
Found here: https://www.renpy.org/wiki/renpy/doc/re ... ransitions

This will set a default transition for text lines. It will apply to all dialogue and menu statements, not just the NVL lines.

User avatar
Belgerum
Regular
Posts: 110
Joined: Thu Nov 06, 2014 12:24 am
Skype: belgerum09
Soundcloud: Belgerum
itch: Belgerum
Contact:

Re: Possible to Automate Text Transitions?

#5 Post by Belgerum »

Exactly what I needed for the nvl lines, thanks. I still wish there were a fix that also added the transition to the "nvl clear" statements, but this still helps a lot.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]