[SOLVED]Slow text issues when config.say_layer not 'screens'

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
terra0nova
Newbie
Posts: 6
Joined: Sun Oct 02, 2016 11:43 am
Completed: Too many to list...
Projects: Reality, Beyond the Stars
Github: davidmaletz
Skype: terra0nova
Contact:

[SOLVED]Slow text issues when config.say_layer not 'screens'

#1 Post by terra0nova » Tue Oct 25, 2016 8:30 pm

A few testers noticed that when you click to advance text in our Renpy game while the text is still writing, it immediately goes to the next dialogue instead of displaying all the text (which is the default functionality). After debugging, I found out the problem was because I had set config.say_layer to a custom layer. This is very easy to reproduce:

Create a new renpy project (I'm using Ren'Py 6.99.11.1749). In the script.rpy file, add this bit of python code:

Code: Select all

init python:
    config.layers.insert(1, 'window')
    config.say_layer = "window"
Then run the game with the text speed set to slow and click before the text finishes appearing. It will skip to the next dialogue instead of displaying the full text. If you comment out those three lines of code and reload, it will work as expected.

The reason I needed the dialogue box in a different layer is that I wanted to have some displayables on top of the dialogue box. However, if I put the displaybles on top of the screens layer, then it is on top of all screens (including the game menu!)

EDIT:
For those curious, changing the code to this:

Code: Select all

init python:
    config.layers.insert(2, 'window')
    config.say_layer = "window"
Works, as it puts the window layer above the transient layer. I can then have layers between window and screens.
Last edited by terra0nova on Wed Oct 26, 2016 1:27 am, edited 2 times in total.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: Slow text issues when config.say_layer is not 'screens'

#2 Post by PyTom » Wed Oct 26, 2016 12:35 am

It's an order issue. You have to have the screens above the transient layer for it to work, since if you don't, the SayBehavior gets the click and dismisses things. I'd suggest creating a new layer after screens, or otherwise putting the say layer above the transient layer.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
terra0nova
Newbie
Posts: 6
Joined: Sun Oct 02, 2016 11:43 am
Completed: Too many to list...
Projects: Reality, Beyond the Stars
Github: davidmaletz
Skype: terra0nova
Contact:

Re: [SOLVED]Slow text issues when config.say_layer not 'scre

#3 Post by terra0nova » Wed Oct 26, 2016 1:30 am

Thanks PyTom - I put the window layer on top of the transient layer and it worked!

Post Reply

Who is online

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