How to make NVL text fade/dissolve in paragraphs at a time

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
theremainder_ze
Newbie
Posts: 2
Joined: Sat Nov 21, 2020 7:51 am
Tumblr: https://www.tumblr.com/settings/
Deviantart: https://www.devianta
Contact:

How to make NVL text fade/dissolve in paragraphs at a time

#1 Post by theremainder_ze »

Hi everybody, I'm working on my first VN and am searching for a way to make NVL text appear one paragraph or page at a time. At the moment the problem is I can't use fade or dissolve on the text. It appears either instantly or one character at a time, neither of which is what I want.

I tried a workaround of using text-displayables to display whole paragraphs or pages, which allows me to use transitions on them, but it gets too complicated for long stories. Also I can't seem to use hyperlink inside of such a setup, they are simply not clickable, which is another limitation.

So I think ideally if there is a way to use dissolve on NVL text, so that a chunk of text dissolves in, waits for player to click, then dissolves out, that would be perfect.

I searched around and didn't see any discussions or solutions on this, so if you have any ideas please share. :)

Thanks!

User avatar
komehara
Regular
Posts: 36
Joined: Fri Jan 31, 2020 10:08 pm
Projects: Spirit Link
Tumblr: hsandt
Deviantart: hsandt
Github: hsandt
itch: komehara
Contact:

Re: How to make NVL text fade/dissolve in paragraphs at a time

#2 Post by komehara »

I have the same need (to imitate Inky web template's paragraph fading).

I tried `show text "..." with dissolve` but it shows the standard dialogue text box instead of adding a proper NVL paragraph.

I tried variants like `show nvl` or `show nvl_narrator` but it doesn't understand it, it will just try to show some missing image sprite named "nvl_narrator "..." ".

It seems that show ... with dissolve is expecting a full text with box to fade. We could make this work for NVL with custom placement but it would be insane to indicate all positions manually instead of stacking paragraphs one after the other.

User avatar
komehara
Regular
Posts: 36
Joined: Fri Jan 31, 2020 10:08 pm
Projects: Spirit Link
Tumblr: hsandt
Deviantart: hsandt
Github: hsandt
itch: komehara
Contact:

Re: How to make NVL text fade/dissolve in paragraphs at a time

#3 Post by komehara »

So Feniks helped me on Discord Renpy, told me to use a transform in screens:

Code: Select all

# transforms.py
	transform fade_in(duration=1.0):
		alpha 0.0
		linear duration alpha 1.0

#screens.rpy
screen nvl_dialogue(dialogue):
	...
				text d.what:
					id d.what_id
					if d.current:
						at fade_in(0.5)
It works, with some caveats:
- the animation is repeated each time on the last dialogue block (for which d.current is true), even if the last command was not to display a block (e.g. on show image). This may be avoided by setting some custom flags when doing those non-text actions to temporarily disable fading.
- the same is true when rolling back: the last text block will fade in again (which looks weird). I don't see an easy fix for it, since even if I set a flag, it would be rolled
back...

User avatar
komehara
Regular
Posts: 36
Joined: Fri Jan 31, 2020 10:08 pm
Projects: Spirit Link
Tumblr: hsandt
Deviantart: hsandt
Github: hsandt
itch: komehara
Contact:

Re: How to make NVL text fade/dissolve in paragraphs at a time

#4 Post by komehara »

I opened a new thread to tackle the specific question of checking whether the last command displayed a text block indeed: viewtopic.php?p=564614

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]