RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Cutscene Skip

0 Members and 1 Guest are viewing this topic.

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
Cutscene Skip
Version: 2.0
Author: TDS
Date: February 11, 2012

Version History


  • <Version 1.0> 2012.02.11 - Original Release
  • <Version 2.0> 2013.01.16 - Improved code, fixed bugs and added features from the "Instant event commands" script

Description


This script allows you to skip evented cutscenes.

Features

  • Skipping events that are designated as cutscenes

Instructions

Just put the script in the materials part of the list and follow the instructions in the script.

This is an example of a cutscene event.



Script


Old version
Code: [Select]
#==============================================================================
# ** TDS Cutscene Skip
#    Ver: 1.0
#------------------------------------------------------------------------------
#  * Description:
#  This script allows you to skip events that are marked as cutscenes when the
#  CTRL key is pressed.
#------------------------------------------------------------------------------
#  * Features:
#  Skip evented cutscenes.
#------------------------------------------------------------------------------
#  * Instructions:
#  To make an evented sequence be a skippable cutscene you must add this to it.
#
#  From a script call:
#   
#  start_cutscene
#
#  To specify where the cutscene will be skipped to you must add this label.

#  CUTSCENE_END
#
#  To check whether or not an evented cutscene was skipped you can add this to
#  a conditional branch on the 4th tag in the script line.
#
#  cutscene_skipped?
#
#------------------------------------------------------------------------------
#  * Notes:
#  Cutscenes need to be faded in after being skipped and music needs to be
#  replayed after being skipped since they are faded out to allow the creator
#  of the cutscene to arrange things accordingly before the player takes control.
#------------------------------------------------------------------------------
# WARNING:
#
# Do not release, distribute or change my work without my expressed written
# consent, doing so violates the terms of use of this work.
#
# If you really want to share my work please just post a link to the original
# site.
#
# * Not Knowing English or understanding these terms will not excuse you in any
#   way from the consequenses.
#==============================================================================


#==============================================================================
# ** Game_Interpreter
#------------------------------------------------------------------------------
#  An interpreter for executing event commands. This class is used within the
# Game_Map, Game_Troop, and Game_Event classes.
#==============================================================================

class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_cutscene_skip_game_interpreter_initialize         initialize
  alias tds_cutscene_skip_game_interpreter_execute_command    execute_command
  alias tds_cutscene_skip_game_interpreter_command_118        command_118
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     depth :
  #--------------------------------------------------------------------------
  def initialize(depth = 0)
    # Run Original Method
    tds_cutscene_skip_game_interpreter_initialize(depth)
    # Set Cutscene Flags
    @cutscene_active = @cutscene_skipped = @cutscene_skipping = false
  end
  #--------------------------------------------------------------------------
  # * Determine if Cutscene is active
  #--------------------------------------------------------------------------
  def cutscene_active?  ; @cutscene_active and running? end
  def cutscene_skipped? ; @cutscene_skipped and running? end
  #--------------------------------------------------------------------------
  # * Start Cutscene
  #--------------------------------------------------------------------------   
  def start_cutscene
    # Set Cutscene Active Flag to true
    @cutscene_active = true
    # Set Cutscene Skipped Flag to false
    @cutscene_skipped = false
  end
  #--------------------------------------------------------------------------
  # * Skip Cutscene
  #-------------------------------------------------------------------------- 
  def skip_cutscene
    # Set Cutscene Skipping and Skipped Flag to true
     @cutscene_skipping = @cutscene_skipped = true     
     # Clear Game Messages
     $game_message.clear
     # Reset Map Scrolling
     $game_map.finish_scrolling
     # Stop All Forced Movement on map
     $game_map.stop_all_forced_move_route     
     # Set Fiber to nil
     @fiber = nil
  end
  #--------------------------------------------------------------------------
  # * Finish Cutscene
  #-------------------------------------------------------------------------- 
  def finish_cutscene
    # Set Cutscene Skipping and Cutscene Active Flag to false
    @cutscene_skipping = @cutscene_active = false
  end 
  #--------------------------------------------------------------------------
  # * Label
  #--------------------------------------------------------------------------
  def command_118
    # Run Original Method
    tds_cutscene_skip_game_interpreter_command_118
    # Finish Cutscene if the Cutscene End Label has been reached
    finish_cutscene if @params.at(0).include?("CUTSCENE_END")
  end   
  #--------------------------------------------------------------------------
  # * Set Center Screen Display Position
  #--------------------------------------------------------------------------
  def set_center_display_pos(x, y)   
    center_x = (Graphics.height / 32 - 1) / 2.0
    center_y = (Graphics.width / 32 - 1) / 2.0
    $game_map.set_display_pos(x - 2 - center_x, y  - center_y)   
  end
  #--------------------------------------------------------------------------
  # * Execute Command
  #--------------------------------------------------------------------------
  def execute_command
    # If Cutscene has been skipped
    if @cutscene_skipping
      # Get Command and it's properties
      command = @list[@index] ; @params = command.parameters ; @indent = command.indent
      # Command Code Case
      case command.code
      when 118, 121..123, 125..129, 132..138, 201..203, 206, 211, 216, 217, 231, 233, 235, 281..285, 311..324
      when 204 # Scroll Map
        # Process Scrolling Method and Finish Map Scrolling
        command_204 ; $game_map.finish_scrolling ; return
      when 223 # Map tone Change
        # Change Fade time to 0 and remove wait
        @params[1] = 0 ; @params[2] = false
      when 234 # Change Picture Tone
        # Change Picture Tone and Remove Wait
        @params[2] = 0 ; @params[3] = false
      when 232 # Move Picture
        # Change Move Picture Duration and Remove Wait
        @params[10] = 0 ; @params[11] = false
      when 335 # Script
      else ; return
      end
      method_name = "command_#{command.code}"
      send(method_name) if respond_to?(method_name)
      return
    end
    # Run Original Command
    tds_cutscene_skip_game_interpreter_execute_command
  end 
end


#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles maps. It includes scrolling and passage determination
# functions. The instance of this class is referenced by $game_map.
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Finish Map Scrolling
  #--------------------------------------------------------------------------
  def finish_scrolling
    # Scroll Direction Case
    case @scroll_direction
    when 2 ; set_display_pos(@display_x, @display_y + @scroll_rest.abs) # Down   
    when 4 ; set_display_pos(@display_x - @scroll_rest.abs, @display_y) # Left
    when 6 ; set_display_pos(@display_x + @scroll_rest.abs, @display_y) # Left     
    when 8 ; set_display_pos(@display_x, @display_y - @scroll_rest.abs) # Up
    end
    # Setup Scroll
    setup_scroll
  end
  #--------------------------------------------------------------------------
  # * Stop All forced movement
  #--------------------------------------------------------------------------
  def stop_all_forced_move_route
    # Stop Events Forced Move Route
    @events.each_value {|e| e.stop_move_route }   
    # Stop Player Move Route
    $game_player.stop_move_route
  end
end

#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass of the
# Game_Player, Game_Follower, GameVehicle and Game_Event classes.
#==============================================================================

class Game_Character < Game_CharacterBase
  #--------------------------------------------------------------------------
  # * Stop Move Route Processing
  #--------------------------------------------------------------------------
  def stop_move_route
    # Return if Move route is not forced
    return if !@move_route_forcing   
    # Move to current position (If they were already in mid movement)
    moveto(@x, @y)
    # Restore Move Route
    restore_move_route
    # Set Move Route Force Flag to false
    @move_route_forcing = false   
  end
end




#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_silver_heart_scene_map_update                              update
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update Cutscene Skip Input if in a Cutscene
    update_cutscene_skip_input if $game_map.interpreter.cutscene_active?   
    # Run Original Method
    tds_silver_heart_scene_map_update
  end
  #--------------------------------------------------------------------------
  # * Update Cutscene Skip Input
  #--------------------------------------------------------------------------
  def update_cutscene_skip_input
    # If Input Trigger CTRL
    if Input.trigger?(:CTRL)
      # Play Ok Sound
      Sound.play_ok
      # Make Cutscene Cover Sprite
      @cutscene_cover = Sprite.new
      @cutscene_cover.bitmap = Graphics.snap_to_bitmap
      @cutscene_cover.bitmap.blur     
      @cutscene_cover.opacity = 0     
      @cutscene_cover.tone.set(-30, -30, -30)
      @cutscene_cover.z = 5000
      # Make Cutscene Skip Window
      @cutscene_skip_window = Window_Cutscene_Skip_Prompt.new
      @cutscene_skip_window.x = (Graphics.width - @cutscene_skip_window.width) / 2
      @cutscene_skip_window.y = (Graphics.height - @cutscene_skip_window.height) / 2     
      @cutscene_skip_window.z = 5100
      @cutscene_skip_window.index = 1
      @cutscene_skip_window.openness = 0
      @cutscene_skip_window.open
     
      15.times do
        # Update Graphics
        Graphics.update
        # Increase Cutscene Cover Opacity
        @cutscene_cover.opacity += 17
      end
      10.times do
        # Update Graphics
        Graphics.update       
        # Update Cutscene Skip Window
        @cutscene_skip_window.update       
      end
     
      loop do
        # Update Graphics and Input
        Graphics.update ; Input.update
        # Update Cutscene Skip Window
        @cutscene_skip_window.update
        # If Input Trigger C (Confirm)
        if Input.trigger?(:C)
          # Play Ok Sound
          Sound.play_ok
          case @cutscene_skip_window.index
          when 0 # Yes
            # Deactivate Skip Cutscene window
            @cutscene_skip_window.deactivate
            # Close Cutscene Skip Window
            @cutscene_skip_window.close
            10.times do
              # Update Graphics
              Graphics.update
              # Update Cutscene Skip Window
              @cutscene_skip_window.update                   
            end
            # Save BGM
            $game_system.save_bgm           
            # Fadeout
            $game_map.screen.start_fadeout(30)
            # Fade Time
            time = 500
            # Fadeout all Sound
            RPG::BGM.fade(time) ; RPG::BGS.fade(time) ; RPG::ME.fade(time)                       
            # Fading Out Wait
            35.times do
              # Update Graphics
              Graphics.update
              $game_map.screen.update_fadeout
              @spriteset.update_viewports             
              @cutscene_cover.color.set(0, 0, 0, 255 - $game_map.screen.brightness)
            end
            # Stop All Sound
            RPG::BGM.stop ; RPG::BGS.stop ; RPG::ME.stop           
            # Dispose of Cutscene Cover
            @cutscene_cover.bitmap.dispose ; @cutscene_cover.dispose ; @cutscene_cover = nil
            # Dispose of Cutscene Skip Window
            @cutscene_skip_window.dispose ; @cutscene_skip_window = nil
            # Update Input
            Input.update         
            # Process Cutscene Skipping
            $game_map.interpreter.skip_cutscene           
            # Dispose of Message Window
            @message_window.dispose ; @message_window = nil
            # Create Message Window
            create_message_window
            break
          when 1 # No
            # Deactivate Skip Cutscene window
            @cutscene_skip_window.deactivate
            # Close Cutscene Skip Window
            @cutscene_skip_window.close
            10.times do
              # Update Graphics
              Graphics.update
              # Decrease Cutscene Cover Opacity
              @cutscene_cover.opacity -= 17       
              # Update Cutscene Skip Window
              @cutscene_skip_window.update                   
            end         
            # Dispose of Cutscene Cover
            @cutscene_cover.bitmap.dispose ; @cutscene_cover.dispose ; @cutscene_cover = nil
            # Dispose of Cutscene Skip Window
            @cutscene_skip_window.dispose ; @cutscene_skip_window = nil
            # Update Input
            Input.update           
          end
          break
        end

        # If Input Trigger B (Cancel)
        if Input.trigger?(:B)
          # Play Cancel Sound
          Sound.play_cancel
          # Deactivate Skip Cutscene window
          @cutscene_skip_window.deactivate
          # Close Cutscene Skip Window
          @cutscene_skip_window.close
          10.times do
            # Update Graphics
            Graphics.update
            # Decrease Cutscene Cover Opacity
            @cutscene_cover.opacity -= 17       
            # Update Cutscene Skip Window
            @cutscene_skip_window.update                   
          end         
          # Dispose of Cutscene Cover
          @cutscene_cover.bitmap.dispose ; @cutscene_cover.dispose ; @cutscene_cover = nil
          # Dispose of Cutscene Skip Window
          @cutscene_skip_window.dispose ; @cutscene_skip_window = nil
          # Update Input
          Input.update
          break
        end
      end
    end
  end
end


#==============================================================================
# ** Window_Save_File_Prompt
#------------------------------------------------------------------------------
#  This window handles save file overwrite prompt
#==============================================================================

class Window_Cutscene_Skip_Prompt < Window_Command
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(466, 170)
  end
  #--------------------------------------------------------------------------
  # * Window Width and Height
  #--------------------------------------------------------------------------
  def window_width  ; 190 end
  def window_height ; 77 end
  #--------------------------------------------------------------------------
  # * Window Standard Padding
  #--------------------------------------------------------------------------
  def standard_padding ; 0 end
  #--------------------------------------------------------------------------
  # * Item Rect
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new
    rect.width = item_width
    rect.height = item_height
    rect.x = 12 + index % col_max * item_width + 5
    rect.y = 37 + index / col_max
    rect
  end
  #--------------------------------------------------------------------------
  # * Ok Enabled Handling
  #--------------------------------------------------------------------------
  def ok_enabled? ; false end
  #--------------------------------------------------------------------------
  # * Max Columns
  #--------------------------------------------------------------------------
  def col_max ; 2 end
  #--------------------------------------------------------------------------
  # * Command Text Alignment
  #--------------------------------------------------------------------------
  def alignment ; 1 end
  #--------------------------------------------------------------------------
  # * Make Commands List
  #--------------------------------------------------------------------------
  def make_command_list   
    add_command("Yes", :yes, true) ; add_command("No",  :no, true)
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    super
    contents.font.color = knockout_color
    draw_text(12, 12, 166, 24, "Skip Cutscene?", 1)
  end
end

New version

Code: [Select]
#==============================================================================
# ** TDS Cutscene Skip
#    Ver: 2.0
#    [Requires "TDS Instant Event Commands" to work]
#------------------------------------------------------------------------------
#  * Description:
#  This script allows you to skip events that are marked as cutscenes when the
#  CTRL key is pressed.
#------------------------------------------------------------------------------
#  * Features:
#  Skip evented cutscenes.
#------------------------------------------------------------------------------
#  * Instructions:
#  To make an evented sequence be a skippable cutscene you must add this to it.
#
#  From a script call:
#   
#  start_cutscene
#
#  Or using this label:
#
#  CUTSCENE_START
#
#  To specify where the cutscene will be skipped to you must add this label.

#  CUTSCENE_END
#
#  To check whether or not an evented cutscene was skipped you can add this to
#  a conditional branch on the 4th tag in the script line.
#
#  cutscene_skipped?
#
#------------------------------------------------------------------------------
#  * Notes:
#  Cutscenes need to be faded in after being skipped and music needs to be
#  replayed after being skipped since they are faded out to allow the creator
#  of the cutscene to arrange things accordingly before the player takes control.
#------------------------------------------------------------------------------
# WARNING:
#
# Do not release, distribute or change my work without my expressed written
# consent, doing so violates the terms of use of this work.
#
# If you really want to share my work please just post a link to the original
# site.
#
# * Not Knowing English or understanding these terms will not excuse you in any
#   way from the consequenses.
#==============================================================================
# * Import to Global Hash *
#==============================================================================
($imported ||= {})[:TDS_Cutscene_Skip] = true

#==============================================================================
# ** Game_Interpreter
#------------------------------------------------------------------------------
#  An interpreter for executing event commands. This class is used within the
# Game_Map, Game_Troop, and Game_Event classes.
#==============================================================================

class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_cutscene_skip_game_interpreter_initialize         initialize
  alias tds_cutscene_skip_game_interpreter_command_118        command_118
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     depth :
  #--------------------------------------------------------------------------
  def initialize(depth = 0)
    # Run Original Method
    tds_cutscene_skip_game_interpreter_initialize(depth)
    # Set Cutscene Flags
    @cutscene_active = @cutscene_skipped = @cutscene_skipping = false
  end
  #--------------------------------------------------------------------------
  # * Determine if Cutscene is active
  #--------------------------------------------------------------------------
  def cutscene_active?   ; @cutscene_active and running? end
  def cutscene_skipped?  ; @cutscene_skipped and running? end
  def cutscene_skipping? ; @cutscene_skipping and running? end
  #--------------------------------------------------------------------------
  # * Start Cutscene
  #--------------------------------------------------------------------------   
  def start_cutscene
    # Set Cutscene Active Flag to true and Cutscene Skipped flag to false
    @cutscene_active = true ; @cutscene_skipped = false
  end
  #--------------------------------------------------------------------------
  # * Skip Cutscene
  #-------------------------------------------------------------------------- 
  def skip_cutscene
    # Set Cutscene Skipping and Skipped Flag to true
    @cutscene_skipping = @cutscene_skipped = true     
    # Clear Game Messages
    $game_message.clear
    # Reset Map Scrolling
    $game_map.finish_scrolling
    # Stop All Forced Movement on map
    $game_map.stop_all_forced_move_route   
    # Finish Tone Change already happening
    screen.finish_tone_change
    # Increase Index by 1
    @index += 1
    # Create Quick Run Fiber
    @fiber = Fiber.new { quick_run }
  end
  #--------------------------------------------------------------------------
  # * Quick Execute
  #--------------------------------------------------------------------------
  def quick_run
    # While Cutscene is skipping
    while cutscene_skipping? do execute_quick_command ; @index += 1 end
    # Yield Fiber and Set it to nil
    Fiber.yield ; @fiber = nil
    # Recreate Default Fiber
    create_fiber   
  end 
  #--------------------------------------------------------------------------
  # * Finish Cutscene
  #-------------------------------------------------------------------------- 
  def finish_cutscene
    # Set Cutscene Skipping and Cutscene Active Flag to false
    @cutscene_skipping = @cutscene_active = false
  end 
  #--------------------------------------------------------------------------
  # * Label
  #--------------------------------------------------------------------------
  def command_118
    # Run Original Method
    tds_cutscene_skip_game_interpreter_command_118
    # Start Cutscene if the Cutscene Start Label has been reached
    start_cutscene if @params.at(0).include?("CUTSCENE_START")
    # Finish Cutscene if the Cutscene End Label has been reached
    finish_cutscene if @params.at(0).include?("CUTSCENE_END")
  end   
  #--------------------------------------------------------------------------
  # * Set Center Screen Display Position
  #--------------------------------------------------------------------------
  def set_center_display_pos(x, y)   
    center_x = (Graphics.height / 32 - 1) / 2.0
    center_y = (Graphics.width / 32 - 1) / 2.0
    $game_map.set_display_pos(x - 2 - center_x, y  - center_y)   
  end
end


#==============================================================================
# ** Game_Screen
#------------------------------------------------------------------------------
#  This class handles screen maintenance data, such as changes in color tone,
# flashes, etc. It's used within the Game_Map and Game_Troop classes.
#==============================================================================

class Game_Screen
  #--------------------------------------------------------------------------
  # * Start Changing Color Tone
  #--------------------------------------------------------------------------
  def finish_tone_change
    # Return if tone target is nil
    return if @tone_target.nil?
    # Set Tone
    @tone = @tone_target.clone
  end
end


#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles maps. It includes scrolling and passage determination
# functions. The instance of this class is referenced by $game_map.
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Finish Map Scrolling
  #--------------------------------------------------------------------------
  def finish_scrolling
    # Scroll Direction Case
    case @scroll_direction
    when 2 ; set_display_pos(@display_x, @display_y + @scroll_rest.abs) # Down   
    when 4 ; set_display_pos(@display_x - @scroll_rest.abs, @display_y) # Left
    when 6 ; set_display_pos(@display_x + @scroll_rest.abs, @display_y) # Left     
    when 8 ; set_display_pos(@display_x, @display_y - @scroll_rest.abs) # Up
    end
    # Setup Scroll
    setup_scroll
  end
  #--------------------------------------------------------------------------
  # * Stop All forced movement
  #--------------------------------------------------------------------------
  def stop_all_forced_move_route
    # Stop Events Forced Move Route
    @events.each_value {|e| e.stop_move_route }   
    # Stop Player Move Route
    $game_player.stop_move_route
  end
end

#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass of the
# Game_Player, Game_Follower, GameVehicle and Game_Event classes.
#==============================================================================

class Game_Character < Game_CharacterBase
  #--------------------------------------------------------------------------
  # * Stop Move Route Processing
  #--------------------------------------------------------------------------
  def stop_move_route
    # Return if Move route is not forced
    return if !@move_route_forcing   
    # Move to current position (If they were already in mid movement)
    moveto(@x, @y)
    # Restore Move Route
    restore_move_route
    # Set Move Route Force Flag to false
    @move_route_forcing = false   
  end
end


#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_silver_heart_scene_map_update                              update
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update Cutscene Skip Input if in a Cutscene
    update_cutscene_skip_input if $game_map.interpreter.cutscene_active?   
    # Run Original Method
    tds_silver_heart_scene_map_update
  end 
  #--------------------------------------------------------------------------
  # * Start Cutscene Skip Prompt
  #--------------------------------------------------------------------------
  def start_cutscene_skip_prompt
    # Make Cutscene Cover Sprite
    @cutscene_cover = Sprite.new
    @cutscene_cover.bitmap = Graphics.snap_to_bitmap
    @cutscene_cover.bitmap.blur     
    @cutscene_cover.opacity = 0
    @cutscene_cover.tone.set(-30, -30, -30)
    @cutscene_cover.z = 5000
    # Make Cutscene Skip Window
    @cutscene_skip_window = Window_Cutscene_Skip_Prompt.new
    @cutscene_skip_window.x = (Graphics.width - @cutscene_skip_window.width) / 2
    @cutscene_skip_window.y = (Graphics.height - @cutscene_skip_window.height) / 2     
    @cutscene_skip_window.z = 5100
    @cutscene_skip_window.index = 1
    @cutscene_skip_window.openness = 0
    @cutscene_skip_window.open   
    # Set Cutscene Skip Window Handlers
    @cutscene_skip_window.set_handler(:ok,     method(:on_cutscene_skip_prompt_ok))
    @cutscene_skip_window.set_handler(:cancel, method(:on_cutscene_skip_prompt_cancel))   
    # Fade In Cutscene Cover
    15.times { Graphics.update ; @cutscene_cover.opacity += 17}
    # Cutscene Skip Prompt Update Loop
    loop {
      # Update Graphics, Input and Cutscene Skip Window
      Graphics.update ; Input.update ; @cutscene_skip_window.update
      # Break if Cutscene Skip window is nil
      break if @cutscene_skip_window.nil?
    }
  end
  #--------------------------------------------------------------------------
  # * [OK] Cutscene Skip
  #--------------------------------------------------------------------------
  def on_cutscene_skip_prompt_ok   
    # Close Cutscene Skip Window
    @cutscene_skip_window.close
    # Update Basic and Fadeout Cutscene Cover
    10.times { Graphics.update ; @cutscene_skip_window.update }
    # Save BGM
    $game_system.save_bgm           
    # Fadeout
    $game_map.screen.start_fadeout(30)
    # Fade Time
    time = 500
    # Fadeout all Sound
    RPG::BGM.fade(time) ; RPG::BGS.fade(time) ; RPG::ME.fade(time)
    # Fading Out Wait
    35.times {
      # Update Graphics, Fadeout and Spriteset Viewports
      Graphics.update ; $game_map.screen.update_fadeout ; @spriteset.update_viewports
      # Set Cutscene Cover Color
      @cutscene_cover.color.set(0, 0, 0, 255 - $game_map.screen.brightness)
    }
    # Stop All Sound
    RPG::BGM.stop ; RPG::BGS.stop ; RPG::ME.stop           
    # Dispose of Cutscene Cover
    @cutscene_cover.bitmap.dispose ; @cutscene_cover.dispose ; @cutscene_cover = nil
    # Dispose of Cutscene Skip Window
    @cutscene_skip_window.dispose ; @cutscene_skip_window = nil
    # Update Input
    Input.update         
    # Process Cutscene Skipping
    $game_map.interpreter.skip_cutscene           
    # Dispose of Message Window
    @message_window.dispose ; @message_window = nil
    # Create Message Window
    create_message_window
  end
  #--------------------------------------------------------------------------
  # * [Cancel] Cutscene Skip
  #--------------------------------------------------------------------------
  def on_cutscene_skip_prompt_cancel   
    # Close Cutscene Skip Window
    @cutscene_skip_window.close
    # Update Basic and Fadeout Cutscene Cover
    10.times { Graphics.update ; @cutscene_cover.opacity -= 17 ; @cutscene_skip_window.update }   
    # Dispose of Cutscene Cover
    @cutscene_cover.bitmap.dispose ; @cutscene_cover.dispose ; @cutscene_cover = nil
    # Dispose of Cutscene Skip Window
    @cutscene_skip_window.dispose ; @cutscene_skip_window = nil
    # Update Input
    Input.update
  end
  #--------------------------------------------------------------------------
  # * Update Cutscene Skip Input
  #--------------------------------------------------------------------------
  def update_cutscene_skip_input
    # If Input Trigger CTRL
    if Input.trigger?(:CTRL)
      # Play Ok Sound
      Sound.play_ok
      # Start Cutscene Skip Prompt
      start_cutscene_skip_prompt
    end
  end
end


#==============================================================================
# ** Window_Save_File_Prompt
#------------------------------------------------------------------------------
#  This window handles save file overwrite prompt
#==============================================================================

class Window_Cutscene_Skip_Prompt < Window_Command
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize ; super(466, 170) end
  #--------------------------------------------------------------------------
  # * Window Width and Height
  #--------------------------------------------------------------------------
  def window_width  ; 190 end
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number ; 2 end   
  #--------------------------------------------------------------------------
  # * Item Rect
  #--------------------------------------------------------------------------
  def item_rect(index) ; rect = super ; rect.y += line_height ; rect end
  #--------------------------------------------------------------------------
  # * Max Columns
  #--------------------------------------------------------------------------
  def col_max ; 2 end
  #--------------------------------------------------------------------------
  # * Command Text Alignment
  #--------------------------------------------------------------------------
  def alignment ; 1 end
  #--------------------------------------------------------------------------
  # * Make Commands List
  #--------------------------------------------------------------------------
  def make_command_list ; add_command("Yes", :ok) ; add_command("No", :cancel) end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    super
    contents.font.color = knockout_color
    draw_text(0, 0, contents_width, line_height, "Skip Cutscene?", 1)
  end
end

"Instant Event Commands" This script is required with the new version

https://dl.dropbox.com/u/61337936/Scripts/TDS%20Instant%20Event%20Commands.txt


Credit


  • TDS

Thanks

  • Archeia for testing.

Support


On this topic.

Known Compatibility Issues

None that I know so far.


Author's Notes


Cutscenes need to be faded in after being skipped and music needs to be replayed after being skipped since they are faded out to allow the creator of the cutscene to arrange things accordingly before the player takes control.

Restrictions

Only for use in non-commercial games.
« Last Edit: January 16, 2013, 10:10:24 PM by TDS »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
This is a great idea TDS. Nice work!

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
Script is lovely TDS, really simple and helps out a lot. I'm gonna use it, but I'll be making a few modifications in regards to fading out the BGM. I'd rather the BGM only fadeout if I want it to, consider it a suggestion if you will :)
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
I've updated the script with a new version. The new version improves a lot of the code and adds the functions of the "Instant event command" script which allows you to process event commands instead of skipping them.

Before the script simply skipped everything instead of running it (Like giving gold or changing party members), but now the script instantly processes all commands. Also it now should accept multiple cutscene labels in a single page (this error was never reported, but I found it while making a game.)

@D&P3:

Thanks and sorry about missing the comment, I don't usually see posts in this script, so I don't check it that often. I'll see about adding no fadeout for BGM's as an option.