Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
> DeadlyDan_Title, A Scene_Title replacement with image items alternative.
deadlydan
post Jan 25 2008, 09:12 PM
Post #1


Level 5
Group Icon

Group: Member
Posts: 71
Type: Event Designer
RM Skill: Masterful




Hi guys, i've completed another script again smile.gif ( Yay go me biggrin.gif ).

This script is an alternative to Scene_Title, it adds images to the menu instead of the RMVX window with selection items.

It's pretty much self-explanatory, here's a screen-shot of it in action:



You can download the images from that screenshot here: (Note: Extract this into your project folder)
http://www.megaupload.com/?d=G887QI7D

The script has instructions on how to use it, credits would be appreciated if used smile.gif

CODE
#==============================================================================
# ■ DeadlyDan_Title by DeadlyDan
#------------------------------------------------------------------------------
#  Replaces Scene_Title with an image menu alternative.
#==============================================================================
# Usage:
=begin
  
  Simply place this file anywhere after Scene_Title, place the following images in the "System" folder of your
  project:
  
  "new.png"
  "new_over.png"
  
  "continue.png"
  "continue_over.png"
  
  "quit.png"
  "quit_over.png"
  
  (NOTE)
  This has been scripted to in the idea that people may add more items to the menu, my script is easy enough
  to understand so it shouldn't be too hard to add new items. Just make sure that you add menu items after the
  stock ones i've added since any additions may distort the "load game" processing for the menu items.
  
  If you look at my positioning algorithm for the menu items you'll find it's not too hard to place your own.
  
=end

module DeadlyDan_Title

    IMAGE_NEW = [ "new", "new_over" ]    
    IMAGE_CONTINUE = [ "continue", "continue_over" ]    
    IMAGE_QUIT = [ "quit", "quit_over" ]    
    
end

class Scene_Title < Scene_Base
  
  def main
    if $BTEST
      battle_test
    else
      super
    end
  end

  def start
    super
    load_database
    create_game_objects
    check_continue
    create_title_graphic
    create_menu
    play_title_music
  end

  def perform_transition
    Graphics.transition ( 20 )
  end

  def post_start
    super
  end

  def pre_terminate
    super
  end

  def terminate
    super
    dispose_menu
    snapshot_for_background
    dispose_title_graphic
  end

  def update
    super
    if ( Input.trigger? ( Input::C ) )
      case @menu_index
      when 0
        command_new_game
      when 1
        command_continue
      when 2
        command_shutdown
      end
    end
    update_menu
  end

  def load_database
    $data_actors        = load_data ( "Data/Actors.rvdata" )
    $data_classes       = load_data ( "Data/Classes.rvdata" )
    $data_skills        = load_data ( "Data/Skills.rvdata" )
    $data_items         = load_data ( "Data/Items.rvdata" )
    $data_weapons       = load_data ( "Data/Weapons.rvdata" )
    $data_armors        = load_data ( "Data/Armors.rvdata" )
    $data_enemies       = load_data ( "Data/Enemies.rvdata" )
    $data_troops        = load_data ( "Data/Troops.rvdata" )
    $data_states        = load_data ( "Data/States.rvdata" )
    $data_animations    = load_data ( "Data/Animations.rvdata" )
    $data_common_events = load_data ( "Data/CommonEvents.rvdata" )
    $data_system        = load_data ( "Data/System.rvdata" )
    $data_areas         = load_data ( "Data/Areas.rvdata" )
  end

  def load_bt_database
    $data_actors        = load_data ( "Data/BT_Actors.rvdata" )
    $data_classes       = load_data ( "Data/BT_Classes.rvdata" )
    $data_skills        = load_data ( "Data/BT_Skills.rvdata" )
    $data_items         = load_data ( "Data/BT_Items.rvdata" )
    $data_weapons       = load_data ( "Data/BT_Weapons.rvdata" )
    $data_armors        = load_data ( "Data/BT_Armors.rvdata" )
    $data_enemies       = load_data ( "Data/BT_Enemies.rvdata" )
    $data_troops        = load_data ( "Data/BT_Troops.rvdata" )
    $data_states        = load_data ( "Data/BT_States.rvdata" )
    $data_animations    = load_data ( "Data/BT_Animations.rvdata" )
    $data_common_events = load_data ( "Data/BT_CommonEvents.rvdata" )
    $data_system        = load_data ("Data/BT_System.rvdata" )
  end

  def create_game_objects
    $game_temp          = Game_Temp.new
    $game_message       = Game_Message.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
  end

  def check_continue
    @continue_enabled = ( Dir.glob ( 'Save*.rvdata' ).size > 0 )
  end

  def create_title_graphic
    @sprite = Sprite.new
    @sprite.bitmap = Cache.system ( "Title" )
  end
  
  def dispose_title_graphic
    @sprite.bitmap.dispose
    @sprite.dispose
  end

  def create_menu
    padding = 5
    @menu_item = []
    @menu_item.push ( Sprite.new )
    @menu_item.push ( Sprite.new )
    @menu_item.push ( Sprite.new )
    
    @menu_item[1].blend_type = 0
    @menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[0] )
    @menu_item[1].x = ( ( Graphics.width / 2 ) - ( @menu_item[1].bitmap.width / 2 ) )
    @menu_item[1].y = ( ( Graphics.height / 2 ) - ( @menu_item[1].bitmap.height / 2 ) )
    
    @menu_item[0].blend_type = 0
    @menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[0] )
    @menu_item[0].x = ( ( Graphics.width / 2 ) - ( @menu_item[0].bitmap.width / 2 ) )
    @menu_item[0].y = ( ( Graphics.height / 2 ) - ( @menu_item[0].bitmap.height / 2 )  ) - ( @menu_item[1].bitmap.height + padding )
    
    @menu_item[2].blend_type = 0
    @menu_item[2].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_QUIT[0] )
    @menu_item[2].x = ( ( Graphics.width / 2 ) - ( @menu_item[2].bitmap.width / 2 ) )
    @menu_item[2].y = ( ( Graphics.height / 2 ) - ( @menu_item[2].bitmap.height / 2 ) ) + ( @menu_item[1].bitmap.height + padding )
    
    if ( @continue_enabled )
      @menu_index = 1
      @menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[0] )
      @menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[1] )
      @menu_item[1].tone
      @menu_item[1].tone = Tone.new ( 0, 0, 0, 0 )
    else
      @menu_index = 0
      @menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[1] )
      @menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[0] )
      @menu_item[1].opacity = 160
      @menu_item[1].tone = Tone.new ( -100, -100, -100, 255 )
    end
    @menu_count = 3    
  end

  def dispose_menu
    for i in 0..@menu_item.size - 1
        @menu_item[i].dispose
    end
  end
  
  def update_menu
    if ( Input.repeat? ( Input::UP ) or Input.repeat? ( Input::DOWN ) )
      last_index = @menu_index
      
      if ( Input.repeat? ( Input::DOWN ) )
        if ( @menu_index < ( @menu_count - 1 )  )
          if ( @continue_enabled )
            @menu_index += 1
          else          
            if ( ( @menu_index  == 0 )  )
              @menu_index = 2
            else
              @menu_index += 1
            end
          end
        else
          @menu_index = 0
        end
      end
      
      if ( Input.repeat? ( Input::UP ) )
        if ( @menu_index > 0  )
          if ( @continue_enabled )
            @menu_index -= 1
          else          
            if ( ( @menu_index  == 2 )  )
              @menu_index = 0
            else
              @menu_index -= 1
            end
          end
        else
          @menu_index = ( @menu_count - 1 )
        end
      end
      
      if ( @menu_index != last_index )
        Sound.play_cursor
      end
      
      case ( @menu_index )
      when 0
        @menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[1] )
        @menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[0] )
        @menu_item[2].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_QUIT[0] )
        
      when 1
        @menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[0] )
        @menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[1] )
        @menu_item[2].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_QUIT[0] )
      
      when 2
        @menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[0] )
        @menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[0] )
        @menu_item[2].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_QUIT[1] )
        
      end  
      
    end    
    
  end
  
  def play_title_music
    $data_system.title_bgm.play
    RPG::BGS.stop
    RPG::ME.stop
  end

  def confirm_player_location
    if $data_system.start_map_id == 0
      print "Player start point not set."
      exit
    end
  end

  def command_new_game
    confirm_player_location
    Sound.play_decision
    $game_party.setup_starting_members
    $game_map.setup ( $data_system.start_map_id )
    $game_player.moveto ( $data_system.start_x, $data_system.start_y )
    $game_player.refresh
    $scene = Scene_Map.new
    RPG::BGM.fade ( 1500 )
    Graphics.fadeout ( 60 )
    Graphics.wait ( 40 )
    Graphics.frame_count = 0
    RPG::BGM.stop
    $game_map.autoplay
  end

  def command_continue
    if @continue_enabled
      Sound.play_decision
      $scene = Scene_File.new ( false, true, false )
    else
      Sound.play_buzzer
    end
  end

  def command_shutdown
    Sound.play_decision
    RPG::BGM.fade ( 800 )
    RPG::BGS.fade ( 800 )
    RPG::ME.fade ( 800 )
    $scene = nil
  end

  def battle_test
    load_bt_database
    create_game_objects
    Graphics.frame_count = 0
    $game_party.setup_battle_test_members
    $game_troop.setup ( $data_system.test_troop_id )
    $game_troop.can_escape = true
    $game_system.battle_bgm.play
    snapshot_for_background
    $scene = Scene_Battle.new
  end
end


__________________________
Go to the top of the page
 
+Quote Post
   
NemesisPrime
post Jan 25 2008, 11:37 PM
Post #2


Level 2
Group Icon

Group: Member
Posts: 15
Type: Event Designer
RM Skill: Advanced




O.o Another VX Script? Cool! Nice one mate!
Go to the top of the page
 
+Quote Post
   
Kinnison
post Jan 25 2008, 11:44 PM
Post #3


The not-so-revolutionary guy
Group Icon

Group: Revolutionary
Posts: 162
Type: Event Designer
RM Skill: Masterful




This looks like ccoa's "Three Image Title Screen" XP script. But this might be helpful some other times biggrin.gif


__________________________
[Show/Hide] Current Game Project:

[Show/Hide] On Hold:
Go to the top of the page
 
+Quote Post
   
Ty
post Jan 25 2008, 11:50 PM
Post #4


Level 38
Group Icon

Group: +Gold Member
Posts: 1,007
Type: Scripter
RM Skill: Undisclosed




You should use the alias command instead of re-writing the entire Scene_Title. But other then that, good work.


__________________________
My Script Demo link broken? Looking for old scripts? Go here:
http://synthesize.4shared.com
Go to the top of the page
 
+Quote Post
   
deadlydan
post Jan 26 2008, 01:26 AM
Post #5


Level 5
Group Icon

Group: Member
Posts: 71
Type: Event Designer
RM Skill: Masterful




QUOTE (Synthesize @ Jan 25 2008, 10:57 PM) *
You should use the alias command instead of re-writing the entire Scene_Title. But other then that, good work.


Well, i would normally use that, but since most functions have been changed from the original scene_title, i didn't see any point in it. Thanks btw smile.gif


__________________________
Go to the top of the page
 
+Quote Post
   
SeeYouAlways
post Jan 26 2008, 01:33 AM
Post #6


Demented Moogle
Group Icon

Group: Banned
Posts: 1,130
Type: None
RM Skill: Undisclosed




Mmm, I just love these kind of little scripts. pinch.gif


__________________________
Go to the top of the page
 
+Quote Post
   
Ty
post Jan 26 2008, 02:16 AM
Post #7


Level 38
Group Icon

Group: +Gold Member
Posts: 1,007
Type: Scripter
RM Skill: Undisclosed




After a quick scan of your script, you only modified 3 of the 23 default methods of Scene_Title and then added two. What you could do is alias start and then add your code, then just copy/paste your two added methods. There was no need to rewrite the entire Scene_Title when you only changed 8.6% of it. With that said, you could very easily shorten the script and make it significantly more compatible with future VX scripts.

Cheers.


__________________________
My Script Demo link broken? Looking for old scripts? Go here:
http://synthesize.4shared.com
Go to the top of the page
 
+Quote Post
   
deadlydan
post Jan 26 2008, 02:30 AM
Post #8


Level 5
Group Icon

Group: Member
Posts: 71
Type: Event Designer
RM Skill: Masterful




Well, obviously the script can be shortend, and things can be taken out, but i made it within a few mins, so i don't really care about script size when it performs faster. (Every time an alias to a method is called the Ruby interpreter has to do a few extra things, so it's actually faster to just re-write the function)


__________________________
Go to the top of the page
 
+Quote Post
   
Ratbag
post Jan 26 2008, 07:24 AM
Post #9


Level 1
Group Icon

Group: Member
Posts: 6
Type: Artist
RM Skill: Advanced




Hey, it's pretty cool, i'll use it wink.gif Thanx dude!
Go to the top of the page
 
+Quote Post
   
ryo yuy alex
post Feb 3 2008, 02:23 AM
Post #10



Group Icon

Group: Member
Posts: 3
Type: None
RM Skill: Undisclosed




Thank You so much for the script!! =happy.gif=
Go to the top of the page
 
+Quote Post
   
50 cents
post Feb 3 2008, 03:46 PM
Post #11



Group Icon

Group: Member
Posts: 3
Type: Artist
RM Skill: Beginner




Megaupload does not exist in my country (Brazil) , because of this could you put the items in other uploader as the 4 shared or rapidshared?
thanks
Go to the top of the page
 
+Quote Post
   
jens009
post Feb 3 2008, 08:52 PM
Post #12


L Did you know? Death gods... only eat apples
Group Icon

Group: +Gold Member
Posts: 2,976
Type: Scripter
RM Skill: Skilled




QUOTE (50 cents @ Feb 3 2008, 02:53 PM) *
Megaupload does not exist in my country (Brazil) , because of this could you put the items in other uploader as the 4 shared or rapidshared?
thanks

You don't really need the demo to use the script.
ALl you need is to copy and paste the script and provide the three graphic files required.


__________________________

My RMXP Project:


Farewell RRR. =]
Go to the top of the page
 
+Quote Post
   
Nechi
post Feb 3 2008, 10:23 PM
Post #13


Certamen Promus
Group Icon

Group: Revolutionary
Posts: 117
Type: None
RM Skill: Beginner




It's Cool For me, Thank A lot.
Can you upload to another Hosting?^^


__________________________


Now, I 'm very busy.I'm work hard in the university. If you send me PM, sorry that I can't answer them at the moment.
Go to the top of the page
 
+Quote Post
   
50 cents
post Feb 4 2008, 02:47 PM
Post #14



Group Icon

Group: Member
Posts: 3
Type: Artist
RM Skill: Beginner




Yes , but are the 3 illustrations in the demo not?
Go to the top of the page
 
+Quote Post
   
deadlydan
post Feb 4 2008, 03:39 PM
Post #15


Level 5
Group Icon

Group: Member
Posts: 71
Type: Event Designer
RM Skill: Masterful




The download is just 3 example images, you can easily make your own and name them the specified names.


__________________________
Go to the top of the page
 
+Quote Post
   
50 cents
post Feb 4 2008, 05:04 PM
Post #16



Group Icon

Group: Member
Posts: 3
Type: Artist
RM Skill: Beginner




That Should nominate The Message xD?
Go to the top of the page
 
+Quote Post
   
ss3dj
post Feb 4 2008, 08:51 PM
Post #17


Level 6
Group Icon

Group: Member
Posts: 76
Type: None
RM Skill: Beginner




I must be making a noob mistake. I downloaded your megauplaod file with the pics, and all i see when i look at them are the words, but when i use the script my background changes to the one with the houses.


__________________________
"NEW YORK, NY. A man was knocked down by a car and got up uninjured, but lay back down in front of the car when a bystander told him to feign injury in order to collect insurance money. The car rolled forward and crushed him to death."
- Associated Press, 1977
Go to the top of the page
 
+Quote Post
   
RisingPhoenix
post Feb 4 2008, 10:28 PM
Post #18


Level 6
Group Icon

Group: Member
Posts: 82
Type: None
RM Skill: Skilled




If you edited Scene_Title's create_title_graphic function to change the title background (which you basically have to since VX removed the database option), you need to edit it in this script also since his is set up to use the default image.


__________________________
「いい気なるな!目障り何だよ!僕の目の前から�消えて
まえ!魔神!煉獄殺!」
ー リオン・マグナス (テイルズオブデスティニー)
"Ii ki naru na! Mezawari nan da yo! Boku no me no mae kara...kiete shimae! Majin! Rengokusatsu!"
- Leon Magnus (Tales of Destiny)
Go to the top of the page
 
+Quote Post
   
ss3dj
post Feb 5 2008, 02:06 PM
Post #19


Level 6
Group Icon

Group: Member
Posts: 76
Type: None
RM Skill: Beginner




thanks its fixed now


__________________________
"NEW YORK, NY. A man was knocked down by a car and got up uninjured, but lay back down in front of the car when a bystander told him to feign injury in order to collect insurance money. The car rolled forward and crushed him to death."
- Associated Press, 1977
Go to the top of the page
 
+Quote Post
   
aevonhaldy
post Mar 5 2008, 09:17 PM
Post #20


Level 4
Group Icon

Group: Member
Posts: 58
Type: Developer
RM Skill: Beginner




Hi Dan, this is a perfect script for my title screen--but I am having one problem (let me know if I should post this elsewhere?). I am trying to use four menu items, and for the most part it works just fine---with one positioning problem. I can't figure out how to get my fourth menu graphic positioned below; it just covers up the 3rd "quit" menu graphic. I know pretty much nothing about scripting, so your help--or anyone's--would be much appreciated! Thanks again for contributing this script!

Here's my script. What can I do to position the fourth graphic below the initial three??

CODE
#======================================================================
========
# ■ DeadlyDan_Title by DeadlyDan
#------------------------------------------------------------------------------
# Replaces Scene_Title with an image menu alternative.
#==============================================================================
# Usage:
=begin

Simply place this file anywhere after Scene_Title, place the following images in the "System" folder of your
project:

"new.png"
"new_over.png"

"continue.png"
"continue_over.png"

"quit.png"
"quit_over.png"

(NOTE)
This has been scripted to in the idea that people may add more items to the menu, my script is easy enough
to understand so it shouldn't be too hard to add new items. Just make sure that you add menu items after the
stock ones i've added since any additions may distort the "load game" processing for the menu items.

If you look at my positioning algorithm for the menu items you'll find it's not too hard to place your own.

=end

module DeadlyDan_Title

IMAGE_NEW = [ "new", "new_over" ]
IMAGE_CONTINUE = [ "continue", "continue_over" ]
IMAGE_QUIT = [ "quit", "quit_over" ]
IMAGE_CREDITS = [ "credits", "credits_over" ]

end

class Scene_Title < Scene_Base

def main
if $BTEST
battle_test
else
super
end
end

def start
super
load_database
create_game_objects
check_continue
create_title_graphic
create_menu
play_title_music
end

def perform_transition
Graphics.transition ( 20 )
end

def post_start
super
end

def pre_terminate
super
end

def terminate
super
dispose_menu
snapshot_for_background
dispose_title_graphic
end

def update
super
if ( Input.trigger? ( Input::C ) )
case @menu_index
when 0
command_new_game
when 1
command_continue
when 2
command_shutdown
when 3
command_credits
end
end
update_menu
end

def load_database
$data_actors = load_data ( "Data/Actors.rvdata" )
$data_classes = load_data ( "Data/Classes.rvdata" )
$data_skills = load_data ( "Data/Skills.rvdata" )
$data_items = load_data ( "Data/Items.rvdata" )
$data_weapons = load_data ( "Data/Weapons.rvdata" )
$data_armors = load_data ( "Data/Armors.rvdata" )
$data_enemies = load_data ( "Data/Enemies.rvdata" )
$data_troops = load_data ( "Data/Troops.rvdata" )
$data_states = load_data ( "Data/States.rvdata" )
$data_animations = load_data ( "Data/Animations.rvdata" )
$data_common_events = load_data ( "Data/CommonEvents.rvdata" )
$data_system = load_data ( "Data/System.rvdata" )
$data_areas = load_data ( "Data/Areas.rvdata" )
end

def load_bt_database
$data_actors = load_data ( "Data/BT_Actors.rvdata" )
$data_classes = load_data ( "Data/BT_Classes.rvdata" )
$data_skills = load_data ( "Data/BT_Skills.rvdata" )
$data_items = load_data ( "Data/BT_Items.rvdata" )
$data_weapons = load_data ( "Data/BT_Weapons.rvdata" )
$data_armors = load_data ( "Data/BT_Armors.rvdata" )
$data_enemies = load_data ( "Data/BT_Enemies.rvdata" )
$data_troops = load_data ( "Data/BT_Troops.rvdata" )
$data_states = load_data ( "Data/BT_States.rvdata" )
$data_animations = load_data ( "Data/BT_Animations.rvdata" )
$data_common_events = load_data ( "Data/BT_CommonEvents.rvdata" )
$data_system = load_data ("Data/BT_System.rvdata" )
end

def create_game_objects
$game_temp = Game_Temp.new
$game_message = Game_Message.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
end

def check_continue
@continue_enabled = ( Dir.glob ( 'Save*.rvdata' ).size > 0 )
end

def create_title_graphic
@sprite = Sprite.new
@sprite.bitmap = Cache.system ( "TestTitle" )
end

def dispose_title_graphic
@sprite.bitmap.dispose
@sprite.dispose
end

def create_menu
padding = 5
@menu_item = []
@menu_item.push ( Sprite.new )
@menu_item.push ( Sprite.new )
@menu_item.push ( Sprite.new )
@menu_item.push ( Sprite.new )

@menu_item[1].blend_type = 0
@menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[0] )
@menu_item[1].x = ( ( Graphics.width / 2 ) - ( @menu_item[1].bitmap.width / 2 ) )
@menu_item[1].y = ( ( Graphics.height / 2 ) - ( @menu_item[1].bitmap.height / 2 ) )

@menu_item[0].blend_type = 0
@menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[0] )
@menu_item[0].x = ( ( Graphics.width / 2 ) - ( @menu_item[0].bitmap.width / 2 ) )
@menu_item[0].y = ( ( Graphics.height / 2 ) - ( @menu_item[0].bitmap.height / 2 ) ) - ( @menu_item[1].bitmap.height + padding )

@menu_item[2].blend_type = 0
@menu_item[2].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_QUIT[0] )
@menu_item[2].x = ( ( Graphics.width / 2 ) - ( @menu_item[2].bitmap.width / 2 ) )
@menu_item[2].y = ( ( Graphics.height / 2 ) - ( @menu_item[2].bitmap.height / 2 ) ) + ( @menu_item[1].bitmap.height + padding )

@menu_item[3].blend_type = 0
@menu_item[3].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CREDITS[0] )
@menu_item[3].x = ( ( Graphics.width / 2 ) - ( @menu_item[3].bitmap.width / 2 ) )
@menu_item[3].y = ( ( Graphics.height / 2 ) - ( @menu_item[3].bitmap.height / 2 ) ) + ( @menu_item[1].bitmap.height + padding )

if ( @continue_enabled )
@menu_index = 1
@menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[0] )
@menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[1] )
@menu_item[1].tone
@menu_item[1].tone = Tone.new ( 0, 0, 0, 0 )
else
@menu_index = 0
@menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[1] )
@menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[0] )
@menu_item[1].opacity = 160
@menu_item[1].tone = Tone.new ( -50, -50, -50, 200 )
end
@menu_count = 4
end

def dispose_menu
for i in 0..@menu_item.size - 1
@menu_item[i].dispose
end
end

def update_menu
if ( Input.repeat? ( Input::UP ) or Input.repeat? ( Input::DOWN ) )
last_index = @menu_index

if ( Input.repeat? ( Input::DOWN ) )
if ( @menu_index < ( @menu_count - 1 ) )
if ( @continue_enabled )
@menu_index += 1
else
if ( ( @menu_index == 0 ) )
@menu_index = 2
else
@menu_index += 1
end
end
else
@menu_index = ( 0 )
end
end

if ( Input.repeat? ( Input::UP ) )
if ( @menu_index > 0 )
if ( @continue_enabled )
@menu_index -= 1
else
if ( ( @menu_index == 2 ) )
@menu_index = 0
else
@menu_index -= 1
end
end
else
@menu_index = ( @menu_count - 1 )
end
end

if ( @menu_index != last_index )
Sound.play_cursor
end

case ( @menu_index )
when 0
@menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[1] )
@menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[0] )
@menu_item[2].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_QUIT[0] )
@menu_item[3].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CREDITS[0] )

when 1
@menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[0] )
@menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[1] )
@menu_item[2].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_QUIT[0] )
@menu_item[3].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CREDITS[0] )

when 2
@menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[0] )
@menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[0] )
@menu_item[2].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_QUIT[1] )
@menu_item[3].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CREDITS[0] )

when 3
@menu_item[0].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_NEW[0] )
@menu_item[1].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CONTINUE[0] )
@menu_item[2].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_QUIT[0] )
@menu_item[3].bitmap = Cache.system ( DeadlyDan_Title::IMAGE_CREDITS[1] )

end

end

end

def play_title_music
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end

def confirm_player_location
if $data_system.start_map_id == 0
print "Player start point not set."
exit
end
end

def command_new_game
confirm_player_location
Sound.play_decision
$game_party.setup_starting_members
$game_map.setup ( $data_system.start_map_id )
$game_player.moveto ( $data_system.start_x, $data_system.start_y )
$game_player.refresh
$scene = Scene_Map.new
RPG::BGM.fade ( 1500 )
Graphics.fadeout ( 60 )
Graphics.wait ( 40 )
Graphics.frame_count = 0
RPG::BGM.stop
$game_map.autoplay
end

def command_continue
if @continue_enabled
Sound.play_decision
$scene = Scene_File.new ( false, true, false )
else
Sound.play_buzzer
end
end

def command_shutdown
Sound.play_decision
RPG::BGM.fade ( 800 )
RPG::BGS.fade ( 800 )
RPG::ME.fade ( 800 )
$scene = nil
end

def command_credits
confirm_player_location
Sound.play_decision
$game_party.setup_starting_members
$game_map.setup ( $data_system.start_map_id )
$game_player.moveto ( $data_system.start_x, $data_system.start_y )
$game_player.refresh
$scene = Scene_Map.new
RPG::BGM.fade ( 1500 )
Graphics.fadeout ( 60 )
Graphics.wait ( 40 )
Graphics.frame_count = 0
RPG::BGM.stop
$game_map.autoplay
end

def battle_test
load_bt_database
create_game_objects
Graphics.frame_count = 0
$game_party.setup_battle_test_members
$game_troop.setup ( $data_system.test_troop_id )
$game_troop.can_escape = true
$game_system.battle_bgm.play
snapshot_for_background
$scene = Scene_Battle.new
end
end


__________________________
[Show/Hide] VX Project

Story - 85%
Database - 55%
Scripts - 90%
Maps - 8%
Graphics - 38%
Original Music - 20%
Go to the top of the page
 
+Quote Post
   

3 Pages V   1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th May 2013 - 10:21 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker