I'm working on a game for someone, but they are using an older version of the engine to avoid having to do a lot of recoding to bring it up to speed (looking at tens of thousands of lines of back end code, so it would take weeks to check everything in the latest version).
Anyway, in this older version of the engine, Emphasize Audio is glitched. If a voice file is playing, the music lowers, but if you open a menu or spam menus, the voice file stops playing and the music stays lowered. The engine has a bug where it doesn't detect that the voice file was interrupted by a menu and therefore, the engine doesn't de-emphasize the audio once the menu has been closed and the gameplay has resumed.
Naturally, this issue is very distracting for the testers. It's highly noticeable and we need to find an elegant solution.
Is there a simple way to just have a menu check if audio is emphasized when closing, and de-emphasize it? We already know 100% of the time, that the voice file won't be playing because opening the menu causes the engine to stop the voice file. So, we simply need a way for the engine to double check that audio isn't emphasized once that menu is closed.
I'm hoping maybe someone who works on the back end of Ren'Py may know more about this and have an elegant solution, even if it requires creating a new function to handle an internal variable/toggle.
Emphasize Audio Glitch, Need Elegant Workaround
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.
- SypherZent
- Veteran
- Posts: 368
- Joined: Fri Sep 02, 2016 3:14 am
- Completed: Multiverse Heroes, Space Hamster in Turmoil
- Location: Puerto Rico
- Contact:
- m_from_space
- Eileen-Class Veteran
- Posts: 1031
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Emphasize Audio Glitch, Need Elegant Workaround
I had to read up what you are even talking about, but I understand now, I hope...
So I would think that simply making sure that the audio channel that was "lowered" (in your case "music"), is always set to 100% when a menu is shown.
Like this for alle the game menus (and you have to do it for the main_menu as well):
So I would think that simply making sure that the audio channel that was "lowered" (in your case "music"), is always set to 100% when a menu is shown.
Like this for alle the game menus (and you have to do it for the main_menu as well):
Code: Select all
screen game_menu(...):
on "show" action Function(renpy.music.set_volume, volume=1.0, channel="music")
- m_from_space
- Eileen-Class Veteran
- Posts: 1031
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Emphasize Audio Glitch, Need Elegant Workaround
I had to read up what you are even talking about, but I understand now, I hope...SypherZent wrote: ↑Mon Dec 11, 2023 2:46 pmIs there a simple way to just have a menu check if audio is emphasized when closing, and de-emphasize it?
So I would think that simply making sure that the audio channel that was "lowered" (in your case "music"), is always set to 100% when a menu is shown (or hidden).
Like this for all the game menus (and you have to do it for the main_menu as well):
Code: Select all
screen game_menu(...):
on "show" action Function(renpy.music.set_volume, volume=1.0, channel="music")
# on "hide" may also be an option...
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot]