Main Menu EVO

Well i haven't posted many scripts here, only one I think, but i'm pretty proud of this one.
It has an awesome effect when going into and out of the menu. I'll be making Item/Equipment scenes etc when i have time :)

~ Notes ~

Completely Plug'n'Play, just put in a new script section above main.
Please give credit if used!

~ Screenshots ~

Image

~ Script ~

  1. #===============================================================================
  2. # * Menu System EVO
  3. # * By Crazyninjaguy
  4. # * http://www.planetdev.net
  5. #-------------------------------------------------------------------------------
  6. # * Please give credits if you use this script!
  7. #===============================================================================
  8.  
  9. class Scene_Menu < Scene_Base
  10.   def start
  11.     super
  12.     create_menu_background
  13.     create_windows
  14.   end
  15.   def update
  16.     super
  17.     @command_window.update
  18.     @status_window.update
  19.     @dummy.update
  20.     @location.update
  21.     @gold.update
  22.     if @command_window.active
  23.       update_command_selection
  24.     elsif @status_window.active
  25.       update_actor_selection
  26.     end
  27.   end
  28.   def terminate
  29.     super
  30.     dispose_menu_background
  31.     @command_window.dispose
  32.     @status_window.dispose
  33.     @dummy.dispose
  34.     @location.dispose
  35.     @gold.dispose
  36.   end
  37.   def pre_terminate
  38.     super
  39.     close_command_window
  40.   end
  41.   def create_windows
  42.     @commands = [
  43.     Vocab::item,
  44.     Vocab::skill,
  45.     Vocab::equip,
  46.     Vocab::status,
  47.     Vocab::save,
  48.     Vocab::game_end]
  49.     @dummy = Window_MenuDummy.new
  50.     @dummy.openness = 0
  51.     @dummy.open
  52.     @command_window = Window_Command.new(138, @commands)
  53.     @command_window.x = 24
  54.     @command_window.opacity = 0
  55.     @command_window.openness = 0
  56.     @command_window.open
  57.     @status_window = Window_MenuStatus.new(0, (416 - 240))
  58.     @status_window.openness = 0
  59.     @status_window.open
  60.     @location = Window_Location.new
  61.     @location.openness = 0
  62.     @location.open
  63.     @gold = Window_Gold.new((Graphics.width - 160), 56)
  64.     @gold.openness = 0
  65.     @gold.open
  66.   end
  67.   def close_command_window
  68.     @dummy.close
  69.     @status_window.close
  70.     @command_window.close
  71.     @location.close
  72.     @gold.close
  73.     begin
  74.       @dummy.update
  75.       @status_window.update
  76.       @command_window.update
  77.       @location.update
  78.       @gold.update
  79.       Graphics.update
  80.     end until @dummy.openness == 0 && @status_window.openness == 0 && @command_window.openness == 0
  81.   end
  82.   def update_command_selection
  83.     if Input.trigger?(Input::B)
  84.       Sound.play_cancel
  85.       $scene = Scene_Map.new
  86.     elsif Input.trigger?(Input::C)
  87.       if $game_party.members.size == 0 and @command_window.index < 4
  88.         Sound.play_buzzer
  89.         return
  90.       elsif $game_system.save_disabled and @command_window.index == 4
  91.         Sound.play_buzzer
  92.         return
  93.       end
  94.       Sound.play_decision
  95.       case @command_window.index
  96.       when 0      # Item
  97.         $scene = Scene_Item.new
  98.       when 1,2,3  # Skill, equipment, status
  99.         start_actor_selection
  100.       when 4      # Save
  101.         $scene = Scene_File.new(true, false, false)
  102.       when 5      # End Game
  103.         $scene = Scene_End.new
  104.       end
  105.     end
  106.   end
  107.   def update_actor_selection
  108.     if Input.trigger?(Input::B)
  109.       Sound.play_cancel
  110.       end_actor_selection
  111.     elsif Input.trigger?(Input::C)
  112.       $game_party.last_actor_index = @status_window.index
  113.       Sound.play_decision
  114.       case @command_window.index
  115.       when 1  # skill
  116.         $scene = Scene_Skill.new(@status_window.index)
  117.       when 2  # equipment
  118.         $scene = Scene_Equip.new(@status_window.index)
  119.       when 3  # status
  120.         $scene = Scene_Status.new(@status_window.index)
  121.       end
  122.     end
  123.   end
  124. end
  125.  
  126. class Window_MenuStatus < Window_Selectable
  127.   def initialize(x, y)
  128.     super(x, y, 544, 240)
  129.     refresh
  130.     self.active = false
  131.     self.index = -1
  132.   end
  133.   def refresh
  134.     self.contents.clear
  135.     @item_max = $game_party.members.size
  136.     for actor in $game_party.members
  137.       draw_actor_face(actor, (actor.index * 130) + 10, 2, 92)
  138.       x = 128
  139.       y = actor.index * 96 + WLH / 2
  140.       draw_actor_graphic(actor, (actor.index * 130) + 24, 94)
  141.       draw_actor_name(actor, actor.index * 130, 106)
  142.       draw_actor_hp(actor, (actor.index * 130), 106 + (WLH * 2), 110)
  143.       draw_actor_mp(actor, (actor.index * 130), 106 + (WLH * 3), 110)
  144.       draw_actor_level(actor, (actor.index * 130), (106 + WLH))
  145.     end
  146.   end
  147.   def item_rect(index)
  148.     rect = Rect.new((@index * 120), 0, 120, (240 - 32))
  149.     rect.width = 120
  150.     rect.height = (240 - 32)
  151.     rect.x = (@index * 120)
  152.     rect.y = 0
  153.     return rect
  154.   end
  155.   def update_cursor
  156.     if @index < 0
  157.       self.cursor_rect.empty
  158.     elsif @index == 0
  159.       self.cursor_rect.set(-5, 0, 120, (240 - 32))
  160.     elsif @index == 1
  161.       self.cursor_rect.set(125, 0, 120, (240 - 32))
  162.     elsif @index == 2
  163.       self.cursor_rect.set(255, 0, 120, (240 - 32))
  164.     elsif @index == 3
  165.       self.cursor_rect.set(385, 0, 120, (240 - 32))
  166.     end
  167.   end
  168.   def update
  169.     super
  170.     if cursor_movable?
  171.       last_index = @index
  172.       if Input.repeat?(Input::RIGHT)
  173.         if @index == 0
  174.           @index = 1
  175.         elsif @index == 1
  176.           @index = 2
  177.         elsif @index == 2
  178.           @index = 3
  179.         elsif @index == 3
  180.           @index = 0
  181.         end
  182.       elsif Input.repeat?(Input::LEFT)
  183.         if @index == 0
  184.           @index = 3
  185.         elsif @index == 1
  186.           @index = 0
  187.         elsif @index == 2
  188.           @index = 1
  189.         elsif @index == 3
  190.           @index = 2
  191.         end
  192.       end
  193.       if @index != last_index
  194.         Sound.play_cursor
  195.       end
  196.     end
  197.     update_cursor
  198.     call_update_help
  199.   end
  200. end
  201.  
  202. class Window_MenuDummy < Window_Base
  203.   def initialize
  204.     super(0, 0, 160, 176)
  205.     refresh
  206.   end
  207.   def refresh
  208.     draw_icon(144, 0, 0)
  209.     draw_icon(128, 0, 24)
  210.     draw_icon(32, 0, 48)
  211.     draw_icon(106, 0, 72)
  212.     draw_icon(176, 0, 96)
  213.     draw_icon(142, 0, 120)
  214.   end
  215. end
  216.  
  217. class Window_Location < Window_Base
  218.   def initialize
  219.     super(160, 0, (544 - 160), 56)
  220.     refresh
  221.   end
  222.   def refresh
  223.     @map = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name
  224.     self.contents.draw_text(0, 0, width - 32, WLH, "Location:")
  225.     self.contents.draw_text(0, 0, width - 32, WLH, @map, 2)
  226.   end
  227. end
Expand to see the code.
Pretty decent custom menu. It's good that we have a lot of varying menus because it gets boring when everyone starts having the same fancy-pants menus. This will be handy for a lot of people starting new projects.
Looking nice ^^
You should use the VX icon for the topic.
Thanks :)
Added the VX Icon, and updated to fix saving, it was going to the skill scene for some reason lol.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=71238