じ☆ve冰风 发表于 2026-7-30 07:46:48

OcRam - Audio_EX plugin (for MV)

Introduction
This plugin comes with dynamic distance fading/auto panning for BGS and SE. Plugin allows multiple BGS at the same time and 2 'static' BGS channels that will play through out scenes (intended for ambient BGS such as rain/wind/storm etc...). Plugin also has BGS/BGM fading functionality.

All BGS buffers are saved on game save. And of course on game load all saved buffers will autoplay on the spot where they were when game was saved.

In addition you may force events to play BGS even if event page is not triggered. Example you might got event that activates on "Action Button", but still want to play BGS on load.

Here's what you need:

[*]This plugin
[*]Configure plugin parameters
[*]Add comments to events where you want SE/BGS with extended functionality
Spoiler: Event comment guide*Comment* <aex:type:distance+radius: pan:loop:forced>

[*]type || Text || {x, y, d, bg}
x = horizontal (ignores y axis)
y = vertical (ignores x axis)
d = dynamic (ignores nothing)
bg = background (ignores both, x and y axis)
[*]distance || In tiles || {number}
[*]radius || in tiles || {number}
[*]fade || Seconds || {number}
[*]pan || text || {pan/true, nopan/false}
[*]forced || Text || {forced/true, default/false}
[*]new || text || {new/true, link/false}

Following examples are written with default plugin parameters:

*Comment* <aex> (is same as: <aex:d:25+0:0: pan:forced>)
*Play BGS* fire (90, 100, 0)

*Comment* <aex:::::default> (is same as: <aex:d:25+0:0: pan:default>)
*Play BGS* fire2 (90, 100, 0)

*Comment* <aex:x::0> (is same as: <aex:x:25+0:0: pan:forced>)
*Play BGS* ocean (90, 100, 0)

*Comment* <aex:bg:0:3> (is same as: <aex:bg:0+0:3:nopan:forced>)
*Play BGS* rain (90, 100, 0)

Below some notes:

[*]NOTE 1: ALL sounds created via <aex*> tags will be erased if player is transfered to another map.
[*]NOTE 2: "forced" parameter will execute BGS/SE always, when scene is loaded. (even if event trigger would be "Action button" or "on touch") "default" parameter will execute BGS/SE ONLY, when event is triggered as intended.
[*]NOTE 3: AEX params will execute ONLY if they are on ACTIVE event page!

Spoiler: Plugin command guideNOTE: Plugin command parameters may NOT contain any spaces (because space is delimeter for command arguments)

Plugin command (to CLEAR buffers with this event id)
clear_aex ​
example: clear_aex 1​

You may also ommit event id then plugin will default to 'this' event​
example: clear_aex​

Plugin commands (to control dedicated bgs2, which will play also in battle):
play_bgs2 ​
Example: play_bgs2 rain 90 100 0​
stop_bgs2​

Plugin command (to control dedicated bgs3, which will play also in battle):
play_bgs3 ​
Example: play_bgs3 wind 40 80 0​
stop_bgs3​

Plugin commands to dynamic BGS:
pause_bgs ​
resume_bgs ​
fadeout_bgs ​
erase_bgs ​
(To erase all bgs use: erase_bgs *)​

fade to in sec​
Example: fade Wind to 20 in 6 sec​
Same as: fade Wind to 20 in 6​
BGM: fade *bgm* to 0 in 4 sec​

Spoiler: How to setup togglable audio on/off eventps. Do not mind those <light*> comments those are for OcRam_Lights -plugin.

First we need to tell that this is Audio_EX event (AEX). We can do it by adding *Comment* BEFORE actual *Play BGS* command. Because this event is forced it will start playing when ever this page is active (no Action button press required).

Then we need *Plugin command*clear_aex to clear this BGS before setting self switch on which will trigger event page 2 (shown after). This part will run only when player presses Action Button on this event.




This page has no BGS sound and because 1st page has FORCED AEX event it will play BGS automatically when Self Switch D is OFF.



All OcRam -plugins now available at ocram-codes.net

Please read: Terms of Use

Latest version:Download from here

All my plugins:Check 'em out!


本贴来自国际rpgmaker官方论坛作者:OcRam处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/ocram-audio_ex-plugin-for-mv.108209/
页: [1]
查看完整版本: OcRam - Audio_EX plugin (for MV)