Consistent Audio (CA) v1.01
Author: Michael Morris
@Blue Booth Studios
Introduction
Hailed by some as "the most useful plugin of all time," Consistent Audio (CA) is one of two planned plugins for consistent map state between map transitions, saves, and loads (the second being Consistent Weather (CW)). In est, CA automatically ensures that the BGM and BGS you last have playing on a map will always play for that map. If the BGM or BGS changes, it will become the new "last BGM/BGS" for that map. If you transition to another map, and then back to the first map, BGM/BGS will be lost without the use of parallel events. Not anymore! Likewise, loading a saved game can often result in different BGM/BGS without use of the same events. This is also no longer a problem. BGM/BGS Fadein and Fadeout? Automated for you. BGM/BGS will fade out and then in when changing maps. Fadein is also automatically called whenever a new BGM/BGS plays. Tracking any custom volumes, pitch, and pan for both BGM/BGS are also automated.
To be blunt, the value of this plugin does not lay in its ability to do something that could not be done without events, but rather, to simplify development and testing. With CA, having the BGM/BGS you expect to have playing, playing, is a much simpler task; in fact, no audio parallel events, switches, or variables are necessary!
The only commands you need to make to BGM/BGS are the play and fadeout commands. This logic can be as complicated or simple as you need. Once the BGM/BGS starts playing, everything else is taken care of for you.
Features
- Uses triage to determine what BGM/BGS to play; if CA has a BGM/BGS stored for the target map already, it will play that BGM/BGS. If no BGM/BGS is already stored, it will attempt to play the Map BGM/BGS (defined in Map Properties). If neither of the two are set, CA will play nothing. If and when an event on the target map later plays a BGM/BGS, CA will store that BGM/BGS.
- CA saves an array of all map audio settings into player save files, when the player elects to save the game. This reduces the change for inconsistencies arising from resetting the game after a BGM/BGS change takes effect, and allows for saving more than one map audio state (very important when returning to other maps). The downside to this is that it will increase the size of player save files, but given that the save data is in text format, save files are not expected to bloat to unreasonable levels.
- BGM/BGS are remembered for every single map in your project. In comparison, the "Save BGM/BGS" and "Replay BGM/BGS" commands in RMMV will only remember the current map's audio.
- BGM/BGS are remembered across save, loads, and program exits. In comparison, the "Save BGM/BGS" and "Replay BGM/BGS" commands in RMMV will not remember across any of these scenarios.
- Apart from merely playing BGM/BGS, changes to volume, pitch, pan are also stored and remembered.
- Automatically fades out BGM/BGS, and fades in new BGM/BGS during map transitions.
- Autoplay BGM/BGS (Map settings) are now also set to (automatically) fade-in when loading from a save file.
- Sets all audio fades to one universal fade-in duration of your choice.
- Compatible with projects that already use parallel events, switches, or variables to track audio state.
- Storage settings can be overwritten. Using the "ConsistentAudio IgnoreNext," "ConsistentAudio IgnoreNextBGM," and
"ConsistentAudio IgnoreNextBGS") commands will instruct CA not to store the next BGM/BGS change (IgnoreNextBGM and IgnoreNextBGS provide greater granularity over this override). After the next change is ignored, CA will resume storing changes.
- Fast. No perceptible performance drop was noted during tests.
How to Use
- Copy script into your game js/plugins directory.
- Import and configure plugin.
Requirements
This script has no external requirements.
Screenshots
N/A
Demo
See attachments.
To run the demo, create a new project in RPGMaker MV, and extract the provided
archive to the root folder of the new project. If prompted to overwrite any files, select yes.
Script
Spoiler Code:
Change Log
1.01
- Plugin finished.
Known Bugs / TODO
Suggestions, bug reports, and feature requests are welcomed!
Compatibility Issues
None known.
Credit and Thanks
- Micheal Morris
@Blue Booth Studios
Author's Notes
Free for non-commercial as long as credit is given.
Please contact me regarding commercial usage.
No extra JSON file necessary.
本贴来自国际rpgmaker官方论坛作者:bluebooth处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/consistent-audio-plugin.77448/