Focused Sound Effects for RPG Maker MV
A downloadable plugin
This plugin allows you to define specific spots on the map where sound effects originate. You can use them in events and move routes alike. You can use this for sound-based puzzles, or just perhaps some extra immersion.
In events, call a Plugin command as follows:
PlayFocusedSE nameOfSEFile parameter=X parameter=X...
While the parameters are technically all optional aside from the name of the SE file, you'll probably want to include them to get full use out of this plugin.
Location, Location, Location...
The first thing you need to do is define where the sound is coming from. You can just use the event that is calling the command as the source - that requires no parameters - but if you want a different location, you have two ways of doing it. The first:
...is to simply define the X,Y coordinates on the map. The second way:
...is to define an event that will be the source of the sound. You may refer to the event either by ID number or by name (if you use name, make sure it has no spaces in it, and be forewarned that it will pick the first event on the map with the correct name that it finds, so make sure the names are unique.)
By default, it will play at full volume no matter where you are. But that's not what you want, is it? Give it some fade parameters!
If the player is within the fadeDistance range, the sound effect will play at full volume. Fading will begin once you leave that distance. "0" would mean that it only plays at full volume when the player is literally on top of it, while "1" would let it play at full volume when standing next to it.
Put a number from 0 to 100 into fadeRate. Fade rate is a percentage representing how fast, exponentially, the sound fades away when you're outside the fadeDistance. Or, in layman's terms, the higher the number, the quicker the sound fades away. With 0, the sound won't fade, period. With 100, the sound will be completely impossible to hear outside the fadeDistance.
If you make the fadeRate, say, 10, then you'll hear the sound at 90% volume if you're one tile outside the fadeDistance, 81% volume (90% * 90%) if you're two spaces outside, and so on.
The fadeRate is 100 by default, so I recommend setting it if you're using fadeDistance.
Pan is handled by the plugin automatically by comparing the X-coordinate of the sound source's position to the position of the screen. But if you want to override that...
...it's as easy as that! Now it'll play with a pan value of 50 no matter where the event is.
Just the usual sound parameters.
The base volume for the sound effect -- specifically, what the volume will be within the fadeDistance. Default is 100.
The pitch for the sound effect, same as how it works everywhere else. Default is 100.
If you want to put focused sound effects in a movement route, you can, but you'll have to do it as a Script. Write it as follows:
this.playFocusedSE("nameOfSEFile parameter=X parameter=X...");
Make sure you have those quotation marks around the parameters! It works exactly the same otherwise.
Click download now to get access to the following files: