A little Message from the Author

Hello Everyone! Listed below are some valuable scripts that you can use in your rpg games. Note that I did not made this scripts. They are simply scripts that are distributed in the internet that I had gathered here. Please give credits to the author of this scripts if you intend to use them in your rpg maker project. Hope you enjoy making your game!

Click the Title of the script to view the script's content.

_______________________________________________RPG Maker VX Scripts Collections________________________________________

Customize Screen Menu


This script changes how the screen menu will be shown to you in a circular manner.


Start copying here:


=begin
Script Criado por DouglasMF das comunidades VilaMakers Online e RPG Maker Brasil
Com base no script Ring Menu feito por XRXS, Dubealex e Hypershadow180

-- Instru��es --
Para instalar este script coloque ele entre os scripts Main e Scene_Cameover

=end
#==============================================================================
# Scene_Menu
#------------------------------------------------------------------------------
# Esta classe controla o conjunto de objetos que forma o RingMenu
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # Inicializa
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # Inicia os objetos do menu
  #--------------------------------------------------------------------------
  def start
    super
    @spriteset = Spriteset_Map.new
    @gold_window = Window_Gold.new(0, 360)
    @win_local = Window_Local.new(0,0)
    @status_window = Window_MenuStatus.new(160, 0)
    px = $game_player.screen_x - 16
    py = $game_player.screen_y - 28
    @ring_menu = Window_RingMenu_Comando.new(px,py)
    @status_window.z = @ring_menu.z + 20
    @status_window.visible = false
  end
  #--------------------------------------------------------------------------
  # Fexa os objetos do menu
  #--------------------------------------------------------------------------
  def terminate
    super
    @spriteset.dispose
    @ring_menu.dispose
    @gold_window.dispose
    @win_local.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # Atualiza os objetos do menu
  #--------------------------------------------------------------------------
  def update
    super
    @ring_menu.update
    @gold_window.update
    @win_local.update
    @spriteset.update
    @status_window.update
    if @ring_menu.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # Atualiza o comando e a sele��o do menu
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @ring_menu.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @ring_menu.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @ring_menu.indice
      when 0
        $scene = Scene_Item.new
      when 1,2,3
        start_actor_selection
      when 4
        $scene = Scene_File.new(true, false, false)
      when 5
        $scene = Scene_End.new
      end
    end
    if Input.trigger?(Input::UP) or  Input.trigger?(Input::LEFT)
      Sound.play_cursor
      @ring_menu.girar(3)
      return
    end
    if Input.trigger?(Input::DOWN) or  Input.trigger?(Input::RIGHT)
      Sound.play_cursor
      @ring_menu.girar(4)
      return
    end
  end
  #--------------------------------------------------------------------------
  # Inicia a sele��o de personagem
  #--------------------------------------------------------------------------
  def start_actor_selection
    @ring_menu.active = false
    @status_window.visible = true
    @status_window.active = true
    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
  #--------------------------------------------------------------------------
  # Finaliza a sele��o de personagens
  #--------------------------------------------------------------------------
  def end_actor_selection
    @ring_menu.active = true
    @status_window.active = false
    @status_window.visible = false
    @status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # Atualiza a sele��o de personagens
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @ring_menu.indice
      when 1
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end

#==============================================================================
# Window_RingMenu_Comando
#------------------------------------------------------------------------------
# Esta classe cria o ring menu.
#==============================================================================

class Window_RingMenu_Comando < Window_Base
 
  DurIni = 30
  DurMov = 15
  RaioAnel = 64
  ModoIni = 1
  ModoEsp = 2
  ModoMD = 3
  ModoME = 4
  SE_Inicio = ""
 
  attr_accessor :indice
  #--------------------------------------------------------------------------
  # Inicia o objeto
  #--------------------------------------------------------------------------
  def initialize(centro_x,centro_y)
    super(0, 0, 544, 416)
    self.opacity = 0
    self.contents.font.size = 16
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @item_name = [s1,s2,s3,s4,s5,s6]
    @item_max = 6
    @item_icon = [144,128,40,137,149,112]
    @item_hab = [true,true,true,true,true,true]
    @indice = 0
    @cx = centro_x - 12
    @cy = centro_y - 12
    inicia_menu
    refresh
  end
  #--------------------------------------------------------------------------
  # Atualiza o objeto
  #--------------------------------------------------------------------------
  def update
    super
    refresh
  end
  #--------------------------------------------------------------------------
  # Atualiza o objeto
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    case @modo
    when ModoIni
      refresh_inicio
    when ModoEsp
      refresh_espera
    when ModoMD
      refresh_mover(1)
    when ModoME
      refresh_mover(0)
    end
    sw = self.contents.width
    rect = Rect.new((@cx - ((sw-32)/2))+12, @cy - 40, sw-32, 32)
    self.contents.draw_text(rect, @item_name[@indice],1)
  end
  #--------------------------------------------------------------------------
  # Abre o menu
  #--------------------------------------------------------------------------
  def refresh_inicio
    d1 = 2.0 * Math::PI / @item_max
    d2 = 1.0 * Math::PI / DurIni
    r = RaioAnel - 1.0 * RaioAnel * @passos / DurIni
    for i in 0...@item_max
      j = i - @indice
      d = d1 * j + d2 * @passos
      x = @cx + ( r * Math.sin( d ) ).to_i
      y = @cy - ( r * Math.cos( d ) ).to_i
      desenha_item(x, y, i)
    end
    @passos -= 1
    if @passos < 1
      @modo = ModoEsp
    end
  end
  #--------------------------------------------------------------------------
  # Atualiza o menu
  #--------------------------------------------------------------------------
  def refresh_espera
    d = 2.0 * Math::PI / @item_max
    for i in 0...@item_max
      j = i - @indice
      x = @cx + ( RaioAnel * Math.sin( d * j ) ).to_i
      y = @cy - ( RaioAnel * Math.cos( d * j ) ).to_i
      desenha_item(x, y, i)
    end
  end
  #--------------------------------------------------------------------------
  # Movimenta o menu
  #--------------------------------------------------------------------------
  def refresh_mover(modo)
    d1 = 2.0 * Math::PI / @item_max
    d2 = d1 / DurMov
    d2 *= -1 if modo != 0
    for i in 0...@item_max
      j = i - @indice
      d = d1 * j + d2 * @passos
      x = @cx + ( RaioAnel * Math.sin( d ) ).to_i
      y = @cy - ( RaioAnel * Math.cos( d ) ).to_i
      desenha_item(x, y, i)
    end
    @passos -= 1
    if @passos < 1
      @modo = ModoEsp
    end
  end
  #--------------------------------------------------------------------------
  # Desenha o icone
  #--------------------------------------------------------------------------
  def desenha_item(x, y, i)
    if @indice == i
      self.cursor_rect.set(x-4, y-4, 32, 32)
      draw_icon(@item_icon[i], x, y, @item_hab[i])
    else
      draw_icon(@item_icon[i], x, y, @item_hab[i])
    end
  end
  #--------------------------------------------------------------------------
  # Inicia o menu
  #--------------------------------------------------------------------------
  def inicia_menu
    @modo = ModoIni
    @passos = DurIni
    if  SE_Inicio != nil and SE_Inicio != ""
      Audio.se_play("Audio/SE/" + SE_Inicio, 80, 100)
    end
  end
  #--------------------------------------------------------------------------
  # Gira o menu
  #--------------------------------------------------------------------------
  def girar(modo)
    if modo == ModoMD
      @indice -= 1
      @indice = @item_hab.size - 1 if @indice < 0
    elsif modo == ModoME
      @indice += 1
      @indice = 0 if @indice >= @item_hab.size
    else
      return
    end
    @modo = modo
    @passos = DurMov
  end
 
end

#==============================================================================
# Scene_Title
#------------------------------------------------------------------------------
# Faz modifica��es nescessarias para a exibi��o do nome do mapa
#==============================================================================

class Scene_Title
  alias load_database_old load_database
  def load_database
    load_database_old
    $data_mapinfo = load_data("Data/MapInfos.rvdata")
  end
end

#==============================================================================
# Window_Local
#------------------------------------------------------------------------------
# Cria a janela responsavel pela exibi��o do nome do mapa
#==============================================================================

class Window_Local < Window_Base
  #--------------------------------------------------------------------------
  # Inicia o objeto
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 160, 96)
    refresh
  end
  #--------------------------------------------------------------------------
  # Atualiza o objeto
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120, 32, "Local:")
    self.contents.font.color = system_color
    self.contents.draw_text(4, 32, 120, 32, $data_mapinfo[$game_map.map_id].name, 2)
  end
end