I'm pretty new to renpy and am still pretty impressed how easy everything is done until now.
Some time ago I saw a visual novel mostly done in nvl mode, where each new dialog block appeared in white text-color and turned gray when a new line was added.
I'm not sure if this is done in code by darkening old lines or highlighting new lines...
But I can't seem to do both on my own...
Is there a built in property for such a feature ( I was searching for something like gui.idle_text_color)? Can it be done via python?
Highlight new text line in nvl mode
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.
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.
-
- Newbie
- Posts: 2
- Joined: Sun Nov 05, 2017 12:21 pm
- Contact:
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: Highlight new text line in nvl mode
What you're looking for requires editing to existing NVL screen. Here is my quick prototype:
Open "screens.rpy", search for "screen nvl_dialogue" and replace existing code with the one I posted above.
Code: Select all
screen nvl_dialogue(dialogue):
# Make a note of how many dialogue in total.
default dialogue_count = len(dialogue)
for index, d in enumerate(dialogue):
window:
id d.window_id
fixed:
yfit gui.nvl_height is None
if d.who is not None:
# If it's the recent dialogue, use normal colour.
if (index + 1) >= dialogue_count:
text d.who:
id d.who_id
text d.what:
id d.what_id
# Make name and dialogue in a different colour if
# they're past dialogues.
else:
text d.who:
id d.who_id
color "#606060"
text d.what:
id d.what_id
color "#606060"
-
- Newbie
- Posts: 2
- Joined: Sun Nov 05, 2017 12:21 pm
- Contact:
Re: Highlight new text line in nvl mode
Hey, thank for the quick help!
It's nice that renpy offers to manipulate dialogue display to this level!
As far as I understood your code, this will not affect the narrator, as his "who" is None.
So, I made a small adjustment to the code and it is working well. ^^
with a define gui.nvl_old_dialogue_color="#AAA" in gui.rpy to define the color.
It's nice that renpy offers to manipulate dialogue display to this level!
As far as I understood your code, this will not affect the narrator, as his "who" is None.
So, I made a small adjustment to the code and it is working well. ^^
Code: Select all
screen nvl_dialogue(dialogue):
default d_cnt = len(dialogue)
for index, d in enumerate(dialogue):
window:
id d.window_id
fixed:
yfit gui.nvl_height is None
if d.who is not None:
text d.who:
id d.who_id
text d.what:
id d.what_id
if (index+1) < d_cnt:
color gui.nvl_old_dialogue_color
Who is online
Users browsing this forum: Google [Bot]