Way to make the text appear directly with a fade?

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
Nyu
Regular
Posts: 49
Joined: Mon May 31, 2010 8:01 am
Contact:

Way to make the text appear directly with a fade?

#1 Post by Nyu »

1. I wanted to create a style where the text appear directly with a fade. Even if the text speed is like = 50. I didn't find it in the tutorial. I wonder if it's possible...

2. Another small question: Is there a way to define the the content text color for a character?

Code: Select all

define e = Character('Eileen', color="#c8ffc8")
[/i]

User avatar
Nuxill
Veteran
Posts: 464
Joined: Sat Sep 25, 2010 4:50 pm
Projects: No Friend
Tumblr: nuxill
itch: nuxill
Contact:

Re: Way to make the text appear directly with a fade?

#2 Post by Nuxill »

As of right now you can't really fade the text in and out.

And I'm not 100% sure, but I think writing something like what_color="#fff" should do something to the body text.

User avatar
Arowana
Miko-Class Veteran
Posts: 531
Joined: Thu May 31, 2012 11:17 pm
Completed: a2 ~a due~
Projects: AXIOM.01, The Pirate Mermaid
Organization: Variable X, Navigame
Tumblr: navigame-media
itch: navigame
Contact:

Re: Way to make the text appear directly with a fade?

#3 Post by Arowana »

For the text fade, would the code I wrote at the end of here help?
http://lemmasoft.renai.us/forums/viewto ... =8&t=16020

I believe it should show text fading in at different text speeds, though you might have to adjust the "ease" duration in the "transform textdissolve" depending on the text speed. If you want the text fading in instantly, without being written across the screen, you'll need to use "slow_cps 0". (Let me know if that doesn't make any sense, and I can try to explain it better depending on what you're doing!)
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)

Image

Nyu
Regular
Posts: 49
Joined: Mon May 31, 2010 8:01 am
Contact:

Re: Way to make the text appear directly with a fade?

#4 Post by Nyu »

Thank you guys for the help! :)
@Arowana: I do think you make sense. But my level in coding is pretty low so I don't get much. I'm looking at the forumm post you linked me.
I just want to ask, where to find the:

Code: Select all

text what:
    id "what"

User avatar
Nuxill
Veteran
Posts: 464
Joined: Sat Sep 25, 2010 4:50 pm
Projects: No Friend
Tumblr: nuxill
itch: nuxill
Contact:

Re: Way to make the text appear directly with a fade?

#5 Post by Nuxill »

Oh wow, I didn't know you could put transitions in characters. You learn something new every day.

That part of code can be found in screens.rpy under the "say" screen. If you open up to screens.rpy and do a text search for say you should find it right away. :)

User avatar
Craftmoon
Newbie
Posts: 1
Joined: Sat Aug 18, 2012 10:28 am
Contact:

Re: Way to make the text appear directly with a fade?

#6 Post by Craftmoon »

@Arowana: I'm a newbie in renpy, and I was searching for how to make my text being written slowly across the textbox (like you said above), not just appearing from nowhere. My level in coding is very low too, so can you explain how to do it to me ?

User avatar
Arowana
Miko-Class Veteran
Posts: 531
Joined: Thu May 31, 2012 11:17 pm
Completed: a2 ~a due~
Projects: AXIOM.01, The Pirate Mermaid
Organization: Variable X, Navigame
Tumblr: navigame-media
itch: navigame
Contact:

Re: Way to make the text appear directly with a fade?

#7 Post by Arowana »

I just want to ask, where to find the:

Code: Select all

text what:
    id "what"
Yeah, Nuxill is right that it should just be in the "screens.rpy" file. It might also be written as

Code: Select all

text what id "what"
but that's the same thing.
I was searching for how to make my text being written slowly across the textbox (like you said above), not just appearing from nowhere.
Sure, if you want to change the speed text that a character's screen is written across the screen, you can change the value of "what_slow_cps" in that character's definition. "cps" stands for "characters per second," so the bigger a value you choose, the faster the text will be written. If you choose a value of 0, though, the text will appear instantly.

So if you have a character named Alice, and you want all her text to appear at a speed of 50 characters per second while fading in, you would write her character definition as:

Code: Select all

define alice = Character('Alice', show_textdissolveon = True, what_slow_cps=50) 
If you don't specify how fast you want a character's text to appear, then I believe it will be controlled by whatever text speed the player has set on their "Preference" screen.

You can also change the duration of the fade effect, like if you wanted the fading to be slower. You would just take this section from the code I linked:

Code: Select all

transform textdissolve:
    alpha 0 #start transparent
    ease 0.5 alpha 1 #go to full opacity
and change the number that comes after "ease." Right now, that number is 0.5, which means that the fade lasts 0.5 seconds. If you changed the number to 1, the fade would last 1 second, and so forth.

Note, however, that this method will fade in all of the on-screen text. If you want to have each letter or word fade in separately, I don't think it is possible at the moment. See this link:
http://lemmasoft.renai.us/forums/viewto ... =8&t=12114

Hope that helps! Let me know if you have any other questions! :)
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)

Image

Post Reply

Who is online

Users browsing this forum: Alex