Ren'Py 6.99.9 Prereleased

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.
Message
Author
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: Ren'Py 6.99.9 Prereleased

#31 Post by PyTom » Fri Mar 04, 2016 2:02 am

Correct. Audio and sound share the sfx mixer, so use config.default_sfx_volume to set it.
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
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Ren'Py 6.99.9 Prereleased

#32 Post by nyaatrap » Fri Mar 04, 2016 2:35 am

Though it looks config.default_sfx_volume does nothing on menu/click sounds.

User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Re: Ren'Py 6.99.9 Prereleased

#33 Post by vollschauer » Fri Mar 04, 2016 4:50 am

Well config.default_sfx_volume works for me ....
I use this one in my options.rpy to set my default volumes

Code: Select all

    ## The default audio volumes
    config.default_music_volume = 0.5
    config.default_sfx_volume = 0.7
    config.default_voice_volume = 1.0

User avatar
akakyouryuu
Regular
Posts: 153
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: Ren'Py 6.99.9 Prereleased

#34 Post by akakyouryuu » Fri Mar 04, 2016 5:44 am

Doesn't renpy.music.get_duration work for audio including the specification of start, end, and loop points?

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Ren'Py 6.99.9 Prereleased

#35 Post by nyaatrap » Fri Mar 04, 2016 6:01 am

In the tutotial game config.default_sfx_volume is working. I guess the following code in my game prevents it's working?

Code: Select all

renpy.music.register_channel("audio", mixer="audio", loop=False, file_prefix="sound/", file_suffix=".mp3")
[edit] Yes. This was the culprit. When I use this code, config.auto_channels is nullified.

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: Ren'Py 6.99.9 Prereleased

#36 Post by PyTom » Fri Mar 04, 2016 9:53 am

akakyouryuu wrote:Doesn't renpy.music.get_duration work for audio including the specification of start, end, and loop points?
Yes, but it returns the total length of the underlying file. (Assuming that length is known - which isn't the case for all possible files.)
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
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Ren'Py 6.99.9 Prereleased

#37 Post by xela » Fri Mar 04, 2016 6:03 pm

If possible (I really hope that it is somehow), we need an option to play the movie sprite just once (or set the amount of loops for it), it's very hard to time hiding them perfectly if animation is required to play itself just once, especially in messier cases with loads of going on on the screen, every now and then an extra frame from the next loop just manages to sneak in somehow :evil:

From the dev docs:
buffer_queue
Should we buffer the first second or so of a queued file? This should be True for audio, and False for movie playback.
Is it False for movie playback by default? I get issues after a few Movie sprite loops with a mask on with the buffer_queue set to False while True always seem to be working perfectly.
Like what we're doing? Support us at:
Image

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: Ren'Py 6.99.9 Prereleased

#38 Post by PyTom » Fri Mar 04, 2016 6:11 pm

Now that we can queue movies up, buffer_queue should always be set to True.

You should be able to play a movie once-through using something like:

Code: Select all

image mymovie = Movie(channel="mymovie")

label start:
    show mymovie
    play mymovie noloop
    pause 42.0
    hide mymovie
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
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Ren'Py 6.99.9 Prereleased

#39 Post by xela » Fri Mar 04, 2016 6:27 pm

PyTom wrote:

Code: Select all

image mymovie = Movie(channel="mymovie")

label start:
    show mymovie
    play mymovie noloop
    pause 42.0
    hide mymovie
It claims that noloop is not defined. Is there a python equivalent, last Ren'Py statement in the project where I am testing this is a couple hundred python statements behind.

Or is the the same as renpy.music.play(loop=False)?



== deleted ==


You've pointed me to the right method (I couldn't figure out what's what in this new displayable, I think I understand it a bit better now):

Code: Select all

        if self._play != old_play:
            if self._play:
                renpy.audio.music.play(self._play, channel=self.channel, loop=True, synchro_start=True)

                if self.mask:
                    renpy.audio.music.play(self.mask, channel=self.mask_channel, loop=True, synchro_start=True)
It's just a matter of expanding the class a little bit.

Thanks for the new functionality, using webm instead of FilmStrips or Animation is absolutely amazing, quality and size improvements are trully astounding. I'll second the:
gas wrote:movie sprites = the future.
statement :D
Like what we're doing? Support us at:
Image

User avatar
kevinturner
Newbie
Posts: 10
Joined: Tue Mar 01, 2016 2:00 am
Projects: Human Reignition Project, Highway Blossoms
Organization: AlienWorks
Github: kevinturner
Contact:

Re: Ren'Py 6.99.9 Prereleased

#40 Post by kevinturner » Fri Mar 04, 2016 10:10 pm

Turns out the curse of the dashes is not quite over. After removing all of the dashes from the game, everything worked fine in Ren'Py 6.99.9.1156. However, attempting to launch the same project in 6.99.9.1168 causes the following error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00images.rpy", line 26, in script
    init 1900 python hide:
  File "renpy/common/00images.rpy", line 54, in <module>
    scan_images_directory()
  File "renpy/common/00images.rpy", line 52, in scan_images_directory
    renpy.image(base, fn)
Exception: Image name components may not begin with a -.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "renpy/common/00images.rpy", line 26, in script
    init 1900 python hide:
  File "/Applications/renpy-6.99.9-sdk 6.55.30 PM/renpy/ast.py", line 806, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "/Applications/renpy-6.99.9-sdk 6.55.30 PM/renpy/python.py", line 1461, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/00images.rpy", line 54, in <module>
    scan_images_directory()
  File "renpy/common/00images.rpy", line 52, in scan_images_directory
    renpy.image(base, fn)
  File "/Applications/renpy-6.99.9-sdk 6.55.30 PM/renpy/exports.py", line 341, in image
    renpy.display.image.register_image(name, d)
  File "/Applications/renpy-6.99.9-sdk 6.55.30 PM/renpy/display/image.py", line 86, in register_image
    raise Exception("Image name components may not begin with a -.")
Exception: Image name components may not begin with a -.

Darwin-15.3.0-x86_64-i386-64bit
Ren'Py 6.99.9.1168
Highway Blossoms 0.0
As far as I can tell, there are no images with dashes in them any more (or it would have broken the previous 6.99.9 build). No errors are generated, only the traceback is generated.

Commenting out lines 84-86 in image.py:

Code: Select all

    #for i in name:
    #    if i and i[0] == '-':
    #        raise Exception("Image name components may not begin with a -.")
fixes the issue/sweeps the problem under the rug as far as I can tell.

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: Ren'Py 6.99.9 Prereleased

#41 Post by PyTom » Fri Mar 04, 2016 11:01 pm

kevinturner

Can you uncomment that code, and change line 86 to:

Code: Select all

            raise Exception("Image name components may not begin with a -. (in %r)" % name)
The code seems fairly straightforward to me. Also, it's doing this in the images directory, so look in there for a file beginning with - , or that has <space>- in it.
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
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: Ren'Py 6.99.9 Prereleased

#42 Post by PyTom » Fri Mar 04, 2016 11:08 pm

Sorry, make that line:

Code: Select all

                raise Exception("Image name components may not begin with a - (in {!r}).".format(name))
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
kevinturner
Newbie
Posts: 10
Joined: Tue Mar 01, 2016 2:00 am
Projects: Human Reignition Project, Highway Blossoms
Organization: AlienWorks
Github: kevinturner
Contact:

Re: Ren'Py 6.99.9 Prereleased

#43 Post by kevinturner » Fri Mar 04, 2016 11:17 pm

That returns

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00images.rpy", line 26, in script
    init 1900 python hide:
  File "renpy/common/00images.rpy", line 54, in <module>
    scan_images_directory()
  File "renpy/common/00images.rpy", line 52, in scan_images_directory
    renpy.image(base, fn)
Exception: Image name components may not begin with a - (in (u'20', u'-', u'las', u'vegas', u'strip', u'night')).

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "renpy/common/00images.rpy", line 26, in script
    init 1900 python hide:
  File "/Applications/renpy-6.99.9-sdk 6.55.30 PM/renpy/ast.py", line 806, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "/Applications/renpy-6.99.9-sdk 6.55.30 PM/renpy/python.py", line 1461, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/00images.rpy", line 54, in <module>
    scan_images_directory()
  File "renpy/common/00images.rpy", line 52, in scan_images_directory
    renpy.image(base, fn)
  File "/Applications/renpy-6.99.9-sdk 6.55.30 PM/renpy/exports.py", line 341, in image
    renpy.display.image.register_image(name, d)
  File "/Applications/renpy-6.99.9-sdk 6.55.30 PM/renpy/display/image.py", line 86, in register_image
    raise Exception("Image name components may not begin with a - (in {!r}).".format(name))
Exception: Image name components may not begin with a - (in (u'20', u'-', u'las', u'vegas', u'strip', u'night')).

Darwin-15.3.0-x86_64-i386-64bit
Ren'Py 6.99.9.1168
Highway Blossoms 0.0
which is almost certainly referring to:

Code: Select all

image bg VegasStripNight = "images/bg/20 - Las Vegas Strip Night.jpg"
I guess it's also checking filenames for this pattern and/or trying to auto-declare images and treating that separated dash in the file name as a tag that is only a dash.

Edit: Getting rid of the dashes from the filename fixes the issue.

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: Ren'Py 6.99.9 Prereleased

#44 Post by PyTom » Fri Mar 04, 2016 11:29 pm

Actually, never mind. You can do the above if you're interested, but I've moved the appropriate checks into the parsing of the image statment, as of the next nightly build. Until then, just leave the check commented out.

EDIT: Crossed in posting.
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
kevinturner
Newbie
Posts: 10
Joined: Tue Mar 01, 2016 2:00 am
Projects: Human Reignition Project, Highway Blossoms
Organization: AlienWorks
Github: kevinturner
Contact:

Re: Ren'Py 6.99.9 Prereleased

#45 Post by kevinturner » Fri Mar 04, 2016 11:34 pm

It's OK, I haven't actually used that image yet outside of that image statement so it was a super easy fix. Plus, I need those filenames clean so I can break the next nightly with even more obscure placement of dashes :)

Post Reply

Who is online

Users browsing this forum: Google [Bot], Hojoo