Jump to content
Rafael Black

HK's Scripts to VXAce and other scripts [Conversion]

Recommended Posts

Does anyone know where I can get a copy of the HK VS Custom Menu for ace?

 

#==============================================================================#
# ** HK - Custom Menu
#------------------------------------------------------------------------------#
# ** Created by    : Hanzo Kimura
# ** Rewritten by  : IceDragon
# ** Script-Status : ReWrite (Menu)
# ** Script-Type   : ?????
# ** Date Created  : ??/??/????
# ** Date Modified : 11/21/2010
# ** Version       : 1.0
#------------------------------------------------------------------------------#
#==============================================================================#
# ** INTRODUCTION
#------------------------------------------------------------------------------#
# IceDragon :
# >.> Ah...
#
#------------------------------------------------------------------------------#
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
    @bounce_count = 0
    @fade_out = 105 #Command Fade Out Integer
    @wait_frame = 0 #Wait Frame Count
    @system_items = 3 #System Menu Item List
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_bg
    create_command_window
    @gold_window = Window_Gold.new(0, 430)
    @status_window = Window_MenuStatus.new(640, 0)#280
    @status_window.opacity = 0
    @gold_window.opacity = 0
    x = 400
    y = 5
    @boxsprites = {}
    @health_windows = {}
    @actor_windows = {}
    win_spacing = 115
    for i in 0..$game_party.members.size
      mem = $game_party.members
      next if mem == nil
      @health_windows = Window_Health.new(mem, 530, 30 + (i * win_spacing))
      @boxsprites = Sprite.new
      @boxsprites.bitmap = Cache.system("MenuActorBG#{i + 1}")
      @boxsprites.blend_type = 0
      @boxsprites.x = x
      @boxsprites.y = 15 + y + (i * win_spacing)
      @actor_windows = VS_Window_Actor.new(mem, i, x, 40 + y + (i * win_spacing))
    end
    @menu1 = Sprite.new
    @menu1.bitmap = Cache.system("MenuItem-Tools")
    @menu1.blend_type = 0
    @menu1.x = -100
    @menu1.y = 80
    @menu1.opacity = 155
    @menu1.tone = Tone.new(0, 0, 0, 255)
    @menu2 = Sprite.new
    @menu2.bitmap = Cache.system("MenuItem-Party")
    @menu2.blend_type = 0
    @menu2.x = -100
    @menu2.y = 110
    @menu2.opacity = 155
    @menu2.tone = Tone.new(0, 0, 0, 255)
    @menu3 = Sprite.new
    @menu3.bitmap = Cache.system("MenuItem-System")
    @menu3.blend_type = 0
    @menu3.x = -100
    @menu3.y = 140
    @menu3.opacity = 155
    @menu3.tone = Tone.new(0, 0, 0, 255)
    @menu4 = Sprite.new
    @menu4.bitmap = Cache.system("MenuItem-Data")
    @menu4.blend_type = 0
    @menu4.x = -100
    @menu4.y = 170
    @menu4.opacity = 155
    @menu4.tone = Tone.new(0, 0, 0, 255)
    @menu5 = Sprite.new
    @menu5.bitmap = Cache.system("MenuItem-Exit")
    @menu5.blend_type = 0
    @menu5.x = -100
    @menu5.y = 200
    @menu5.tone = Tone.new(0, 0, 0, 255)
    @menu5.opacity = 155
    #TOOLS GRAPHICS
    @tools1 = Sprite.new
    @tools1.bitmap = Cache.system("MenuTools-Items")
    @tools1.blend_type = 0
    @tools1.opacity = 0
    @tools1.x = 50
    @tools1.y = 100
    @tools1.tone = Tone.new(0, 0, 0, 255)
    @tools2 = Sprite.new
    @tools2.bitmap = Cache.system("MenuTools-Mob")
    @tools2.blend_type = 0
    @tools2.opacity = 0
    @tools2.x = 50
    @tools2.y = 120
    @tools2.tone = Tone.new(0, 0, 0, 255)
    #PARTY GRAPHICS
    @party1 = Sprite.new
    @party1.bitmap = Cache.system("MenuParty-Skills")
    @party1.blend_type = 0
    @party1.opacity = 0
    @party1.x = 50
    @party1.y = 140
    @party1.tone = Tone.new(0, 0, 0, 255)
    @party2 = Sprite.new
    @party2.bitmap = Cache.system("MenuParty-Equipment")
    @party2.blend_type = 0
    @party2.opacity = 0
    @party2.x = 50
    @party2.y = 160
    @party2.tone = Tone.new(0, 0, 0, 255)
    @party3 = Sprite.new
    @party3.bitmap = Cache.system("MenuParty-Status")
    @party3.blend_type = 0
    @party3.opacity = 0
    @party3.x = 50
    @party3.y = 180
    @party3.tone = Tone.new(0, 0, 0, 255)
    @party4 = Sprite.new
    @party4.bitmap = Cache.system("MenuParty-Organize")
    @party4.blend_type = 0
    @party4.opacity = 0
    @party4.x = 50
    @party4.y = 200
    @party4.tone = Tone.new(0, 0, 0, 255)
    #SYSTEM GRAPHICS
    @system1 = Sprite.new
    @system1.bitmap = Cache.system("MenuSystem-Quest")
    @system1.blend_type = 0
    @system1.opacity = 0
    @system1.x = 50
    @system1.y = 160
    @system1.tone = Tone.new(0, 0, 0, 255)
    @system2 = Sprite.new
    @system2.bitmap = Cache.system("MenuSystem-SkillTree")
    @system2.blend_type = 0
    @system2.opacity = 0
    @system2.x = 50
    @system2.y = 180
    @system2.tone = Tone.new(0, 0, 0, 255)
    @system3 = Sprite.new
    @system3.bitmap = Cache.system("MenuSystem-Spirits")
    @system3.blend_type = 0
    @system3.opacity = 0
    @system3.x = 50
    @system3.y = 200
    @system3.tone = Tone.new(0, 0, 0, 255)
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def create_menu_bg
    @menubg = Sprite.new
    @menubg.bitmap = Cache.system("MenuBG")
    @menubg.opacity = 235
    @menubg.z = -1
    @menumain = Sprite.new
    @menumain.bitmap = Cache.system("MenuMain")
    @menumain.y = -60
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.z = -2
    update_menu_background
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    @menubg.dispose
    for hwin in @health_windows.values
      next if hwin == nil
      hwin.dispose
      hwin = nil
    end  
    @health_windows.clear
    @health_windows = {}
    @command_window.dispose
    @tools_command.dispose
    @tools1.dispose
    @tools2.dispose
    @party_command.dispose
    @party1.dispose
    @party2.dispose
    @party3.dispose
    @party4.dispose
    @system_command.dispose
    @gold_window.dispose
    @status_window.dispose
    @menumain.dispose
    @menuback_sprite.dispose
    for acwin in @actor_windows.values
      next if acwin == nil
      acwin.dispose
      acwin = nil
    end  
    @actor_windows.clear
    @actor_windows = {}
    for bxspr in @boxsprites.values
      next if bxspr == nil
      bxspr.dispose
      bxspr = nil
    end
    @boxsprites.clear
    @boxsprites = {}
    @menu1.dispose
    @menu2.dispose
    @menu3.dispose
    @menu4.dispose
    @menu5.dispose
    @system1.dispose
    @system2.dispose
    @system3.dispose
  end
 
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = "Tools"
    s2 = "Party"
    s3 = "System"
    s4 = "Data"
    s5 = "Exit"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])
    @command_window.index = @menu_index
    @command_window.y = 100
    @command_window.x = 20 + 640
    @command_window.opacity = 0
    s1 = "Item Bag"
    s2 = "Monster Dictionary"
    tools_item = [s1]
    if $game_switches[9] == true #Monster Dictionary Enabled?
      tools_item += [s2] #Add Monster Dictionary in Menu
    end
    @tools_command = Window_Command.new(160, tools_item)
    @tools_command.y = 100
    @tools_command.x = 20 + 160 + 640
    @tools_command.opacity = 0
    @tools_command.active = false
    s1 = "Skills"
    s2 = "Equipment"
    s3 = "View Status"
    s4 = "Organize"
    party_item = [s1,s2,s3]
    if $game_switches[10] == true #Organize Enabled?
      party_item += [s4] #Add Organize in Menu
    end
    @party_command = Window_Command.new(160, party_item)
    @party_command.y = 100+ 50
    @party_command.x = 20 + 160 + 640
    @party_command.opacity = 0
    @party_command.active = false
    s1 = "Quest List"
    s2 = "Skill Tree"
    s3 = "Spirits"
    system_item = []
    #SYSTEM FEATURES
    if $game_switches[14] == true #Quest List Enabled?
      system_item += [s1] #Add Quest List in Menu
    end
    if $game_switches[12] == true #Skill Tree Enabled?
      system_item += [s2] #Add Skill Tree in Menu
    end
    if $game_switches[13] == true #Spirits Enabled?
      system_item += [s3] #Add Spirits in Menu
    end
    @system_command = Window_Command.new(160, system_item)
    @system_command.y = 100+ 50 + 100
    @system_command.x = 20 + 160 + 640
    @system_command.opacity = 0
    @system_command.active = false
  end
 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    for hwin in @health_windows.values
      next if hwin == nil
      hwin.update
    end
    @command_window.update
    update_menu_background
    @gold_window.update
    @status_window.update
    @tools_command.update
    @party_command.update
    @system_command.update
    #Character Boxes Flash Update
    for bxspr in @boxsprites.values
      next if bxspr == nil
      bxspr.update
    end  
    if @menumain.y != 0 #Main Menu Logo Animate Position
      @menumain.y += 5
    end
    main_menu_intro #Intro Animation for Main Menu "menu#s"
    #Update Flash Animation of Main Commands
    @menu1.update
    @menu2.update
    @menu3.update
    @menu4.update
    @menu5.update
    #Update Flash Animation of Party Commands
    @party1.update
    @party2.update
    @party3.update
    @party4.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    elsif @tools_command.active
      update_tools_selection
    elsif @party_command.active
      update_party_selection
    elsif @system_command.active
      update_system_selection
      end
    end
  #--------------------------------------------------------------------------
  # H A N Z O  - M A I N  M E N U  I N T R O
  #--------------------------------------------------------------------------  
  def main_menu_intro
    if @menu1.x != 30
      @menu1.x += 10
      @menu2.x += 10
      @menu3.x += 10
      @menu4.x += 10
      @menu5.x += 10
    end
  end

  #--------------------------------------------------------------------------
  # H A N Z O  - A C T O R   S E L E C T I O N   R E S E T
  #--------------------------------------------------------------------------
  def actor_selection_reset
    #ACTOR SELECTION RESET
    for bxspr in @boxsprites.values
      next if bxspr == nil
      bxspr.blend_type = 0
    end
    increase_x = 5
    for key in @actor_windows.keys
      acwin = @actor_windows[key]
      next if acwin == nil
      if acwin.x != 270 and acwin.x > 270
        acwin.x -= increase_x
        @boxsprites[key].x -= increase_x
      elsif acwin.x != 270 and acwin.x < 270
        acwin.x += increase_x
        @boxsprites[key].x += increase_x
      end  
    end  
    #END ACTOR SELECTION RESET
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    actor_selection_reset #Reset Status Window Y Position
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 3
        Sound.play_buzzer
        return
      end
      case @command_window.index
      when 0    # TOOLS SELECTION
        Sound.play_decision
        @menu1.flash(Color.new(255,255,255), 20) #Menu Command Flash Animation
        @command_window.active = false
        @tools_command.active = true
      when 1  # PARTY SELECTION
        Sound.play_decision
        @menu2.flash(Color.new(255,255,255), 20) #Menu Command Flash Animation
        @command_window.active = false
        @party_command.active = true
      when 2      # SYSTEM SELECTION
    if $game_switches[11] == true
      @system_items = 3 #Reset System Item
        if $game_switches[14] == true #Quest List Enabled
      @system_items += 1
       end
       if $game_switches[13] == true #Spirits Enabled
      @system_items += 1
       end
       if $game_switches[12] == true #Skill Tree Enabled
      @system_items += 1
       end
        @menu3.flash(Color.new(255,255,255), 20) #Menu Command Flash Animation
        Sound.play_decision
        @command_window.active = false
        @system_command.active = true
      elsif $game_switches[11] == false
        Sound.play_buzzer
      end
      when 3 # DATA SELECTION
      if $game_system.save_disabled == false
        Sound.play_decision
        @menu4.flash(Color.new(255,255,255), 20) #Menu Command Flash Animation
        $scene = Scene_File.new(true, false, false)
      else
        Sound.play_buzzer
      end
      when 4      # EXIT SELECTION
        Sound.play_decision
        @menu5.flash(Color.new(255,255,255), 20) #Menu Command Flash Animation
        $scene = Scene_Map.new
      end
    end
    #Graphics UPDATE
    main_command_update #UPDATES the Main Command Opacities
    #TOOLS COMMAND GRAPHICS HIDE
     @tools1.opacity = 0
     @tools2.opacity = 0
    #PARTY COMMAND GRAPHICS HIDE
     @party1.opacity = 0
     @party2.opacity = 0
     @party3.opacity = 0
     @party4.opacity = 0
    #SYSTEM COMMANDS HIDE
     @system1.opacity = 0
     @system2.opacity = 0
     @system3.opacity = 0
    #MAIN COMMAND GRAPHICS UPDATE for update_command_selection
    y_inc = 5
    if @menu1.y != 80 && @menu1.y < 80
       @menu1.y += y_inc
     elsif @menu1.y != 80 && @menu1.y > 80
       @menu1.y -= y_inc
     end
    if @menu2.y != 110 && @menu2.y < 110
       @menu2.y += y_inc
     elsif @menu2.y != 110 && @menu2.y > 110
       @menu2.y -= y_inc
     end
    if @menu3.y != 140 && @menu3.y < 140
       @menu3.y += y_inc
     elsif @menu3.y != 140 && @menu3.y > 140
       @menu3.y -= y_inc
     end
    if @menu4.y != 170 && @menu4.y < 170
       @menu4.y += y_inc
     elsif @menu1.y != 170 && @menu4.y > 170
       @menu4.y -= y_inc
     end
    if @menu5.y != 200 && @menu5.y < 200
       @menu5.y += y_inc
     elsif @menu5.y != 200 && @menu5.y > 200
       @menu5.y -= y_inc
     end
   end
  #--------------------------------------------------------------------------
  # H A N Z O  - M A I N   C O M M A N D   U P D A T E
  #--------------------------------------------------------------------------   
  def main_command_update
     fade_speed = 10
     case @command_window.index
     when 0
       if @menu1.opacity != 255 #Active Menu Fade IN Animation
         @menu1.opacity += fade_speed
         end
       @menu1.blend_type = 1
       @menu1.tone = Tone.new(0, 0, 0, 0)
       @menu2.tone = Tone.new(0, 0, 0, 255)
       @menu3.tone = Tone.new(0, 0, 0, 255)
       @menu4.tone = Tone.new(0, 0, 0, 255)
       @menu5.tone = Tone.new(0, 0, 0, 255)
       @menu2.blend_type = 0
       @menu3.blend_type = 0
       @menu4.blend_type = 0
       @menu5.blend_type = 0
       if @menu2.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu2.opacity -= fade_speed
        end
       if @menu3.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu3.opacity -= fade_speed
        end
       if @menu4.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu4.opacity -= fade_speed
        end
       if @menu5.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu5.opacity -= fade_speed
        end
     when 1
       if @menu2.opacity != 255 #Active Menu Fade IN Animation
         @menu2.opacity += fade_speed
         end
       @menu2.blend_type = 1
       @menu2.tone = Tone.new(0, 0, 0, 0)
       @menu1.tone = Tone.new(0, 0, 0, 255)
       @menu3.tone = Tone.new(0, 0, 0, 255)
       @menu4.tone = Tone.new(0, 0, 0, 255)
       @menu5.tone = Tone.new(0, 0, 0, 255)
       @menu1.blend_type = 0
       @menu3.blend_type = 0
       @menu4.blend_type = 0
       @menu5.blend_type = 0
       if @menu1.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu1.opacity -= fade_speed
        end
       if @menu3.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu3.opacity -= fade_speed
        end
       if @menu4.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu4.opacity -= fade_speed
        end
       if @menu5.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu5.opacity -= fade_speed
        end
     when 2
       if @menu3.opacity != 255 #Active Menu Fade IN Animation
         @menu3.opacity += fade_speed
         end
       @menu3.blend_type = 1
      if $game_switches[11] == true #if System is Enabled
       @menu3.tone = Tone.new(0, 0, 0, 0)
       end
       @menu2.tone = Tone.new(0, 0, 0, 255)
       @menu1.tone = Tone.new(0, 0, 0, 255)
       @menu4.tone = Tone.new(0, 0, 0, 255)
       @menu5.tone = Tone.new(0, 0, 0, 255)
       @menu2.blend_type = 0
       @menu1.blend_type = 0
       @menu4.blend_type = 0
       @menu5.blend_type = 0
       if @menu2.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu2.opacity -= fade_speed
        end
       if @menu1.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu1.opacity -= fade_speed
        end
       if @menu4.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu4.opacity -= fade_speed
        end
       if @menu5.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu5.opacity -= fade_speed
        end
     when 3
       if @menu4.opacity != 255 #Active Menu Fade IN Animation
         @menu4.opacity += fade_speed
         end
       @menu4.blend_type = 1
       if $game_system.save_disabled == false #If Saving is Available
       @menu4.tone = Tone.new(0, 0, 0, 0)
      end
       @menu2.tone = Tone.new(0, 0, 0, 255)
       @menu3.tone = Tone.new(0, 0, 0, 255)
       @menu1.tone = Tone.new(0, 0, 0, 255)
       @menu5.tone = Tone.new(0, 0, 0, 255)
       @menu2.blend_type = 0
       @menu3.blend_type = 0
       @menu4.blend_type = 1
       @menu1.blend_type = 0
       if @menu2.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu2.opacity -= fade_speed
        end
       if @menu3.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu3.opacity -= fade_speed
        end
       if @menu1.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu1.opacity -= fade_speed
        end
       if @menu5.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu5.opacity -= fade_speed
        end
     when 4
       if @menu5.opacity != 255 #Active Menu Fade IN Animation
         @menu5.opacity += fade_speed
         end
       @menu5.blend_type = 1
       @menu5.tone = Tone.new(0, 0, 0, 0)
       @menu2.tone = Tone.new(0, 0, 0, 255)
       @menu3.tone = Tone.new(0, 0, 0, 255)
       @menu4.tone = Tone.new(0, 0, 0, 255)
       @menu1.tone = Tone.new(0, 0, 0, 255)
       @menu2.blend_type = 0
       @menu3.blend_type = 0
       @menu4.blend_type = 0
       @menu5.blend_type = 1
       if @menu2.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu2.opacity -= fade_speed
        end
       if @menu3.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu3.opacity -= fade_speed
        end
       if @menu4.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu4.opacity -= fade_speed
        end
       if @menu1.opacity != @fade_out #Inactive Menu Fade OUT Animation
       @menu1.opacity -= fade_speed
        end
      end
    end
  #--------------------------------------------------------------------------
  # H A N Z O  - U P D A T E   T O O L S   S E L E C T I O N
  #--------------------------------------------------------------------------
  def update_tools_selection
    main_command_update #UPDATES the Main Command Opacities
    #MAIN COMMAND GRAPHICS UPDATE for update_tools_selection
    multiple = 1
    y = 20
    y_inc = 5
    if $game_switches[9] == true #Monster Dictionary Enabled
      multiple = 2
      end
    if @menu2.y != y*multiple+110 && @menu2.y < y*multiple+110
       @menu2.y += y_inc
       @menu3.y += y_inc
       @menu4.y += y_inc
       @menu5.y += y_inc
     elsif @menu2.y != y*multiple+110 && @menu2.y > y*multiple+110
       @menu2.y -= y_inc
       @menu3.y -= y_inc
       @menu4.y -= y_inc
       @menu5.y -= y_inc
     end
    #TOOLS COMMAND GRAPHICS UPDATE
    case @tools_command.index
     when 0
       @tools1.opacity = 255
       @tools1.blend_type = 1
       @tools1.tone = Tone.new(0, 0, 0, 0)
       if $game_switches[9] == true #Monster Dictionary Enabled
       @tools2.tone = Tone.new(0, 0, 0, 255)
       @tools2.opacity = 155
       @tools2.blend_type = 0
     end
     end
     if $game_switches[9] == true #Monster Dictionary Enabled
    case @tools_command.index
     when 1
       @tools2.opacity = 255
       @tools2.blend_type = 1
       @tools2.tone = Tone.new(0, 0, 0, 0)
       @tools1.tone = Tone.new(0, 0, 0, 255)
       @tools1.opacity = 155
       @tools1.blend_type = 0
     end
   end
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @command_window.active = true
      @tools_command.active = false
    elsif Input.trigger?(Input::C)
      Sound.play_decision
    case @tools_command.index
     when 0 #Item Scene Selected
      $scene = Scene_Item.new
     when 1 #Monster Dictionary Selected
      print "Not yet Implemented"
     end
   end
  end
  #--------------------------------------------------------------------------
  # H A N Z O  - U P D A T E   P A R T Y  S E L E C T I O N
  #--------------------------------------------------------------------------
  def update_party_selection
    main_command_update #UPDATES the Main Command Opacities
    actor_selection_reset #Reset Status Window Y Position
    #MAIN COMMAND GRAPHICS UPDATE for update_party_selection
    multiple = 5
    y = 20
    y_inc = 10
    if $game_switches[10] == true #Monster Dictionary Enabled
      multiple = 6
      end
    if @menu3.y != y*multiple+110 && @menu3.y < y*multiple+110
       @menu3.y += y_inc
       @menu4.y += y_inc
       @menu5.y += y_inc
     elsif @menu3.y != y*multiple+110 && @menu3.y > y*multiple+110
       @menu3.y -= y_inc
       @menu4.y -= y_inc
       @menu5.y -= y_inc
     end
    #PARTY COMMAND GRAPHICS UPDATE
    case @party_command.index
     when 0
       @party1.opacity = 255
       @party1.blend_type = 1
       @party1.tone = Tone.new(0, 0, 0, 0)
       @party2.tone = Tone.new(0, 0, 0, 255)
       @party2.opacity = 155
       @party2.blend_type = 0
       @party3.tone = Tone.new(0, 0, 0, 255)
       @party3.opacity = 155
       @party3.blend_type = 0
       if $game_switches[10] == true #Organize Enabled
       @party4.tone = Tone.new(0, 0, 0, 255)
       @party4.opacity = 155
       @party4.blend_type = 0
     end
     when 1
       @party2.opacity = 255
       @party2.blend_type = 1
       @party2.tone = Tone.new(0, 0, 0, 0)
       @party1.tone = Tone.new(0, 0, 0, 255)
       @party1.opacity = 155
       @party1.blend_type = 0
       @party3.tone = Tone.new(0, 0, 0, 255)
       @party3.opacity = 155
       @party3.blend_type = 0
       if $game_switches[10] == true #Organize Enabled
       @party4.tone = Tone.new(0, 0, 0, 255)
       @party4.opacity = 155
       @party4.blend_type = 0
     end
     when 2
       @party3.opacity = 255
       @party3.blend_type = 1
       @party3.tone = Tone.new(0, 0, 0, 0)
       @party2.tone = Tone.new(0, 0, 0, 255)
       @party2.opacity = 155
       @party2.blend_type = 0
       @party1.tone = Tone.new(0, 0, 0, 255)
       @party1.opacity = 155
       @party1.blend_type = 0
       if $game_switches[10] == true #Organize Enabled
       @party4.tone = Tone.new(0, 0, 0, 255)
       @party4.opacity = 155
       @party4.blend_type = 0
     end
   end #CASE END
     if $game_switches[10] == true #Organize Enabled
    case @party_command.index
     when 3
       @party4.opacity = 255
       @party4.blend_type = 1
       @party4.tone = Tone.new(0, 0, 0, 0)
       @party3.tone = Tone.new(0, 0, 0, 255)
       @party3.opacity = 155
       @party3.blend_type = 0
       @party2.tone = Tone.new(0, 0, 0, 255)
       @party2.opacity = 155
       @party2.blend_type = 0
       @party1.tone = Tone.new(0, 0, 0, 255)
       @party1.opacity = 155
       @party1.blend_type = 0
     end
   end
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @command_window.active = true
      @party_command.active = false
    elsif Input.trigger?(Input::C)
      Sound.play_decision
    case @party_command.index
     when 0 #Skill Selected
       @party_menu = 1
      start_actor_selection
     when 1 #Equip Selected
       @party_menu = 2
      start_actor_selection
     when 2 #Status Selected
       @party_menu = 3
      start_actor_selection
     when 3
      print "Not yet Implemented"
     end #END CASE
   end #IF END
  end #DEFINITION END
  #--------------------------------------------------------------------------
  # H A N Z O  - U P D A T E   S Y S T E M   S E L E C T I O N
  #--------------------------------------------------------------------------
  def update_system_selection
    main_command_update #UPDATES the Main Command Opacities
    actor_selection_reset #Reset Status Window Y Position
    #MAIN COMMAND GRAPHICS UPDATE for update_system_selection
    y = 20
    y_inc = 10
    if @menu4.y != y*@system_items+110 && @menu4.y < y*@system_items+110
       @menu4.y += y_inc
       @menu5.y += y_inc
     elsif @menu4.y != y*@system_items+110 && @menu4.y > y*@system_items+110
       @menu4.y -= y_inc
       @menu5.y -= y_inc
     end
    #SYSTEM COMMAND GRAPHICS UPDATE
    case @system_command.index
     when 0
       if $game_switches[14] == true #Quest Enabled
       @system1.tone = Tone.new(0, 0, 0, 0)
       @system1.opacity = 255
       @system1.blend_type = 1
       end
       if $game_switches[12] == true #Skill Tree Enabled
       @system2.tone = Tone.new(0, 0, 0, 255)
       @system2.opacity = 155
       @system2.blend_type = 0
       end
       if $game_switches[13] == true #Spirits Enabled
       @system3.tone = Tone.new(0, 0, 0, 255)
       @system3.opacity = 155
       @system3.blend_type = 0
       end
     when 1
       if $game_switches[14] == true #Quest Enabled
       @system1.tone = Tone.new(0, 0, 0, 255)
       @system1.opacity = 155
       @system1.blend_type = 0
       end
       if $game_switches[12] == true #Skill Tree Enabled
       @system2.tone = Tone.new(0, 0, 0, 0)
       @system2.opacity = 255
       @system2.blend_type = 1
       end
       if $game_switches[13] == true #Spirits Enabled
       @system3.tone = Tone.new(0, 0, 0, 255)
       @system3.opacity = 155
       @system3.blend_type = 0
       end
     when 2
       if $game_switches[14] == true #Quest Enabled
       @system1.tone = Tone.new(0, 0, 0, 255)
       @system1.opacity = 155
       @system1.blend_type = 0
       end
       if $game_switches[12] == true #Skill Tree Enabled
       @system2.tone = Tone.new(0, 0, 0, 255)
       @system2.opacity = 155
       @system2.blend_type = 0
       end
       if $game_switches[13] == true #Spirits Enabled
       @system3.tone = Tone.new(0, 0, 0, 0)
       @system3.opacity = 255
       @system3.blend_type = 1
       end
   end #CASE END
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @command_window.active = true
      @system_command.active = false
    elsif Input.trigger?(Input::C)
      Sound.play_decision
    case @system_command.index
     when 0 #Quest List Selected
       print "Not yet Implemented"
     when 1 #Skill Tree Selected
       @party_menu = 4
      start_actor_selection
     when 2 #Spirits Selected
       @party_menu = 5
      start_actor_selection
     end #END CASE
   end #IF END
  end #DEFINITION END
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  def start_actor_selection
    @party_command.active = false
    @command_window.active = false
    @status_window.active = true
    $game_switches[21] = true # Default Cursor Sound Deactivate
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    case @party_menu
    when 1,2,3,4
    @party_command.active = true
    @command_window.active = false
    @status_window.active = false
    @status_window.index = -1
  end
    case @party_menu
    when 1
      @party1.flash(Color.new(255,255,255), 20)
    when 2
      @party2.flash(Color.new(255,255,255), 20)
    when 3
      @party3.flash(Color.new(255,255,255), 20)
    when 4
      @party4.flash(Color.new(255,255,255), 20)
  end
  end
  #--------------------------------------------------------------------------
  # * BOUNCE EFFECT
  #--------------------------------------------------------------------------
  def bounce_effect(index)
    slide_val = 5
    winx = 200
    case @bounce_count
    when 0
      winx = 220
    when 1
      winx = 240
    when 2
      winx = 225
    when 3
      winx = 235
    when 4
      winx = 230
    end #Case End
    if @actor_windows[index].x != winx && @actor_windows[index].x > winx
      @actor_windows[index].x -= 5
      @boxsprites[index].x -= 5
      @health_windows[index].x -= 5
    elsif @actor_windows[index].x != winx && @actor_windows[index].x < winx
      @actor_windows[index].x += 5
      @boxsprites[index].x += 5
      @health_windows[index].x += 5
    elsif @actor_windows[index].x == winx
      @bounce_count += 1 unless @bounce_count == 4
    end
  end #definition end
    
  #--------------------------------------------------------------------------
  # H A N Z O  -  P A R T Y   B O X   F L A S H
  #--------------------------------------------------------------------------    
  def party_box_flash
    if @wait_frame == 200
      @wait_frame = 0
      @boxsprites[@status_window.index].flash(Color.new(255,255,255),20)
    else
      @wait_frame += 1
    end #IF END
  end #DEFINITION END
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    party_box_flash #UPDATES the flash animation in Party Boxes
    main_command_update #UPDATES the Main Command Opacities
    #ACTOR SELECTION ANIMATION
    for acwin in @actor_windows.values
      next if acwin == nil
      acwin.update
    end  
    for key in @boxsprites.keys
      bxspr = @boxsprites[key]
      if key == @status_window.index
        bounce_effect(key)
        bxspr.blend_type = 1
      else
        bxspr.blend_type = 0
        if @actor_windows[key].x != 270 and @actor_windows[key].x > 270
          @actor_windows[key].x -= 5
          bxspr.x -= 5
        elsif @actor_windows[key].x != 270 and @actor_windows[key].x < 270
          @actor_windows[key].x += 5
          bxspr.x += 5
        end
      end  
    end  
    #---------
    if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN) or Input.trigger?(Input::B)
        @bounce_count = 0 #Reset Bounce Count
        @wait_frame = 0 #Reset Frame Count
      end
    if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
      Audio.se_play("Audio/SE/SE - Status Woosh")
      end
      #---------
    if Input.trigger?(Input::B)
      $game_switches[21] = false # Default Cursor Sound Activate
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_switches[21] = false # Default Cursor Sound Activate
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      if @party_menu == 1
        $scene = Scene_Skill.new(@status_window.index)
      elsif @party_menu == 2
        $scene = Scene_Equip.new(@status_window.index)
      elsif @party_menu == 3
        $scene = Scene_Status.new(@status_window.index)
      elsif @party_menu == 4
        if ST_setup::ST_class_assign[$game_party.members[@status_window.index].class_id] != nil
          $scene = Scene_SkillTree.new(@status_window.index)
        else
          Sound.play_buzzer
        end
      elsif @party_menu == 5
         $scene = Scene_Spirits.new(@status_window.index)
      end
    end
  end
end

#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# *** C U S T O M    W I N D O W S
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------

class VS_Window_Actor < Window_Base
 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     x : window X coordinate
  #     y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize(actor, index, x, y)
    super(x, y - 32, 410, 125)
    @actor = actor
    @act_index = index
    refresh
    self.opacity = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = 1
    party_actor = @actor #ACTOR DISPLAY
    draw_actor_face(party_actor, 2, 0, 92)
    x = 104
    y = WLH / 2
    self.contents.font.size = 13
    draw_actor_name(party_actor, x, y - 15)
    self.contents.font.size = 18
    draw_actor_class(party_actor, x, y)
    draw_actor_level(party_actor, x, y + WLH * 1)
    draw_actor_state(party_actor, x, y + WLH * 2)
    draw_actor_hp(party_actor, x + 120, y + WLH * 1)
    draw_actor_mp(party_actor, x + 120, y + WLH * 2)
  end
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# *** C U S T O M    W I N D O W S
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------

Share this post


Link to post
Share on other sites

I would advise the script be in a spoiler. It's hella tough scrolling through the whole script.

 

and instead of converting every single VS script why not just use RPGM VX?

Edited by ShinGamix
  • Like 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted