MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,933
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ
@Nerine Yes, of course! You can share the fix here for everyone to see. It might take while before I release an official fix since the end of my university semester is approaching.
 

Username0987

Warper
Member
Joined
Apr 22, 2021
Messages
2
Reaction score
0
First Language
Polish
Primarily Uses
RMMZ
@MushroomCake28 Could you please fix the bug that when player returns to Main Menu, the BGM is still playing?
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,933
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ
@MushroomCake28 Could you please fix the bug that when player returns to Main Menu, the BGM is still playing?
If you're referring to the Title screen, that bug should be fixed in the latest version if I recall correctly. If not I'll fix it in the next version.
 

Arpy_G

JRPGs are life
Member
Joined
Mar 13, 2021
Messages
14
Reaction score
8
First Language
English
Primarily Uses
RMMZ
I am so happy you have put the time in to add a spatial audio system to RPG Maker!!! I am new to RPG Maker, but this will be the first plugin I try to use A LOT of. Thank you for thinking of the music!
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,933
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ
I am so happy you have put the time in to add a spatial audio system to RPG Maker!!! I am new to RPG Maker, but this will be the first plugin I try to use A LOT of. Thank you for thinking of the music!
Thanks! Glad I could help! I would recommend to sometimes check this thread since I do have some bugs to iron out. I'll post updates from times to times.
 

Username0987

Warper
Member
Joined
Apr 22, 2021
Messages
2
Reaction score
0
First Language
Polish
Primarily Uses
RMMZ
@MushroomCake28 If you're referring to the Title screen, that bug should be fixed in the latest version if I recall correctly. If not I'll fix it in the next version.
The bug still occurs.
Description:
BGM assigned to any channel still plays when player returns to the Title.
Steps to reproduce
1. Open the RPG Maker MZ
2. Make event with Plugin Command: MUSH_Audio_Engine, Play BGM
3. Assign any bgm file, channel, Auto Remover = true, Interrupt = Pause
4. Test the game
5. Trigger the event
6. Return to the Title menu
7. Notice that BGM is still playing (Reproduction 5/5)
Expected Result
When player returns to the Title, the BGM fade out.
 

Featherbrain

Prehistoric Gamer
Veteran
Joined
Jan 12, 2020
Messages
147
Reaction score
331
First Language
English
Primarily Uses
RMMV
The bug still occurs.
Description:
BGM assigned to any channel still plays when player returns to the Title.
Steps to reproduce
1. Open the RPG Maker MZ
2. Make event with Plugin Command: MUSH_Audio_Engine, Play BGM
3. Assign any bgm file, channel, Auto Remover = true, Interrupt = Pause
4. Test the game
5. Trigger the event
6. Return to the Title menu
7. Notice that BGM is still playing (Reproduction 5/5)
Expected Result
When player returns to the Title, the BGM fade out.

To stop all Mush BGM/BGS when going to title screen, try adding the following code snippet to the end of the plugin. I added this for the MV conversion, I have not double checked the MZ source code to verify the commandToTitle() function works the same, but I assume this will work for MZ too:

JavaScript:
//==============================================================================================================
// * 5.05 : Scene GameEnd
//==============================================================================================================

Mush.alias.Scene_GameEnd_CommandToTitle = Scene_GameEnd.prototype.commandToTitle;
Scene_GameEnd.prototype.commandToTitle = function() {
    Mush.alias.Scene_GameEnd_CommandToTitle.call(this);
    AudioManager.stopAllMushBgm(0);
    AudioManager.stopAllMushBgs(0);
};

Is there a way to modify a volume of already running track?

Good question. There's no dedicated way, and I'm not sure calling the play Mush BGM to play the same track with the same channel will work (it might work, but it'll probably throw an error).

Someone was asking about this functionality for the MV conversion, and it does seem like a good functionality to have. I haven't really looked into this yet but apparently calling the play command again with new parameters doesn't do it. No pressure, but is this something you're looking to add in a future update? I'd rather implement/convert your solution than figure it out myself, of course!
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,933
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ
To stop all Mush BGM/BGS when going to title screen, try adding the following code snippet to the end of the plugin. I added this for the MV conversion, I have not double checked the MZ source code to verify the commandToTitle() function works the same, but I assume this will work for MZ too:

JavaScript:
//==============================================================================================================
// * 5.05 : Scene GameEnd
//==============================================================================================================

Mush.alias.Scene_GameEnd_CommandToTitle = Scene_GameEnd.prototype.commandToTitle;
Scene_GameEnd.prototype.commandToTitle = function() {
    Mush.alias.Scene_GameEnd_CommandToTitle.call(this);
    AudioManager.stopAllMushBgm(0);
    AudioManager.stopAllMushBgs(0);
};





Someone was asking about this functionality for the MV conversion, and it does seem like a good functionality to have. I haven't really looked into this yet but apparently calling the play command again with new parameters doesn't do it. No pressure, but is this something you're looking to add in a future update? I'd rather implement/convert your solution than figure it out myself, of course!
Sure, it wouldn't be that hard. My university semester ends next week so I'll probably release an update shortly after.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,933
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ
Released version 1.06
  • Made the Game End command stop all MUSH BGM and BGS.
  • Made the Return to Title event command stop all MUSH BGM and BGS.
  • Updated how the ME works (when it stops MUSH BGM and BGS).
  • Fixed the bug that triggered an alert after a battle on a map with spatial audio (by updating how the ME works).
  • Fixed a bug that made it so the game didn't update the spatial objects on load sometimes.
  • Added a developer mode parameter. When turned OFF, alerts will no longer appear in-game.
  • Added a Plugin Command that allows to change the volume of a MUSH BGM and BGS.
@Featherbrain I used your portion of the code for Scene_GameEnd. I mean, that's exactly how I would have done it. Thanks!
@Nerine @ToshaAngel The battle alert bug shouldn't occur anymore. Plus, I added the dev mode parameter, so when you turn it off it will just not notify the player of any error (some errors don't actually cause crashes and the game can continue running just fine).
@m03271996 There's now a plugin command that allows you to modify the volume of a MUSH BGM/BGS easily.
@Username0987 The bug where BGMs and BGSs continue playing after returning to the Title Screen is now fixed.
@Arpy_G If you haven't grabbed this new version I would suggest updating! The battle bug is now fixed! (it wasn't game breaking but it was annoying).
 

Nerine

Veteran
Veteran
Joined
Oct 3, 2020
Messages
101
Reaction score
58
First Language
Polish
Primarily Uses
RMMZ
I don't know if it's a bug but when you use "transfer player" event to move player across the map (Not to a different map) everything gets reset and you have to set up audio again.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,933
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ
I don't know if it's a bug but when you use "transfer player" event to move player across the map (Not to a different map) everything gets reset and you have to set up audio again.
Ahh yes, I did make using the Transfer player command reset all the BGMs/BGSs. I didn't think of the possibility to transfer to the same map lmao.
 

Nerine

Veteran
Veteran
Joined
Oct 3, 2020
Messages
101
Reaction score
58
First Language
Polish
Primarily Uses
RMMZ
A neat idea for the future:
Make so when event ID is set to 0, it uses event than runs the command as a source of the sound.
 

Nerine

Veteran
Veteran
Joined
Oct 3, 2020
Messages
101
Reaction score
58
First Language
Polish
Primarily Uses
RMMZ
@MushroomCake28 Hey, I get this error when using bgs spatial audio with moving events on iOS browsers (tested both dynamic and not, though if event isn't moving it doesn't show up)
1624111124265.png
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,933
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ
@MushroomCake28 Hey, I get this error when using bgs spatial audio with moving events on iOS browsers (tested both dynamic and not, though if event isn't moving it doesn't show up)
View attachment 192685
That's strange. Unfortunately I have no idea what that means. It seems like there was an error while trying to load the file, like it took too long or something. Does the game still run normally? Cause if it breaks the game, I have no idea how to fix it, and I don't really have an iOS system to test. Perhaps an iOS dev might have more insight then me for this problem.
 

Nerine

Veteran
Veteran
Joined
Oct 3, 2020
Messages
101
Reaction score
58
First Language
Polish
Primarily Uses
RMMZ
That's strange. Unfortunately I have no idea what that means. It seems like there was an error while trying to load the file, like it took too long or something. Does the game still run normally? Cause if it breaks the game, I have no idea how to fix it, and I don't really have an iOS system to test. Perhaps an iOS dev might have more insight then me for this problem.
If I had to guess I'd say it's because some calculation functions that you're using are not available on iOS.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,933
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ
If I had to guess I'd say it's because some calculation functions that you're using are not available on iOS.
I doubt it. All my calculations use standard math functions available on all platforms. To play the audio, I use the same API as RPg Maker does. Maybe there's memory restriction on mac, that might cause it. I really have no idea xD
 

Kono

Warper
Member
Joined
May 9, 2021
Messages
4
Reaction score
2
First Language
French
Primarily Uses
RMMZ
It's really a great plugin, easy to use, and powerful, but I have a small question. I don't know if it's the good place to ask, because it's not a bug related thing.

I have a map, with a river. I want the player to hear a spatial sound of a river flowing when it's near to it. But, the river is wide, and goes across the map, one event isn't enough to cover the whole river.

I can then use multiple event, following the river's ledge, with it's one channel each, maybe. I don't know, maybe the sounds will overlap if I do that.

I was wondering, if it was possible with this plugin, to setup a spatial sound, based on a region tag ?

If my question is not on the right topic, I'm sorry. I'm new here.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,933
Reaction score
4,845
First Language
EN, FR
Primarily Uses
RMMZ
It's really a great plugin, easy to use, and powerful, but I have a small question. I don't know if it's the good place to ask, because it's not a bug related thing.

I have a map, with a river. I want the player to hear a spatial sound of a river flowing when it's near to it. But, the river is wide, and goes across the map, one event isn't enough to cover the whole river.

I can then use multiple event, following the river's ledge, with it's one channel each, maybe. I don't know, maybe the sounds will overlap if I do that.

I was wondering, if it was possible with this plugin, to setup a spatial sound, based on a region tag ?

If my question is not on the right topic, I'm sorry. I'm new here.
I don't have a feature to set the audio based on the region id unfortunately. I thought of that, but I wanted to keep the plugin as low on the processor as possible, so I didn't want it to check for areas on a lot of different tiles. What I personally do for rivers that cover a good portion of the map, I just set an origin point event for the audio in the middle of the river at an interval of 3-4 tiles. If you don't like the slight volume variation, you can increase the strength parameter. A higher strength parameter will make it so the volume doesn't decrease much when you're close to the source, but the further away the faster it will decrease.

Here's an example:
1625517114902.png
 

Latest Threads

Latest Profile Posts

Who here knows of the hidden laws of this multiverse? Such as the law of attraction
Exploding Fruits and Rasaks Pixelfarm Assets | RPG Maker News #108

So ghosts can go through walls and stuff, and depending their type (according to fantasy media) they can or can't interact with objects to a certain degree...

So why they don't always fall through floors? Do they always float and sometimes simulate walking? If things go through them how can they hear/see? And why sometimes they have clothing? Do clothes die as well?
my birthday was yesterday...
i feel closer 2 being able 2 get a discount on the kids menu than i do being able to buy booze1627428008986.png
Getting to play your RM game on Steam Deck? How cool is that?

Forum statistics

Threads
113,704
Messages
1,076,773
Members
147,726
Latest member
Switchboy0815
Top