OcRam - Audio_EX plugin (for MV)

I get this bug when ever I use the standard fade bgs command (The one that is provided by rpgm).
Is there a way to fix that?
View attachment 192086
Hi,

Just tested this in my demo -project and it seemed to work as intended (no errors). What is the version of OcRam_Audio_EX? And RPG Maker MV core scripts should be v1.6.2 if any of OcRam -plugins are used.

Spoiler: Event page
Untitled.png
Just tested this in my demo -project and it seemed to work as intended (no errors). What is the version of OcRam_Audio_EX? And RPG Maker MV core scripts should be v1.6.2 if any of OcRam -plugins are used.
I'm using the latest version of both (v1.6.2 and your plugin)
I think it happens if you setup many events with the plugins command (<aex>) and then use the fade bgs at some point.
I'm using the latest version of both (v1.6.2 and your plugin)
I think it happens if you setup many events with the plugins command (<aex>) and then use the fade bgs at some point.
I've got several <aex> events there... Can you replicate this in my demo -project? It might be plugin conflict with some other plugin.
It took me a while but I figured a way to recreate a bug in your Demo project that causes the problem I mean.
First I created a new event. that looks like this:
part1.JPG

Then I set the BGM of the map to town1
When interacting with this event I get this Error:

part2.JPG

Since I have multiple fade bgm and replay bgm events in my project this keeps popping up 🙁
I think the problem is within the Save BGM/Replay BGM command, but of course I can't be 100% sure.

I hope this isn't a difficult bug and you are able to fix it 😉
It took me a while but I figured a way to recreate a bug in your Demo project that causes the problem I mean.
First I created a new event. that looks like this:
View attachment 192459
Then I set the BGM of the map to town1
When interacting with this event I get this Error:

View attachment 192460
Since I have multiple fade bgm and replay bgm events in my project this keeps popping up 🙁
I think the problem is within the Save BGM/Replay BGM command, but of course I can't be 100% sure.

I hope this isn't a difficult bug and you are able to fix it 😉
Hmm.. this is odd because I created exactly same event it worked without issues. And you said earlier that both OcRam_Audio_EX and rpg_core is up-to-date...

I even tried to run that as parallel event (triggers 1 frame per second) with out text and wait and it was working also (with a lot lag of course)...

I must say that I have no clue what is happening there... Are you using Mac or Windows?

EDIT: Now I think I know where the problem is. Every time plugin gets new plugin parameter it should be initialized via Plugin manager >> Open updated plugin >> Open new parameter >> Click "OK" >> Repeat on every new parameter. Or then simply re-install plugin (all plugin parameters will reset to their default values).
I just remembered that I forgot to mention a critical part about the bug. You have to turn the BGM volume to 0 in the ingame options before interacting with the event.

If the volume is at 10 or higher it works. But if turned off something goes wrong
I just remembered that I forgot to mention a critical part about the bug. You have to turn the BGM volume to 0 in the ingame options before interacting with the event.

If the volume is at 10 or higher it works. But if turned off something goes wrong
Thank you for the info!

Now I managed to replicate this issue and it should be fixed!
Really nice, thank you!
Now it's working like a charm 🙂
Hello OcRam i encountered a little bug.

When you create an Event with the Default play BGS XYZ it works as expected, but then, when you trigger another event that Plays the same BGS but with different Volume it has no effect.
Hello OcRam i encountered a little bug.

When you create an Event with the Default play BGS XYZ it works as expected, but then, when you trigger another event that Plays the same BGS but with different Volume it has no effect.
Thank you for the message,

It is actually designed feature that when OcRam_Audio_EX plugin is enabled it will prevent "play BGS" if current BGS is same as BGS to be played...

But since allowing same BGS to be played is "vanilla" behavior of "Play BGS" command I will allow it to update BGS parameters (vol, pan and pitch) for current BGS.

EDIT: OcRam_Audio_EX v2.11 is now online!
Really nice, thank you for the fix!
Hi OcRam! I ran into a bug with your audio plug in... I am making my own custom picture based save/load menu for my game. To do this I have been using scripts from the Master Script Call List. Specifically:

Code:
$gameSystem.onBeforeSave();
if (DataManager.saveGame(index)) {
StorageManager.cleanBackup(index);
}

and

Code:
if (DataManager.loadGame(index)) {
    $gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);
    $gamePlayer.requestMapReload();
    SceneManager.goto(Scene_Map);
}

These work great! But... unfortunately audio doesn't seem to load in, to fix this I looked around, and found this.
That works as long as I'm not using your audio plug-in.

Looking through your .js file again I do see that you override a lot of the AudioManager functions, so it makes sense the solution above wouldn't work. Is there a script call I can make that would work with your plug-in? Sorry I'm not too good with Java! :dizzy:
Hi OcRam! I ran into a bug with your audio plug in... I am making my own custom picture based save/load menu for my game. To do this I have been using scripts from the Master Script Call List. Specifically:

Code:
$gameSystem.onBeforeSave();
if (DataManager.saveGame(index)) {
StorageManager.cleanBackup(index);
}

and

Code:
if (DataManager.loadGame(index)) {
    $gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);
    $gamePlayer.requestMapReload();
    SceneManager.goto(Scene_Map);
}

These work great! But... unfortunately audio doesn't seem to load in, to fix this I looked around, and found this.
That works as long as I'm not using your audio plug-in.

Looking through your .js file again I do see that you override a lot of the AudioManager functions, so it makes sense the solution above wouldn't work. Is there a script call I can make that would work with your plug-in? Sorry I'm not too good with Java! :dizzy:
Thank you for the message,

Other thread mentioned that BGM won't start (or play on correct pos?) is one of these the problem? Please provide more info (about events and such).
Thank you for the message,

Other thread mentioned that BGM won't start (or play on correct pos?) is one of these the problem? Please provide more info (about events and such).
Yeah the BGM will not start when and seemingly only when I load a save file with the script I posted above. (Pic of it in an event below.)

Spoiler
Save Script.PNG

If I load the game's save file with the default built in save window everything works just fine. (Pic of the menu I mean below, I'm currently using Yanfly's Save Core for the window appearance, but as far as I can tell I think the methods of saving/loading the actual files are the same.)

Spoiler
Save Window.PNG

The first half of this issue doesn't seem to be entirely related to your plug in (I used a blank project for reference.) If I only did what I listed above in this post, the audio would NOT resume in a blank project, the fix to this is assigning the current BGM data to a variable, like this:

Spoiler
Save Audio to Variable.PNG

And then when loading a file via script, check that variable to properly resume what was the currently playing music at the time of saving (circled in red below):
Spoiler
Load File AND BGM.PNG

If you have any other questions I'll be happy to provide as much as I can!
Yeah the BGM will not start when and seemingly only when I load a save file with the script I posted above. (Pic of it in an event below.)


If I load the game's save file with the default built in save window everything works just fine. (Pic of the menu I mean below, I'm currently using Yanfly's Save Core for the window appearance, but as far as I can tell I think the methods of saving/loading the actual files are the same.)


The first half of this issue doesn't seem to be entirely related to your plug in (I used a blank project for reference.) If I only did what I listed above in this post, the audio would NOT resume in a blank project, the fix to this is assigning the current BGM data to a variable, like this:


And then when loading a file via script, check that variable to properly resume what was the currently playing music at the time of saving (circled in red below):

If you have any other questions I'll be happy to provide as much as I can!
One thing I noticed is that $gameSystem.onAfterLoad() is never gonna happen in this scenario. So you should call it ...well... after load 😉
One thing I noticed is that $gameSystem.onAfterLoad() is never gonna happen in this scenario. So you should call it ...well... after load 😉
Oh thanks! Like I said- I really don't know too much scripting, I didn't even know there was an $gameSystem.onAfterLoad() !! I'm surprised it isn't mentioned anywhere I have looked- but that did it! :LZSlol: Again, thanks!!
Is there something like this for vx ace?
@OcRam I get the error cannot read property 'AEX' of null when I load a game where the starting map has <aex> comments in events. Is this a known issue or does it have a known fix? I'm using Yep savecore. If it's not something known, i'll provide more details.

The error:

Screenshot-2021-07-16-at-22-57-36.png
Is there something like this for vx ace?
Thank you for the message, I don't know much about vx ace, sorry.

@OcRam I get the error cannot read property 'AEX' of null when I load a game where the starting map has <aex> comments in events. Is this a known issue or does it have a known fix? I'm using Yep savecore. If it's not something known, i'll provide more details.

The error:

Screenshot-2021-07-16-at-22-57-36.png
Thank you for the message,

Is $gameSystem.onAfterLoad() method called at all? This has been most asked question lately on my behalf.
@OcRam How can I check that? In the console log? I'll check asap but can't reach my pc today.

Original thread: https://forums.rpgmakerweb.com/threads/ocram-audio_ex-plugin-for-mv.108209/