KC_SkipEvent - Skip Cutscenes by Interrupting Events

KC_SkipEvent 1.0.1
by Kelly Chavez
​

Introduction
I've never been a fan of unskippable cutscenes in video games, and I couldn't find any plugins that did this at the time I started writing this plugin, so I decided to write my own.

This plugin allows the developer to set up skippable events. This is done by interrupting an event while it is running and jumping to a label defined in the plugin command that sets up the skip's properties. Optionally, the screen can be faded out right before the skip begins and, also optionally, faded back in when the skip ends. Additionally, this plugin can place a clickable/touchable button on the screen that can also skip the event.

This plugin does not automatically run through the skipped commands since certain commands, like move routes, can get quite complex when trying to account for all cases. As a result, this plugin is not simply plug 'n play; it is on the developer to correctly set up switches, variables, event positions, etc. after a skip. This plugin does provide some tools to aid in this process, however.

Features
  • Skip events in progress by holding a button
  • Add a custom skip button image for use with the Touch UI
  • Display a labeled progress bar on screen while the player is holding the skip button
  • Automatically fade the screen in and out when a skip starts and completes, respectively
  • Override time needed to skip, the skip button, auto fade in, auto fade out, etc. on a per-skip basis
  • Use a few utility plugin commands to ease the transition after skipping a cutscene
    • Reload a map event
    • Directly set which tile the screen is centered upon
Media
Spoiler: Media

A demo of various types of skips.

skipping.png

A skip in progress

params overview.png

General Plugin Parameters

eventParams.png

The various per-skip parameters you can set


How to Use
To use, download and place this plugin below PluginCommonBase in your plugin manager and enable it. From there, follow the instructions in the help section of the plugin and the descriptions of each command.

Plugin Commands / Script Calls
Spoiler: Plugin Commands
  • Enable Event Skip
    • This command is the one that allows the event to be skipped. To set up a skip, a label name must be provided. If the label does not exist, the skip setup process will be aborted, and an error will be printed in the developer console.
    • If no overrides are set, the parameters in the plugin commands will be used. Otherwise, each parameter can be overridden and will be active for this skip only. Any skips set up after this one will not inherit these overrides.
  • Disable Event Skip
    • This command disables skipping the current event. Does nothing if the current event does not have a skip currently set up.
  • Force Event Skip
    • This command forces the currently setup skip to occur. Nothing happens in-game if the current event was not skippable.
  • Restore Parent Skip
    • This can be used inside of a common event if Disable Event Skip was used inside of it to restore the ability of the common event to end early and return to the parent event's commands. This only works if the calling event had the Common Event Inherit parameter enabled.
  • Reset Event
    • This command re-initializes a map event in a process similar to how the event would be loaded if the map was entered. So, the position, graphics, move route, etc. of the event's current page will be restored. This command does NOT affect the event's self-switches.
    • Setting the Event ID parameter of this command to 0 targets the event using this command.
  • Set Camera Coordinates
    • This command directly sets the scroll position of the camera, centered at the tile at the x and y arguments. This can be used to quickly set the camera's position if the end of the event expects it to be in a certain spot on the map. This command cannot cause the camera to move beyond the map's boundaries, so if the coordinate would cause the camera to display beyond the edges of the map, the camera position will be clamped, similar to how the camera behaves when the player is close to the map border.
  • Reset Map Camera
    • This is basically a wrapper for 'Set Camera Coordinates' that sets x and y to the player's x and y coordinates, respectively.
Spoiler: Script Calls
Any script calls prefixed with 'this' work in parts of the event editor that accept script calls, like the script command and in the conditional branch command. The big exception to this is in the move route commands. So, do not use any commands prefixed with 'this' inside of the script of a move route. This little quirk exists due to how MZ handles the script command.
JavaScript:
this.wasEventSkipped()
Returns true if the most recently set up skip for this event was activated.
JavaScript:
this.setupskip(label: string, fadeIn?: boolean, fadeOut?: boolean, button?: string, resultSwitchId?: number, allowInherit?: boolean)
Sets up a skip.
  • label: Name of the label that will be jumped to if the player activates this event skip.
  • The rest of the arguments are overrides to the defaults set in the plugin parameters and are optional.
JavaScript:
this.disableSkip()
Disables the currently setup skip if it exists. Does nothing otherwise.
JavaScript:
this.restoreSkipParentParams()
Does the same thing as the 'Restore Parent Skip' plugin command.
JavaScript:
KCDev.SkipEvent.reinitEvent(eventId: number)
Reinitializes the map with the ID eventId.
JavaScript:
KCDev.SkipEvent.setMapScrollPos(x: number, y: number)
Centers the display on the map tile with coordinates x and y.
JavaScript:
KCDev.SkipEvent.resetMapScroll()
Centers the map scroll on the player.

Demo
Grab KC_SkipEvent_Demo.zip from this GitHub release

Download
Grab KC_SkipEvent.js from this GitHub release

Old Demos & Releases
Check the GitHub releases

Changelog
  • 2024/09/03 - v1.0.1
    • Fix text from "Show Scrolling Text" command not being hidden after skipping an event
  • 2023/02/08 - v1.0.0
    • Initial release

Terms and Credits
I've released this plugin under the MIT license. So, you can include this plugin in any project as long as you include the license with your distribution. For most projects, this requirement is fulfilled as long as you keep the license text that is at the top of the plugin's js file intact.

Also, though not strictly required, I would appreciate being credited as K. Chavez or Kelly Chavez in your games' credits.

Other
Here is the graphic used in the demo for the Touch UI's skip button. It was made by modifying one of the buttons in img/system/ButtonSet.png. Feel free to use it in any project where you're licensed to use the MZ RTP.
Spoiler: Skip Button
SkipButton.png
Wow, that's a really useful plugin, thank you very much!

I found a weird behavior, that the bar doesn't show during some specific events that are inside common events. "Common Event inherit" is not active, it's just a cutscene inside a common event, with plugin call and label inside the common event.
But if I put the label outside of the common event, and the plugin call BOTH inside and outside, it works normally.

immagine_2023-06-13_024029714.png

immagine_2023-06-13_024147785.png
Wow, that's a really useful plugin, thank you very much!

I found a weird behavior, that the bar doesn't show during some specific events that are inside common events. "Common Event inherit" is not active, it's just a cutscene inside a common event, with plugin call and label inside the common event.
But if I put the label outside of the common event, and the plugin call BOTH inside and outside, it works normally.

View attachment 265138
View attachment 265139
Would you be able to upload a project that demonstrates the issue? It can be a simple one-map project. Setting up a skip inside of a common event on my end worked in my own testing, so I want to make sure I'm looking at this from the right angle 🙂
Can this work on RPG Maker MV?
There is support for version 1.7.0?
Can this work on RPG Maker MV?
I have no plans to officially support MV.

There is support for version 1.7.0?
I don't see any changes in 1.7.0 that would affect this plugin's functionality. I can confirm that updating the demo's corescript did not break any of the example events.
This plugin is a lifesaver. Ty so much. I was coding my own but was running into issues when it came to abruptly stopping the current message being displayed. This is a very elegant solution!

The one thing it's missing is also stopping ongoing `Scroll Map` event commands. If you skip during one, it will keep scrolling post-skip until it finishes the map scroll the interpreter was currently doing.

Update: Disregard my comment about map scrolling. Your plugin command "Reset Map Camera" fixes this. You really did think of everything! 🙂
So I'm trying to use this to create a skippable text scroll but the text remains stuck on screen.
1725330181068.png

EDIT: I've worked around it by transferring to another map. However, I want to be able to skip the event using the enter/return/space key as well as an option. Wonder if that might be an option in the future?
So I'm trying to use this to create a skippable text scroll but the text remains stuck on screen.
-snip-
EDIT: I've worked around it by transferring to another map. However, I want to be able to skip the event using the enter/return/space key as well as an option. Wonder if that might be an option in the future?
Thank you for reporting the bug. I've pushed a small patch to the plugin that should resolve this.

If you would like to skip with the confirm button, you can actually set the Activation Button parameter to "ok" (all lowercase, no quotes). I'd recommend not using the skip bar though if you go this route though. As mentioned in the help section, the plugin can actually check for any button that RPG Maker MZ supports---check Input.keyMapper in js/rmmz_core.js if you want the full list of possible buttons.
Perfect. Although I'm now curious if we can do it with more buttons, like say a cancel. I saw rmmz_core.js and see that cancel and escape are separate. I'm eager to find out more about that if that's ever an option. Seems it can only do one button at a time.

EDIT: Otherwise, the patch works like a charm.
I saw rmmz_core.js and see that cancel and escape are separate.
That's not really the case. If you reference Input.keyMapper, as Kelly said, there is only the internal "escape" command.

The "cancel" command (as well as the "menu" command) is only mapped to gamepads (which in turn do not have the "escape" command).

This is solely to imitate the standard button mapping for console JRPGs where the button you press to open the menu is not the same button that's used to cancel choices/back out of menus. (for example, most Playstation RPGs use Triangle to open the menu but Circle to cancel, Xbox uses Y to open the menu and B to cancel).

Internally, "cancel" and "escape" are the same, except "cancel" will not open the menu from the map scene (which is generally undesirable on a keyboard layout).
Thanks for the explanation. Guess I can go with escape then.

Original thread: https://forums.rpgmakerweb.com/threads/kc_skipevent-skip-cutscenes-by-interrupting-events.154815/