No voice replay buttons in history if "Voice sustain" is on?

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
Nazon
Regular
Posts: 32
Joined: Thu Sep 22, 2016 10:03 am
Contact:

No voice replay buttons in history if "Voice sustain" is on?

#1 Post by Nazon »

Renpy ver. 6.99.14.3.3347

I tried to add voice replay buttons in the history mode in my game and discovered strange thing.

If the "Voice sustain" preference is on, the replay buttons would not appear in history mode.
(apparently, because h.voice.filename is None in every voice object)

Code: Select all

screen history():

    tag menu

    ## Avoid predicting this screen, as it can be very large.
    predict False

    use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport")):

        style_prefix "history"

        for h in _history_list:

            window:

                ## This lays things out properly if history_height is None.
                has fixed:
                    yfit True

                if h.who:

                    label h.who:
                        style "history_name"

                        ## Take the color of the who text from the Character, if
                        ## set.
                        if "color" in h.who_args:
                            text_color h.who_args["color"]
                
                if h.voice.filename is None:      
                    text h.what
                else:
                    $ print "voice:" 
                    $ print h.voice.filename
                    $ print "next:"
                 
                    $ print "---"
                    textbutton h.what action Play("voice", h.voice.filename)
                
                #text h.what

        if not _history_list:
            label _("The dialogue history is empty.")
This seems related to this issue, but it was fixed before.
https://github.com/renpy/renpy/issues/1228

The test project is in the attachment.
the_question.zip
(10.35 MiB) Downloaded 25 times
How to reproduce:
1. Run "the_question" project from the launcher.
2. Click 5 times on screen.
3. Check game's console window, there should be "voice/voice2.ogg" line.
4. Open history window - no clickable replay buttons there.

Nazon
Regular
Posts: 32
Joined: Thu Sep 22, 2016 10:03 am
Contact:

Re: No voice replay buttons in history if "Voice sustain" is on?

#2 Post by Nazon »

I can also reproduce this on the latest version, Renpy 7.0.0

The problem is still the same.

Is it intended or not? There are no voice replays if "Voice sustain" is on?

Post Reply

Who is online

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