Help - Search - Members - Calendar
Full Version: Start Screen (XP version)
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS-Submissions
Guyver's Bane
Start Screen for XP

Ever noticed how in some games they have a start screen before continuing on to the continue/new game?
Well now it's your turn to have it.
CODE
#-------------------------------------------------------------------------------
# Start Screen XP Version
# Last update : 2010/09/05
# Edited by Guyver's Bane
# Support provided by Night5h4d3 for battle test problem
# Additional edits provided by Night Runner, and stripe103
# Credit if used
#===============================================================================
# This script allows you to have a Start screen upon playing
#==============================================================================#
#
#-------------------------------------------------------------------------------
# Installation: Place above "Main". Basically it's pulg'n play.
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
# Instructions
#-------------------------------------------------------------------------------
# You must edit Scene_Title in Main, changing it to Scene_Start. See Example.
# Also BGM can be edited to your liking on line 56. Command sound on line 92.
# And title background on line 48.
#
#-------------------------------------------------------------------------------
#===============================EXAMPLE=========================================
#-------------------------------------------------------------------------------
#begin
# Graphics.freeze
# $scene = Scene_Start.new
# $scene.main while $scene != nil
# Graphics.transition(30)
#rescue Errno::ENOENT
# filename = $!.message.sub("No such file or directory - ", "")
# print("Unable to find file #{filename}.")
#end

class Scene_Start
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# If battle test
if $BTEST
$scene = Scene_Title.new
end
# Load database
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title("001-Title01")
# Make command window
s1 = " Press Start"
@command_window = Window_Command.new(115, [s1])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
# Play title BGM
Audio.bgm_play("Audio/BGM/012-Theme01", 100, 100)
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
# Dispose of title graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # Start
$game_system.se_play($data_system.decision_se)
#Audio.se_play("Audio/SE/choice1", 100, 100) # this line is optional for a different decision se. To use it just remove the above line.
#$game_system.se_play($data_system.decision_se)
$scene = Scene_Title.new
end
end
end
end


Screenshot:



Compatibility: Should work fine with any script.

If you have any problems please post the error message and I will try and help.
stripe103
Thank you a lot. Now I'm just going to edit it a bit to suit my needs.
Guyver's Bane
Edit away! biggrin.gif I probably should have centered the text though. I'll do that now.

EDIT:

Script updated! "Press Start" fixed to look more centered. New screen shot also!
stripe103
Edited the script so that it take the Title Screen Image, desicion sound and title screen music from the database, just as the title screen itself do.


CODE
#-------------------------------------------------------------------------------
# Start Screen XP Version
# Last update : 2010/08/05          
# Edited by Guyver's Bane    
# Credit if used
#
# Slightly modified my Stripe103
#===============================================================================
#  This script allows you to have a Start screen upon playing
#==============================================================================#
#
#-------------------------------------------------------------------------------
#  Installation: Place above "Main". Basically it's pulg'n play.
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#                                 Instructions
#-------------------------------------------------------------------------------
#  You must edit Scene_Title in Main, changing it to Scene_Start. See Example.
#  Also BGM can be edited to your liking on line 56. Command sound on line 92.
#  And title background on line 48.
#
#-------------------------------------------------------------------------------
#===============================EXAMPLE=========================================
#-------------------------------------------------------------------------------
#begin
#  Graphics.freeze
#  $scene = Scene_Start.new
#  $scene.main while $scene != nil
#  Graphics.transition(30)
#rescue Errno::ENOENT
#  filename = $!.message.sub("No such file or directory - ", "")
#  print("Unable to find file #{filename}.")
#end

class Scene_Start
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # If battle test
    if $BTEST
      $scene = Scene_Title.new
    end
    # Load database
    $data_system = load_data("Data/System.rxdata")
    # Make system object
    $game_system = Game_System.new
    # Make title graphic
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title($data_system.title_name)
    # Make command window
    s1 = " Press Start"
    @command_window = Window_Command.new(115, [s1])
    @command_window.back_opacity = 160
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 288
    # Play title BGM
    $game_system.bgm_play($data_system.title_bgm)
    # Stop playing ME and BGS
    Audio.me_stop
    Audio.bgs_stop
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of command window
    @command_window.dispose
    # Dispose of title graphic
    @sprite.bitmap.dispose
    @sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update command window
    @command_window.update
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # New game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Title.new
      end
    end
  end
end



I changed line 49
CODE
@sprite.bitmap = RPG::Cache.title("001-Title01")

into
CODE
@sprite.bitmap = RPG::Cache.title($data_system.title_name)

==========================
and line 57
CODE
Audio.bgm_play("Audio/BGM/012-Theme01", 100, 100)

to
CODE
$game_system.bgm_play($data_system.title_bgm)
    # Stop playing ME and BGS
    Audio.me_stop
    Audio.bgs_stop

==========================
and line 96
CODE
Audio.se_play("Audio/SE/choice1", 100, 100)

into
CODE
$game_system.se_play($data_system.decision_se)
Guyver's Bane
Alright I got a name in my script of someone who modified it! biggrin.gif Who's next? The reason I didn't set it up like you have it was because the VX version this script was based on, was edited for a Dragon Quest fan-game. And if you've ever played them they have to different title like screens. The press start title with the game intro, and then the new game/continue screen like VX and XP. Keep an eye out for a updated version. Hopefully it will have a flashing image that says press start in place of the command window. As soon as I figure out how to do it in VX. tongue.gif
Night_Runner
QUOTE (Guyver's Bane @ Mar 9 2010, 04:55 PM) *
Alright I got a name in my script of someone who modified it! biggrin.gif Who's next?


Sound fun smile.gif

CODE
#-------------------------------------------------------------------------------
# Start Screen XP Version
# Last update : 09/Mar/10          
# Edited by Guyver's Bane    
# Further Edits by: Night_Runner
# Credit Guyver's Bane if used.
#===============================================================================
#  This script allows you to have a Start screen upon playing
#==============================================================================#
#
#-------------------------------------------------------------------------------
#  Installation: Place above "Main". Basically it's pulg'n play.
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#                                 Instructions
#-------------------------------------------------------------------------------
#  Also BGM can be edited to your liking on line 56. Command sound on line 92.
#  And title background on line 48.
#
#-------------------------------------------------------------------------------


class Scene_Start
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # If battle test
    if $BTEST
      $scene = Scene_Title.new
    end
    # Load database
    $data_system = load_data("Data/System.rxdata")
    # Make system object
    $game_system = Game_System.new
    # Make title graphic
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title("001-Title01")
    # Make command window
    s1 = " Press Start"
    @command_window = Window_Command.new(150, [s1])
    @command_window.back_opacity = 160
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 288
    # Play title BGM
    Audio.bgm_play("Audio/BGM/012-Theme01", 100, 100)
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of command window
    @command_window.dispose
    # Dispose of title graphic
    @sprite.bitmap.dispose
    @sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update command window
    @command_window.update
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If the only option is selected.
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Title.new
    end
  end
  #--------------------------------------------------------------------------
  # * Run this script.
  #--------------------------------------------------------------------------
  $scene = Scene_Start.new
  $scene.main while $scene.is_a?(self)
end


I've only changed 3 things, firstly, you don't need to edit Main, secondly, it plays decision_se instead of the choice1 (to me it makes a bit more sense, and you don't get an error smile.gif) and I've made the window wider so it doesn't squish the text smile.gif

Sorry, I like this script, it's fun smile.gif
Night5h4d3
QUOTE
Alright I got a name in my script of someone who modified it! biggrin.gif Who's next?

eh? your forgetting who made it battle-test compatible Guyver's Bane!
Guyver's Bane
Night5h4d3:
Were you not included in the XP version? huh.gif Let me see.

EDIT

Check the first post of the script now. Sorry, I must have gotten in a hurry to post it and forgot to add you.
Also replaced the decision sound line with choice1 to play decision_se from the data base instead, but left the other line as a optional feature.

Night Runner:
I changed the size originally because it looked to have too much extra space along the side of the command. I guess I made it to small. laugh.gif
ragnaroc444
Heh nice scripts guys gonna use this in my game!

is it alright if i include that in a KH 2 menu script? so it's one script takes up less room anyways
sasofrass
doesn't work with BlizzABS
romeboy109
Hmm... really? I don't know why but the script wouldn't work for me unless I'd edit main...
poisonshift
My poor friend disappeared without a word a few months ago. So he wont be helping.
Phantom0x0
If anyone wants just a black screen as the background use "Stripe103's" customization to the script but on
CODE
@sprite.bitmap = RPG::Cache.title($data_system.title_name)

Just change it to
CODE
@sprite.bitmap = RPG::Cache.title("")

( " " ) --------------------------------^

That way you can have your title music going but the screen will be black (Adds a kinda surprise to anyone who hasn't seen your title screen)
Yusshin
I installed this above Main, but the screen doesn't appear. I still get the Start Game/###/Shutdown Screen.

Any idea why :<?
stripe103
Yup. In "Main", you have to change
CODE
$scene = Scene_Title.new
to
CODE
$scene = Scene_Start.new
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.