[Glitch] ghost-narrator box popping-up between dialogue actions.

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
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

[Glitch] ghost-narrator box popping-up between dialogue actions.

#1 Post by ISAWHIM »

I keep having a blank "narrator say window", popping-up between some actions. It is real distracting.

The video, at the end, shows that it only shows when actually clicking-through advancement. It does not show in the rollback or rollforward.

Most might never notice it happens, because the narrator box, without text, is normally unseen. Mine, however, has a background image, so it shows clear as day.

Seems to be the "narrator" character, as if RenPy, momentarily, is trying to decide if "nothing", is being done, but drawing the window for a split second before realizing there is nothing being said.

This, even while the window is hidden. (Or possibly at the moment of hide/auto, in addition to non-dialogue actions happening on the screen.)

Below is a video of the exact issue, and the associated code.


Code: Select all

    THINK "There is nothing to do in this town if you are broke."
    
    # Something here is causing a single ghost narrator box to pop-up.
    window hide
    $groupLocA = 3
    scene loc home masterbedroom d upset
    window auto
    
    D mad "STOP!{p}What the hell do you think you are doing?"
    # ... Shortened, for example ...
    D score "And Ann!"
    
    # Something here is causing a double ghost narrator box to pop-up.
    window hide
    $DAD.cSCH[24] = "work"
    $ fSetChrLocations()
    $groupLocA = 1
    scene loc home yourbedroom
    window auto
    
    THINK "What a prick."
The only common thread between the two places, is having $SomeValue="this"... Where it happens twice, two narrator boxes show-up, for a split second each. They auto-kill themselves. They do not have to be clicked-through. But they are obviously displayed, and annoying to see between transitions.

Extra code, but this should not be an issue, because the "narrator" has no "side image", and it shouldn't be "saying" anything. It is an empty dialogue box.

Code: Select all

screen say(who, what):
    style_prefix "say"
    window:
        id "window"
        if who is not None:
            if who != "x":
                window:
                    style "namebox"
                    text who id "who"
        text what id "what"
    if not renpy.variant("small"):
        if who == "x":
            add SideImage() xalign 0.5 xpos 1470 yalign 1.0 ypos 1080
        else:
            add SideImage() xalign 0.5 xpos 120 yalign 1.0 ypos 1080

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#2 Post by ISAWHIM »

I have narrowed this down to the RenPy code/function...

Code: Select all

scene someImage ...
Which is RenPy's script for this code... which also seems to do the same thing.

Code: Select all

renpy.scene()
renpy.show("someImage")
When I comment-out everything except that, I still see the narrator ghost. Now I know why it displays two, real fast, in the last two areas of code. (That scene-change triggered renpy.scene() in one of the functions.)

The $MyValue did not impact the display, nor did the $ MyFunction(), when tested. (Except when it encountered the Python code for a scene, within that function.)

So, somewhere in RenPy's screen-display code, it is showing the "window", with a blank "None" value (narrator), and "None" for text. Even when the window is explicitly hidden.

It is out of my hands, that is a RenPy bug/glitch, not anything I can fix.

However, if anyone knows a way around it, let me know. I can't "kill the narrator", or half of RenPy dialogue will not function.

window hide doesn't work, obviously... It is totally ignoring that.
Last edited by ISAWHIM on Thu Nov 30, 2017 2:13 am, edited 1 time in total.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#3 Post by xela »

Did you try setting this to "hide"?

https://www.renpy.org/doc/html/config.h ... fig.window

Solves these flashing window things in 99% of all cases...
Like what we're doing? Support us at:
Image

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#4 Post by ISAWHIM »

xela wrote: Thu Nov 30, 2017 2:11 am Did you try setting this to "hide"?

https://www.renpy.org/doc/html/config.h ... fig.window

Solves these flashing window things in 99% of all cases...
Which one?
I don't see one for "scene", which is where the issue is.
Last edited by ISAWHIM on Thu Nov 30, 2017 2:18 am, edited 1 time in total.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#5 Post by xela »

define config.window = 'hide'

It should be highlighted in yellow.
Like what we're doing? Support us at:
Image

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#6 Post by ISAWHIM »

xela wrote: Thu Nov 30, 2017 2:16 am define config.window = 'hide'

It should be highlighted in yellow.
I think that is just for you, in a cookie... it doesn't transfer that in the link. :P

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#7 Post by ISAWHIM »

Worked perfect...

What was it before?

Perhaps that is a bug that needs attention, instead of a work-around. "scene" changes shouldn't be drawing ghost-screens. It isn't drawing it in the "window", because "window" is hidden, so it must be some kind of left-over of old code, still floating around RenPy code, somewhere. Looks like it is drawing just below the "window" layer, as it gets covered-over, in my video frame-shots. Might just be the load-order doing that.
Last edited by ISAWHIM on Thu Nov 30, 2017 2:38 am, edited 1 time in total.

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#8 Post by ISAWHIM »

ISAWHIM wrote: Thu Nov 30, 2017 2:18 am
xela wrote: Thu Nov 30, 2017 2:16 am define config.window = 'hide'

It should be highlighted in yellow.
I think that is just for you, in a cookie... it doesn't transfer that in the link. :P
Big thanks!

It did show, but it didn't navigate to the highlight, it incorrectly navigates to the bottom of the highlighted area. I had to scroll-up to see it. He didn't account for the overlay of the RenPy top-nav. Needs an anchor-offset style.
Last edited by ISAWHIM on Thu Nov 30, 2017 2:33 am, edited 1 time in total.

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#9 Post by ISAWHIM »

Funny how it doesn't work using the command "window hide", as it states.

Seems auto, which hides it before a scene, is glitched. First showing a blank narrator, then hiding the window. (Again, unless you have a texture background for the narrator, you would never see it. It would be transparent and empty.)

Solution to 90% of everyone's problem here... RenPy should have the default project set to "hide", not "auto", since "window hide" doesn't work, if "auto" is default, but "window auto" does, if the default is set to "hide". (Or fix the bug.)

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#10 Post by xela »

Really? That's weird. I usually check the links before posting to see that they're pointing to the correct content. But yeah, could be a local thing.
Funny how it doesn't work using the command "window hide", as it states.
It generally should work, you need to put it after the sayer or some weird thing like that. I can never remember, setting that configuration variable to "hide" is the only way to handle the window that is intuitive to me, so it's default for every project I am working on... I rarely have to mess with those commands. But my first impression of them was the same: They don't work. It turned out that they do work, but you have to place them correctly in your script, docs were showing HOW correctly but didn't put any emphasis on it's being weird.

That's how I remember it anyway from the last time I had to mess with these while helping someone with their project.
Like what we're doing? Support us at:
Image

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#11 Post by ISAWHIM »

I am not seeing any specific "how to use", other than how I used it in my code. It should be simply changing the state of operation...

Code: Select all

## A variable to set the transition used when the game starts does not exist.
## Instead, use a with statement after showing the initial scene.
## Window management ###########################################################
##
## This controls when the dialogue window is displayed. If "show", it is always
## displayed. If "hide", it is only displayed when dialogue is present. If
## "auto", the window is hidden before scene statements and shown again once
## dialogue is displayed.
##
## After the game has started, this can be changed with the "window show",
## "window hide", and "window auto" statements.
define config.window = "auto"
If "auto", the window is hidden before scene statements and shown again once dialogue is displayed.

That isn't happening... Well, it is... but before it hides, it shows a blank narrator. Thus, the "glitch". It is setting all values to "None", then hiding... it should be "hiding" then setting values to "None".

Narrator is a Say window with the value "None" for WHO, and None for ACTION, and usually something for WHAT, but here, it is None. Which, thus, shows a ghost narrator, saying nothing. Then it hides that. :P

Errilhl
Regular
Posts: 164
Joined: Wed Nov 08, 2017 4:32 pm
Projects: HSS
Deviantart: studioerrilhl
Github: studioerrilhl
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#12 Post by Errilhl »

Been struggling with the same issue with my game. Hopefully this fixes it (haven't tested yet)

Doesn't work for me. At all. Still seeing ghost-boxes for empty narrator, after jumping to a label, and or with renpy.pause() :(

I decided to simply fix it by adding a transparent textbox image, and calling it in the screen say():

Code: Select all

        if who is not None and what:
            background Image("gui/textbox_cutout.png", xalign=0.5, yalign=1.0)
        elif not what:
            background Image("gui/textbox_transparent.png", xalign=0.5,yalign=1.0)
        else:
            background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
Currently working on: Image

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#13 Post by ISAWHIM »

I didn't think to add a custom "hide me", when who=None and what=None...

Looks sound, in my eyes. I'll have to test that, if it crops-up again.

Errilhl
Regular
Posts: 164
Joined: Wed Nov 08, 2017 4:32 pm
Projects: HSS
Deviantart: studioerrilhl
Github: studioerrilhl
Contact:

Re: [Glitch] ghost-narrator box popping-up between dialogue actions.

#14 Post by Errilhl »

Yeah, I'm using it because I have a different textbox for narrator (without a namebox) and characters (with a namebox), so I have a textbox with a cutout for the namebox so as not to see a the textbox "border" through the namebox (semi-transparent). So I figure I could add that. I've testet the "define _preferences.show_empty_window = False", but it seems to be... slightly less reliable.
My solution works. Simple as that. The show_empy_window = False works... most of the time, but I spot minor glimpses of an empty textbox from time to time - I'm wondering if Ren'Py perhaps have a problem with quickly changing such things if you go through things too quickly, or something. The invisible textbox seems to work fine, though.
Currently working on: Image

Post Reply

Who is online

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