As currently written, this plugin only allows one BGS to play at a time. (Soundtrack Layering is the more interesting plugin for this question, as it does allow multiple BGMs to play at once.) I haven't clocked performance, but have yet to notice any visual slowdown.
I have considered tweaking the plugin to allow multiple BGS-es, though.
Okay, using the F2 command, I see no FPS drops at all when loading four SE/BGSes at once in a loop, nor for four BGM layers in Soundtrack Layering, but four isn't exactly very many, is it? I suppose a real stress test of both plugins is in order at some point.
I made a quick edit to allow multiple focused BGSes at once. (It is NOT ready for release, just a test to see how it would work.) I have sixteen focused BGSes running at once (all triggered by a single event, but in different locations), which do still work as expected with regards to volume and pan, and not a single trace of FPS slowdown.
I could add more, but really, if you have a need to run sixteen BGSes simultaneously, you might want to step back and ask yourself why.
Now, granted, I was running my gaming PC. Might want to be more cautious with mobile-targeted games.
EDIT: I raised that number to about 200 without a problem. I raised it to over 1000, and... well, okay, now it had about half the framerate as usual (I turned the volume on the events and my speakers WAY down before trying any of this!!) Again, you should never ever ever need that many.
I can't imagine that SEs are likely to cause more memory slowdown on their own. The events themselves are more likely to cause slowdown.
Well all of this sounds beautiful, and the reason for more than a couple BGS running is for ambient sounds that loop, like a torch, or that is the wrong way to look at it?
Oh, don't get me wrong. I absolutely do see the use case for "more than a couple BGS running", I just hadn't yet set up the plugin for it (still haven't written one that's gone public - I need to work out a way to STOP a BGS from running, since the built-in RPG Maker controls don't expect more than one at a time. Might use an "alias for each one" solution like the Soundtrack plugins use.)
But 16 is overkill, to say nothing of 200. Performance-wise, it worked when I tested it, but... don't.
Hi, is this possible to use this._eventId or 0 that it will automatically use This Event as it's id (great for spawned event that could use copy paste method to duplicate the event and its sound)?
I want to see if I can extend this to work for sounds played via an animation being called. That way I can have an event running in parallel playing an animation with these added sound controls. Otherwise I have to decouple the sound from the animation and play it separately. Not a big deal but a little annoying.
Hm, I hadn't considered this one for animations, though that is a valid case for it. It may be complicated - battles and the overworld are completely separate concepts, and animations can be called through both - but the voice acting plugin can do similar things to this plugin. There's also the fact that I don't know if animations can accept plugin calls. I have a lot on my plate right now, but it's something to mull over.
To anyone else reading this thread: The issue turned out to be the default parameters after all. Apparently he was somehow running a probably-obsolete JavaScript interpreter that didn't recognize them. We sorted this out off of itch.io.
Hello, I'm attempting to make use of the pro version of the plugin and it somehow doesn't work, despite running literally the example command. The only way i DID get it to work was when I got the free version. I don't really know what I can do, can you help? Not even the features of the free version function in the pro. Thank you.
Not enough information to go on, I'm afraid. Could it be two plugins conflicting with one another? If you press F12 [EDIT: meant F8] while debugging the game, do you see any errors reported? Did you remember to point your plugin list at the Pro version? And which "example command" do you mean?
I disabled all the other plugins just to be sure but it continues not to work.
I don't really have any experience with debugging so bear with me if possible... Pressing F12 when I'm in the F8 debug menu while focused on the dev tools or the game does nothing which is strange as I thought it was supposed to reset the game.
I'm not sure what you mean by pointing the plugin list at the Pro version, could you elaborate?
By Example command, I meant the one in the help file(I obviously made a lillypad event):
That at least points me in the right direction, but I don't see the error on my side. Perhaps something got corrupted in your download. Can you open the plugin in a text editor and look for the line that defines the playFocusedSound function? It'll be line 155, the one flagged in the first picture. It should look like this:
Hi, I downloaded the plugin again and no luck so far, same goes for the line in the .js file - It's precisely as you wrote it. Can't really think of anything to do to be honest. :/
Edit: small progress since i accidentally clicked the plugin in file explorer
I get the same error when I double-click on the file, but that's now how plugins are supposed to be used anyway. It sounds like your version of RPG Maker's JavaScript interpreter doesn't recognize default parameters... but why it wouldn't I can't begin to fathom, as I've never had that problem.
← Return to plugin
Comments
Log in with itch.io to leave a comment.
How's the performance hit of BGS playing? how many of them are possible?
As currently written, this plugin only allows one BGS to play at a time. (Soundtrack Layering is the more interesting plugin for this question, as it does allow multiple BGMs to play at once.) I haven't clocked performance, but have yet to notice any visual slowdown.
I have considered tweaking the plugin to allow multiple BGS-es, though.
Okay, using the F2 command, I see no FPS drops at all when loading four SE/BGSes at once in a loop, nor for four BGM layers in Soundtrack Layering, but four isn't exactly very many, is it? I suppose a real stress test of both plugins is in order at some point.
I made a quick edit to allow multiple focused BGSes at once. (It is NOT ready for release, just a test to see how it would work.) I have sixteen focused BGSes running at once (all triggered by a single event, but in different locations), which do still work as expected with regards to volume and pan, and not a single trace of FPS slowdown.
I could add more, but really, if you have a need to run sixteen BGSes simultaneously, you might want to step back and ask yourself why.
Now, granted, I was running my gaming PC. Might want to be more cautious with mobile-targeted games.
EDIT: I raised that number to about 200 without a problem. I raised it to over 1000, and... well, okay, now it had about half the framerate as usual (I turned the volume on the events and my speakers WAY down before trying any of this!!) Again, you should never ever ever need that many.
I can't imagine that SEs are likely to cause more memory slowdown on their own. The events themselves are more likely to cause slowdown.
Well all of this sounds beautiful, and the reason for more than a couple BGS running is for ambient sounds that loop, like a torch, or that is the wrong way to look at it?
Oh, don't get me wrong. I absolutely do see the use case for "more than a couple BGS running", I just hadn't yet set up the plugin for it (still haven't written one that's gone public - I need to work out a way to STOP a BGS from running, since the built-in RPG Maker controls don't expect more than one at a time. Might use an "alias for each one" solution like the Soundtrack plugins use.)
But 16 is overkill, to say nothing of 200. Performance-wise, it worked when I tested it, but... don't.
Or maybe the way your Sound effect playback works would allow that, with some cutting of the audio file.
Hi, is this possible to use this._eventId or 0 that it will automatically use This Event as it's id (great for spawned event that could use copy paste method to duplicate the event and its sound)?
If you don't provide a location, it presumes the current event IS the location, so no need for this._eventId or anything like that.
Ah I see, yeah it worked
Just ported to MZ and it's work great, thank you '-'
Will this come to MZ?
Excellent plugin work, solves my exact use case! I may extend the code a little as well.
I want to see if I can extend this to work for sounds played via an animation being called. That way I can have an event running in parallel playing an animation with these added sound controls. Otherwise I have to decouple the sound from the animation and play it separately. Not a big deal but a little annoying.
Hm, I hadn't considered this one for animations, though that is a valid case for it. It may be complicated - battles and the overworld are completely separate concepts, and animations can be called through both - but the voice acting plugin can do similar things to this plugin. There's also the fact that I don't know if animations can accept plugin calls. I have a lot on my plate right now, but it's something to mull over.
no worries, I'll see about implementing it myself.
Doubtful. I sorta I overlooked this one when I updated my plugins for MZ.
To anyone else reading this thread: The issue turned out to be the default parameters after all. Apparently he was somehow running a probably-obsolete JavaScript interpreter that didn't recognize them. We sorted this out off of itch.io.
Hello, I'm attempting to make use of the pro version of the plugin and it somehow doesn't work, despite running literally the example command. The only way i DID get it to work was when I got the free version. I don't really know what I can do, can you help? Not even the features of the free version function in the pro. Thank you.
Not enough information to go on, I'm afraid. Could it be two plugins conflicting with one another? If you press F12 [EDIT: meant F8] while debugging the game, do you see any errors reported? Did you remember to point your plugin list at the Pro version? And which "example command" do you mean?
Thank you for responding!
I disabled all the other plugins just to be sure but it continues not to work.
I don't really have any experience with debugging so bear with me if possible... Pressing F12 when I'm in the F8 debug menu while focused on the dev tools or the game does nothing which is strange as I thought it was supposed to reset the game.
I'm not sure what you mean by pointing the plugin list at the Pro version, could you elaborate?
By Example command, I meant the one in the help file(I obviously made a lillypad event):
"
Example:
PlayFocusedSE Frog event=Lillypad volume=80 fadeDistance=5 fadeRate=10
"
- as in it's not that I wrote it wrong. Please let me know if you need any more info.
This is the F8 menu, hopefully helps a bit.
https://drive.google.com/file/d/1ZrtzUrwLzK1QWQO8WYKAHDmuF-YVjx7o/view
Sending plugin list just to be sure...
https://drive.google.com/file/d/1U2aaq7erv6MdTCdFzX9SfveZ1KrrDIXs/view
Thank you again.
Sorry, I meant F8. Mixed up my commands.
That at least points me in the right direction, but I don't see the error on my side. Perhaps something got corrupted in your download. Can you open the plugin in a text editor and look for the line that defines the playFocusedSound function? It'll be line 155, the one flagged in the first picture. It should look like this:
AudioManager.playFocusedSound = function(xCoord, yCoord, args, type, eventId = -1) {
If that's not what you see, let me know what you do.
And if the plugin is corrupted, try downloading it again.
Hi, I downloaded the plugin again and no luck so far, same goes for the line in the .js file - It's precisely as you wrote it. Can't really think of anything to do to be honest. :/
Edit: small progress since i accidentally clicked the plugin in file explorer
---------------------------
Windows Script Host
---------------------------
Script: C:\Users\Adam\Documents\Games\fuckass\js\plugins\Jay_FocusedSoundEffectsPro (3).js
Line: 155
Char: 78
Error: Expected ')'
Code: 800A03EE
Source: Microsoft JScript compilation error
---------------------------
OK
---------------------------
For some reason the part after eventId is being troublesome it seems.
If i try to delete the part after EventId, it results in another error on the line 264 char 46.
I am So confused
I get the same error when I double-click on the file, but that's now how plugins are supposed to be used anyway. It sounds like your version of RPG Maker's JavaScript interpreter doesn't recognize default parameters... but why it wouldn't I can't begin to fathom, as I've never had that problem.