Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Variable Menu Design (VMD), A variable menu designer.
Genshyu
post Mar 26 2009, 12:48 PM
Post #1


Level 8
Group Icon

Group: Revolutionary
Posts: 118
Type: Scripter
RM Skill: Intermediate




Introduction:
This is a menu system that I designed that lets you control the menu's position, and effects simply by using variables.


Features:
You can control your menu style in game.
Variables 41 - 55 become part of the menu.

Instructions:
Make variables 41 - 55 these:
41:
Command window X.
42:
Command window Y.
43:
Command window width.
44:
Command window height.
45:
Command window effect. (See effects.)
46:
Gold window X.
47:
Gold window Y.
48:
Gold window width.
49:
Gold window height.
50:
gold window effect. (See effects.)
51:
Status window X.
52:
Status window Y.
53:
Status widnow width.
54:
Status widnow height.
55:
Status window effect. (See effects.)



[Show/Hide] Script:

CODE
=begin
Genshyu's Variable Menu Designer V1.0.



Instructions:
Make variables 41 - 55 these:
41:
Command window X.
42:
Command window Y.
43:
Command window width.
44:
Command window height.
45:
Command window effect. (See effects.)
46:
Gold window X.
47:
Gold window Y.
48:
Gold window width.
49:
Gold window height.
50:
gold window effect. (See effects.)
51:
Status window X.
52:
Status window Y.
53:
Status widnow width.
54:
Status widnow height.
55:
Status window effect. (See effects.)



Effects.

The effects determan rather the window has an opening effect.
Make the variable 1 if you want it on, if not, make it 0.








Credit.
No credit needed. Just don't claim it as your own.








The default size of the windows are:
Command window:
width: 160.
height: 178
Gold window:
width: 160.
height: 96.
Status window:
width: 384.
height: 416.




=end

class Scene_Menu < Scene_Base
  def initialize(menu_index = 0)
    @menu_index = menu_index
        @menu_index = menu_index
    @command_window_position_x = $game_variables[41]     #X position of the command window.
    @command_window_position_y = $game_variables[42]     #Y position of the command window.
    @command_window_width = $game_variables[43]          #Width of the command window.
    @command_window_height = $game_variables[44]         #Height of the command window.
    @command_window_effect = $game_variables[45]         #Determan rather it slides in or not.
    @gold_window_position_x = $game_variables[46]        #X position of the gold window.
    @gold_window_position_y = $game_variables[47]        #Y position of the gold window.
    @gold_window_width = $game_variables[48]             #Width of the gold window.
    @gold_window_height = $game_variables[49]            #Height of the gold window.
    @gold_window_effect = $game_variables[50]            #Determan rather if slides in or not.
    @status_window_position_x = $game_variables[51]      #X position of the status window.
    @status_window_position_y = $game_variables[52]      #Y position of the status window.
    @status_window_width= $game_variables[53]           #Width of the status widnow.
    @status_window_height = $game_variables[54]          #Height of the status window.
    @status_window_effect = $game_variables[55]          #Determan rather it slides in or not.
  end
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(@gold_window_position_x, @gold_window_position_y)
    @gold_window.width = @gold_window_width
    @gold_window.height = @gold_window_height
    if @gold_window_effect == 1
      @gold_window.openness = 0
      @gold_window.open
    else
      @gold_window.openness = 255
    end
    @status_window = Window_MenuStatus.new(@status_window_position_x, @status_window_position_y)
    @status_window.width = @status_window_width
    @status_window.height = @status_window_height
    if @status_window_effect == 1
      @status_window.openness = 0
      @status_window.open
    else
      @status_window.openness = 255
    end
  end
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.x = @command_window_position_x
    @command_window.y = @command_window_position_y
    @command_window.width = @command_window_width
    @command_window.height = @command_window_height
    if @command_window_effect == 1
      @command_window.openness = 0
      @command_window.open
    else
      @command_window.openness = 255
    end
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end
  end
  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 @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
      when 5      # End Game
        $scene = Scene_End.new
      end
    end
  end
  def start_actor_selection
    @command_window.active = false
    @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
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  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 @command_window.index
      when 1  # skill
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end


Demo,
http://www.mediafire.com/download.php?wxylh2obtme

This post has been edited by Genshyu: Mar 26 2009, 12:58 PM


__________________________
My current Scripts.

[Show/Hide] Save / Load Scripts.



Things I am currently Learning:
RGSS2.
If you use a script you don't have to give credit :D I'm nice like that. However, if you wan't to give credit then Give Credit to Craig Ramsey.
Go to the top of the page
 
+Quote Post
   
charbelramy
post Mar 27 2009, 06:01 AM
Post #2


Level 1
Group Icon

Group: Member
Posts: 10
Type: Scripter
RM Skill: Advanced




very nice script! thanks =D


__________________________
Go to the top of the page
 
+Quote Post
   
SuperMega
post Mar 27 2009, 08:43 AM
Post #3


Public memberTitle(String n)
Group Icon

Group: Revolutionary
Posts: 683
Type: Developer
RM Skill: Skilled




This is amazing! Nice job, I have to use this one!


__________________________
Translated Scripts:
Diagonal Movement (Eight Direction) and Smooth Jumping
Attack Party, Heal Enemies
Display Party Status On Map (DQ Style)
Display Maps Under Maps
Save Screen Customization
Subtitled Menus

If you want to suggest a translation for something, PM me, and I'll take a look. I AM TRYING TO GIVE AWAY LOCKERZ.com INVITES, SO PLEASE LET ME KNOW IF YOU WANT ONE.
Currently Working on 2 RPG Maker VX Projects. They are very unique, and have a different kind of style then the usual RPGs. So don't think of them as just another RPG. Did that sound rude? :D Not sure if I want them to go public yet, but we'll see how it goes.
Need a script translated? Come talk to me, and I'll see what I can do.
Go to the top of the page
 
+Quote Post
   
Genshyu
post Mar 27 2009, 09:53 AM
Post #4


Level 8
Group Icon

Group: Revolutionary
Posts: 118
Type: Scripter
RM Skill: Intermediate




Thank you guys ^^.


__________________________
My current Scripts.

[Show/Hide] Save / Load Scripts.



Things I am currently Learning:
RGSS2.
If you use a script you don't have to give credit :D I'm nice like that. However, if you wan't to give credit then Give Credit to Craig Ramsey.
Go to the top of the page
 
+Quote Post
   

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: 20th May 2013 - 04:38 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker