The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: pookyblueXD on October 20, 2008, 11:07:55 PM

Title: I think I need a script... Please read.
Post by: pookyblueXD on October 20, 2008, 11:07:55 PM
um, I want to add an intro video to my game before the title screen. Do i need a script to do that? If so, can you give me one?
If not, can you tell me? :D
Title: Re: I think I need a script... Please read.
Post by: tSwitch on October 21, 2008, 01:14:35 PM
to get an intro before the title screen, you'll need a script to skip to an intro map, and bypass the title screen.  you'd do your little intro on that map, then call 'return to title screen' to get the game going.

however, if you really want it to be a -video- then you'll need another script, to allow the playing of video files.

I, unfortunately, have neither for VX.
Title: Re: I think I need a script... Please read.
Post by: Leventhan on October 21, 2008, 02:31:39 PM
You should be able to use motion and shape tweens with the show picture commands though, even though it's going to be tough and the result
not exactly as good as a video. There's a script for an intro event, if you're interested.
Title: Re: I think I need a script... Please read.
Post by: pookyblueXD on November 16, 2008, 12:48:38 PM
Of course I F***in' AM!
Title: Re: I think I need a script... Please read.
Post by: modern algebra on November 16, 2008, 10:39:13 PM
This might be what you're looking for - a script to bypass title screen and go to an event is easy though, if that's what you want.
Title: Re: I think I need a script... Please read.
Post by: Leventhan on November 17, 2008, 07:20:03 AM
Remember to credit accordingly, it's not my script.
Simply add this to your script editor and make a map for the intro that has the opening cutscene event. The map ID on which the opening event is on can be modified in the script.

[spoiler]#==============================================================================
# ** Advanced Title Screen
#------------------------------------------------------------------------------
#  © Dargor, 2008
#  26/05/08
#  Version 1.1
#------------------------------------------------------------------------------
#  VERSION HISTORY:
#   - 1.0 (26/05/08), Initial release
#   - 1.1 (26/05/08), Support added for Introductions
#------------------------------------------------------------------------------
#  INSTRUCTIONS:
#   - Paste this above main
#   - Edit the constants in Title_Screen module
#==============================================================================

#==============================================================================
# ** Title Screen Customization Module
#==============================================================================
module Title_Screen
  # ID of the title screen map
  Map = 3
  # Play the map BGM instead of the title screen BGM
  Map_BGM = false
  # Introduction flag
  Intro = true
  # Introduction map ID
  Intro_Map = 4
  # Introduction map player location (x,y)
  Intro_Coords = [7,21]
end

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

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias dargor_vx_advanced_title_map_update update
  alias dargor_vx_advanced_title_map_call_title call_title
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    if $intro_running && Input.trigger?(Input::B)
      $intro_running = nil
      $intro_completed = true
      $scene = Scene_Title.new
      RPG::BGM.fade(1500)
      Graphics.fadeout(60)
      Graphics.wait(40)
      return
    end
    dargor_vx_advanced_title_map_update
  end
  #--------------------------------------------------------------------------
  # * Switch to Title Screen
  #--------------------------------------------------------------------------
  def call_title
    if $intro_running
      $intro_running = nil
      $intro_completed = true
      dargor_vx_advanced_title_map_call_title
      RPG::BGM.fade(1500)
      Graphics.fadeout(60)
      Graphics.wait(40)
      return
    end
    dargor_vx_advanced_title_map_call_title
  end
end

#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias dargor_vx_advanced_title_start start
  alias dargor_vx_advanced_title_terminate terminate
  alias dargor_vx_advanced_title_update update
  alias dargor_vx_advanced_title_command_new_game command_new_game
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    $intro_running   = false if $intro_running.nil?
    $intro_completed = false if $intro_completed.nil?
    if Title_Screen::Intro && !$intro_completed
      start_introduction
      return
    end
    dargor_vx_advanced_title_start
    create_map_background             # Create map as background
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    dargor_vx_advanced_title_terminate
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    dargor_vx_advanced_title_update
    $game_map.interpreter.update      # Update map interpreter
    $game_map.update                  # Update map
    @spriteset.update                 # Update map spriteset
  end
  #--------------------------------------------------------------------------
  # * Create Map Background
  #--------------------------------------------------------------------------
  def create_map_background(temp=false)
    $game_map.setup(Title_Screen::Map)
    if temp
      @spriteset = @sprite
      @spriteset.visible = false
    else
      @spriteset = Spriteset_Map.new
    end
    if Title_Screen::Map_BGM
      $game_map.autoplay
    end
  end
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_new_game
    # Clear previous map data and create a new one
    $game_map = Game_Map.new
    # the usual
    dargor_vx_advanced_title_command_new_game
  end
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def start_introduction
    load_database                     # Load database
    create_game_objects               # Create game objects
    create_title_graphic              # Create title graphic
    create_command_window             # Create command window
    @command_window.visible = false
    create_map_background(true)       # Create map as background
    # Clear previous map data and create a new one
    $game_map = Game_Map.new
    $intro_running = true
    confirm_player_location
    $game_party.setup_starting_members            # Initial party
    $game_map.setup(Title_Screen::Intro_Map)    # Initial map position
    x = Title_Screen::Intro_Coords[0]
    y = Title_Screen::Intro_Coords[1]
    $game_player.moveto(x, y)
    $game_player.refresh
    $scene = Scene_Map.new
    $game_map.autoplay
  end
end
[/spoiler]
Title: Re: I think I need a script... Please read.
Post by: worale on December 03, 2008, 05:14:55 AM
Are you looking for skip title script >_>"
http://www.rpgrevolution.com/forums/index.php?showtopic=8521