设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 67|回复: 0

[转载发布] RPG Maker MZ VoiceActingControl plug-in

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9015

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58751
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68660

    灌水之王

    发表于 2026-7-23 12:23:40 | 显示全部楼层 |阅读模式
    Introduction to the plugin: VoiceActingControl.js
    Hello, 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


    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:       
    1. /*:
    2. * @target MZ
    3. * @plugindesc Character Dialogue and AI Voice (OGG file) Capitalization
    4. * @author OtterScribe
    5. *
    6. * @command PlayVoice
    7. * @text Number Game
    8. * @desc Play according to the character ID and dialogue ID. *
    9. * @arg ActorID
    10. * @type number
    11. * @text CharacterID
    12. * @desc Police ID (eg: 1)
    13. * @default 1
    14. *
    15. * @arg LineID
    16. * @type number
    17. * @text Dialogue ID
    18. * @desc The ID of the file that matches the dialogue (eg: 1)
    19. * @default 1
    20. *
    21. * @command StopVoice command
    22. * @text Quit
    23. * @desc Stops the current game.
    24. *
    25. * @help
    26. * This utility casts character dialogue and AI voice files in OGG format.
    27. *
    28. * <Usage>
    29. * 1. Save AI voices in OGG format. (Requires 44.1kHz files.)
    30. * 2. Passionately place the files in the "audio/se/" folder.
    31. * 3. The file name is entered in the format "ActorID_LineID.ogg". (eg: 1_1.ogg)
    32. * 4. Use "Plugin Complex" in the event. * - Example: PlayVoice ActorID:1 LineID:1
    33. * 5. To stop, use the "StopVoice" button.
    34. * 6. If you need to connect, you must enter it manually.
    35. * const audio = { name: "1_1", volume: 90, pitch: 100, pan: 0 };
    36. AudioManager.playSe(audio); */
    37. (() => {
    38. const PluginName = "VoiceActingControl";
    39. PluginManager.registerCommand(pluginName, "PlayVoice", args => {
    40. console.log("[VoiceActingControl] PlayVoice called");
    41. console.log("[VoiceActingControl] Part by part: ", args);
    42. const actorId = Number(args.ActorID);
    43. const lineId = Number(args.LineID);
    44. const fileName = `${actorId}_${lineId}`;
    45. if (!actorId || !lineId) {
    46. console.error("[VoiceActingControl] Error: Invalid ActorID or LineID.");
    47. return;
    48. }
    49. console.log(`[VoiceActingControl] Run game: audio/se/${fileName}.ogg`);
    50. const audio = { Name: filename, volume: 90, pitch: 100, pan: 0 };
    51. AudioManager.playSe(audio);
    52. console.log(`[VoiceActingControl] Playing: audio/se/${fileName}.ogg`);
    53. });
    54. PluginManager.registerCommand(pluginName, "StopVoice", () => {
    55. console.log("[VoiceActingControl] StopVoice user called");
    56. AudioManager.stopSe();
    57. console.log("[VoiceActingControl] Voice stopped.");
    58. });
    59. })();
    复制代码


    (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/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-4 19:31 , Processed in 0.083495 second(s), 60 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表