Skip Movies (files)

Skip Movies (files) v1.0
JakeMSG

Introduction

With this plugin, you're able to skip Movie files that are currently playing. Keys for this are X or Escape, but they can (relatively) easily be modified in the plugin code for other keys, too!

Features
- Adds the functionality of skipping Movie (files) while they are playing.

How to Use
Download this plugin and paste it in the "/www/js/plugins" folder for MV (or just "js/plugins" folder for MZ), then enable it within the editor, as per usual.

Download

Terms and Credits
Use however you wish, wherever, credit me if you feel like it / give me a copy of your game if you feel generous 😀
I analyzed both plugins and instead of using the RPG_CORE API for player commands, you performed keyboard verification. This can cause a problem since many players use gamepads, either on computers or smartphones (Virtual Gamepad).

The simplest solution I found was this:

Of course, this can be applied directly using the API:

The player only presses once for it to work, but will need to press and release to repeat:
Input.isTriggered("escape")

If held down, it will repeat constantly:
Input.isPressed("escape")

It will be necessary to hold for a while to trigger the IF
Input.isLongPressed("escape")

If you move the video directly to the end, the event that triggered it will still occur normally, without needing to perform any further cleanup, since the engine itself manages this:
RMMV: Graphics._video.currentTime = Graphics._video.duration
RMMZ: Video._element.currentTime = Video._element.duration

I believe that with this you will be able to make your plugins functional for cross-platform games.

If you still prefer to create a single compatible plugin for both versions, you can use this:
Utils.RPGMAKER_NAME

RMMV return "MV" (String)
RMMZ return "MZ" (String)
I analyzed both plugins and instead of using the RPG_CORE API for player commands, you performed keyboard verification. This can cause a problem since many players use gamepads, either on computers or smartphones (Virtual Gamepad).

The simplest solution I found was this:

Of course, this can be applied directly using the API:

The player only presses once for it to work, but will need to press and release to repeat:
Input.isTriggered("escape")

If held down, it will repeat constantly:
Input.isPressed("escape")

It will be necessary to hold for a while to trigger the IF
Input.isLongPressed("escape")

If you move the video directly to the end, the event that triggered it will still occur normally, without needing to perform any further cleanup, since the engine itself manages this:
RMMV: Graphics._video.currentTime = Graphics._video.duration
RMMZ: Video._element.currentTime = Video._element.duration

I believe that with this you will be able to make your plugins functional for cross-platform games.

If you still prefer to create a single compatible plugin for both versions, you can use this:
Utils.RPGMAKER_NAME

RMMV return "MV" (String)
RMMZ return "MZ" (String)
Thanks for letting me know! 🙂

I'll be frank, I did just end up writing a whole dedicated plugin for this after wanting to make the script calls addition not be needed to be added on the editor side (I was already using a workaround to add the Skip function in the games I played), and after, as a joke, trying out Copilot in VS Code and actually seeing just how goated it was.

I did briefly consider that I should also provide for the case-scenarios of using Gamepad/Touch control, and I might come back to it and add those cases too (as a v1.1).

As for the version shift, I did end up employing it on the plugin I just finished today, but this one does have a number of different implementations between MV and MZ, so for now I think it's more intuitive to keep them separate. The plugin I wrote today ("Easier Script Calls") has a lot more overlap between versions, so it was much easier to implement the conditional for the few edge cases. Still, thanks for the intention! <3
Copilot? Did you use an AI as an assistant to create the plugin?

I apologize if I misunderstood, but if that's the case, it's something too simple for an AI to handle. Here's how I would do it:
JavaScript:
if (Utils.RPGMAKER_NAME == "MZ") {
    if (Video.isPlaying()) {
        Video._element.currentTime = Video._element.duration
    }
}else{
    if (Graphics.isVideoPlaying()) {
        Graphics._video.currentTime = Graphics._video.duration
    }
}
Copilot? Did you use an AI as an assistant to create the plugin?

I apologize if I misunderstood, but if that's the case, it's something too simple for an AI to handle. Here's how I would do it:
JavaScript:
if (Utils.RPGMAKER_NAME == "MZ") {
    if (Video.isPlaying()) {
        Video._element.currentTime = Video._element.duration
    }
}else{
    if (Graphics.isVideoPlaying()) {
        Graphics._video.currentTime = Graphics._video.duration
    }
}
Well, this was the code segment I was using before, within the editor, since I wanted to trigger it by Keypress (X in this case).

Though I didn't have the code segment for the MZ part, and after browsing through the code, it seemed to me like it might not work the same way.

In the end, I wrote it to have eventListeners for key presses during video playing, so that you can Skip it by pressing said keys. Now, I might add in the future the cases for Gamepad or Touch controls, but so far the plugin is useful for the specific need I had for it, and hopefully it helps others too, without needing to set up parallele Common Events in-editor for it.

Original thread: https://forums.rpgmakerweb.com/threads/skip-movies-files.182364/