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

[转载发布] Play Movie alternative with extra settings

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

    连续签到: 2 天

    [LV.7]常住居民III

    9068

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 5 天前 | 显示全部楼层 |阅读模式
    This script overrides the [Play Movie...] event command, but to access more parameters you must use the [Script...] event command.

    For this to work, the player will need to have FFMPEG or VLC installed. The script will always prioritize FFMPEG because it is faster at generating frames.

    License: The script can be used in commercial games

    DOWNLOAD: Mediafire
    (Includes SCRIPT file a DEMO with hands-on tests of all possibilities and functions)

    FFMPEG: You can include installation instructions with your game, or create an in-game installer
    VLC: You cannot send the installer with the game, but you can include the installation instructions               
    Click to expand...


    Although it works with movies in other formats, this would prevent guaranteed audio playback, so ideally you should only use OGV/OGG

    Accepted formats:
    OGG/OGV : Video+Audio
    FLV : Video
    WMV/ASF : Video
    WEBM : Video
    AVI/TS : Video
    MOV : Video only
    MP4 : Video (This does not work with VLC)



    Define the initial settings in the MoviePlayer_Config module at the beginning of the script:
                    Ruby:       
    1. module MoviePlayer_Config
    2.     # The developer can modify the initial settings here:
    3.     MODE=1
    4.     NATIVE=false
    5.     MUTE=false
    6.     VOLUME=100
    7.     SKIP=true
    8.     CLEAR=false
    9.     DELAY=360
    10.     Z=0
    11. end
    复制代码


    MODE:
    1. 1
    复制代码
    The video is stretched or compressed to fit the width and height of the game screen, even if that screen is modified.
    1. 2
    复制代码
    The video adjusts to the game's width responsively.
    1. 3
    复制代码
    The video adjusts its height responsively to the game's needs.
    1. 4
    复制代码
    The video does not play immediately; it only generates the frames for use at any time later without causing a delay when starting playback.

    Adjusted to the size of the game window:




    Mode 2: If the video width is greater than the height




    Mode 2: If the video height is greater than the width




    Mode 3: If the video width is greater than the height




    Mode 3: If the video height is greater than the width




    NATIVE:
    This configuration is only for cases where the developer needs it to work in the standard VXAce mode

    MUTE:
    This setting allows the movie to use the background music that is currently playing

    VOLUME:
    Change the default volume for all movies initiated by the event command, from 1 to 100

    SKIP:
    Disable this if you don't want the player to be able to skip the movie by pressing the cancel key (X, Esc, Insert, InsNumpad)

    CLEAR:
    This only works in game test mode, so the developer can clean up old frames if they edit the movie or used some DELAY time that affected the frame creation

    DELAY:
    Set a delay to ensure that FFMPEG or VLC can generate enough frames for playback. FFMPEG will use 25% of this time, as it is much faster. Remember that in RMVXAce, 60 frames equal 1 second, so I recommend at least 240 (4 seconds) due to older computers or slower hard drives

    WITH:
    This setting allows you to place the movie behind the last text box or event pictures on the screen:
    1. 0
    复制代码
    Above the text and pictures
    1. 1
    复制代码
    Below the text
    1. 2
    复制代码
    Below the text and pictures (Do not use Fadeout Screen in this case, as the movie will be behind the dark screen)

    To avoid having to change the most common settings before playback, I included this directly in the function that is called by the Play Movie... Event Command:
    Graphics.play_movie(File path, Mode, Volume)

    The file path is the path from the game folder; that is, not every video needs to be in the Movies folder, but you shouldn't use the file extension in this case, so as not to affect the script's priority selection. For example, if you have a video called Intro.ogg (use quotation marks and a trailing slash):
    1. 'Movies/Intro'
    复制代码

    Mode is equivalent to the modes already shown in the initial settings, use
    1. 0
    复制代码
    to automatically select the current setting, for example:
    1. Graphics.play_movie('Movies/Intro',2)
    复制代码

    Volume: This adjustment is exactly like the BGM adjustment; you regulate it by percentage. The video's sound will actually be played by the native BGM player as long as the video is OGG/OGV. So, if you have a global sound adjustment script in the menu, it will be compatible, provided it does this directly in the function. For example 50%:
    1. Graphics.play_movie('Movies/Intro',1,50)
    复制代码



    Modify the event command settings:
    (If any argument is entered outside of what the function expects, such as type or range limit, the SCRIPT will not break, it will only return the information in the Console)
    Change resolution/aspect ratio:
    1. $game_system.movie_setup('mode',1)
    复制代码
    or
    1. $game_system.movie_setup(1,1)
    复制代码

    Enable native VXA player:
    1. $game_system.movie_setup('vxa',true)
    复制代码
    or
    1. $game_system.movie_setup(2,true)
    复制代码

    Mute/Turn off the sound so that it plays the background music:
    1. $game_system.movie_setup('mute',true)
    复制代码
    or
    1. $game_system.movie_setup(3,true)
    复制代码

    Change the volume as a percentage:
    1. $game_system.movie_setup('volume',50)
    复制代码
    or
    1. $game_system.movie_setup(4,50)
    复制代码

    Enables/Disables the key to skip the video:
    1. $game_system.movie_setup('skip',true)
    复制代码
    or
    1. $game_system.movie_setup(5,true)
    复制代码

    Enables/Disables clearing frames from the temporary folder (test mode only):
    1. $game_system.movie_setup('clear',true)
    复制代码
    or
    1. $game_system.movie_setup(6,true)
    复制代码

    This includes a delay when using the FFMPEG or VLC command line; note that in FFMPEG this time will be 25% of that value.
    1. $game_system.movie_setup('delay',90)
    复制代码
    or
    1. $game_system.movie_setup(7,90)
    复制代码

    Changes the layer where the video frames will be drawn:
    1. $game_system.movie_setup('z',1)
    复制代码
    or
    1. $game_system.movie_setup(8,1)
    复制代码

    Receive the current settings in the Console:
    1. $game_system.movie_setup
    复制代码

    Restores the settings to the same ones that are in the MoviePlayer_Config module :
    1. $game_system.movie_initial
    复制代码


    本贴来自国际rpgmaker官方论坛作者:DevRPG2k处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/play-movie-alternative-with-extra-settings.183433/

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-8 07:55 , Processed in 0.138928 second(s), 59 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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