RPG Maker MZ VoiceActingControl plug-in
Introduction to the plugin: VoiceActingControl.jsHello, RPG Maker MZ users!
"VoiceActingControl.js" allows you to capture lines and files as text in RPG Maker MZ. This plugin is suitable for personal use, and provides a user-customizable user interface. It allows you to easily manage files in your game.
Main features
Number (PlayVoice): Plays a number file that matches the specified character ID and line ID.
Stop (StopVoice): Exits the current game.
Compatibility: Works well with the default audio system of RPG Maker MZ (audio/se/ folder).
How to use
Installation of the plugin
Save this code as VoiceActingControl.js in the js/plugins/ folder.
Activate it in "Plugin Management" of RPG Maker MZ
Preparing the audio file
Prepare the print file in OGG format (sampling 44.1kHz recommended). Place the file in the audio/se/ folder and enter the file name in the format "ActorID_LineID.ogg" (e.g. 1_1.ogg).
Event Settings
Use "Script" in the event editor or call it via "Plugin Division" like this:
Expand: PluginManager.callCommand("VoiceActingControl", "PlayVoice", { ActorID: "1", LineID: "1" });
Pull: Select "PlayVoice" and set the "ActorID" and "LineID" values (depending on whether GUI is supported).
Use "StopVoice" when stopping.
Terms of Use and Cautions
Notice
https://img1.daumcdn.net/thumb/R800x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FvZHvN%2FbtsMMKboIBy%2F7vRFrgUtKeT9W62EZTyRh1%2Fimg.png
RPG MAKER MZ íë¬ê·¸ì¸ ì´ì© ìë´
ìëíì¸ì, ë¸ë¡ê·¸ë¥¼ ì°¾ì주ìì¬ë¬ë¶ê» ê°ì¬ ì¸ì¬ë립ëë¤!ì´ê³³ììë ì ê° ì§ìì ìí RPG MAKER MZì© íë¬ê·¸ì¸ë¤ì ê³µì íê³ììµëë¤. ê²ì ì ìì ëìì´ ëì ìë ë¤ìí 기ë¥ì ë´ì¼ë ¤ ë¸ë ¥íì¼ë, ë§ì ê´ì¬ ë¶íë릴ê²ì. ì´ì© ë°©ë²ê° íë¬ê·¸ì¸ ê²ìê¸ìì ë¤ì´ë¡ë ë§í¬ë¥¼ íì¸í´ì£¼ì¸ì. ì¬ì© ì첨ë¶ë ì¤ëªì(ëë íì¤í¸ íì¼)를...
otterscribe.tistory.com
Free to Use: This plugin is free to use in reading and electrical projects.
No Modification or Distribution: This code is not allowed to be written, used, redistributed, or incorporated into other content. Welcome to talk to the author ( OtterScribe ) before use.
Responsibility: If you are responsible for this issue, the author is not responsible for anything (game errors, data loss, etc.). Use at your own risk.
Support: If no official support is provided, please share what you like with the RPG Maker community if you encounter any problems.
Code Source
Below is the full code of the knot.
JavaScript
Code:
/*:
* @target MZ
* @plugindesc Character Dialogue and AI Voice (OGG file) Capitalization
* @author OtterScribe
*
* @command PlayVoice
* @text Number Game
* @desc Play according to the character ID and dialogue ID. *
* @arg ActorID
* @type number
* @text CharacterID
* @desc Police ID (eg: 1)
* @default 1
*
* @arg LineID
* @type number
* @text Dialogue ID
* @desc The ID of the file that matches the dialogue (eg: 1)
* @default 1
*
* @command StopVoice command
* @text Quit
* @desc Stops the current game.
*
* @help
* This utility casts character dialogue and AI voice files in OGG format.
*
* <Usage>
* 1. Save AI voices in OGG format. (Requires 44.1kHz files.)
* 2. Passionately place the files in the "audio/se/" folder.
* 3. The file name is entered in the format "ActorID_LineID.ogg". (eg: 1_1.ogg)
* 4. Use "Plugin Complex" in the event. * - Example: PlayVoice ActorID:1 LineID:1
* 5. To stop, use the "StopVoice" button.
* 6. If you need to connect, you must enter it manually.
* const audio = { name: "1_1", volume: 90, pitch: 100, pan: 0 };
AudioManager.playSe(audio); */
(() => {
const PluginName = "VoiceActingControl";
PluginManager.registerCommand(pluginName, "PlayVoice", args => {
console.log(" PlayVoice called");
console.log(" Part by part: ", args);
const actorId = Number(args.ActorID);
const lineId = Number(args.LineID);
const fileName = `${actorId}_${lineId}`;
if (!actorId || !lineId) {
console.error(" Error: Invalid ActorID or LineID.");
return;
}
console.log(` Run game: audio/se/${fileName}.ogg`);
const audio = { Name: filename, volume: 90, pitch: 100, pan: 0 };
AudioManager.playSe(audio);
console.log(` Playing: audio/se/${fileName}.ogg`);
});
PluginManager.registerCommand(pluginName, "StopVoice", () => {
console.log(" StopVoice user called");
AudioManager.stopSe();
console.log(" Voice stopped.");
});
})();
(You can download some of the code and replace it with a link if you need)
Test Environment
RPG Maker MZ Version: 1.9.0
OS: Windows 11
Contact: Please let me know if you have any bugs or suggestions for improvements in the comments.
本贴来自国际rpgmaker官方论坛作者:Otterscribe处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/rpg-maker-mz-voiceactingcontrol-plug-in.176335/
页:
[1]