Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: G_G on September 21, 2008, 03:55:29 pm

Title: [XP] Game_Guy's Modded Default Menu
Post by: G_G on September 21, 2008, 03:55:29 pm
GG's Modded Menu
Authors: game_guy
Version: .98
Type: CMS
Key Term: Custom Menu System



First I'd like to start off with that this is my first script ever! Well sorta seeing its modded. I did this by looking at the rtp scripts and I now can make a menu system! HOORRAY!!!! Yea I know anybody could've done this. But I'd thought I share it anyway.


Introduction

A modded default menu system that has a few new features than the real one.


Features




Screenshots
Screenie
Spoiler: ShowHide
(http://i307.photobucket.com/albums/nn318/bahumat27/screenie.jpg)



Demo

Demo Link:
http://rapidshare.com/files/147230337/Project2.rar.html



Script

Spoiler: ShowHide
#==============================================================================
#game_guy's Modded Menu System
#Version .98
#Features:
#Now has a mirror effect.
#Change the words of Status, Save, and End Game easily
#Replaced PlayTime window with a Game Name window
#Instructions.
#Tired of seeing the words Status, Save, and End Game? Want to change them to
#your own words? Well just make sure you have actors 11-13 open, because
#whatever you name those actors are going to be the Words for Status, Save, and
#End Game. Also you need to enter your game Name in actor 10.
#Status = Actor 11's Name
#Save = Actor 12's Name
#End Game = Actor 13's Name
#Game Name = Actor 10'a Name
#End of Instructions
#==============================================================================

#==============================================================================
# ** Window_GameName
#------------------------------------------------------------------------------
#  This window displays the name of your game.
#==============================================================================

class Window_GameName < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Play Time")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_actors[10].name, 2)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = $game_actors[11].name
    s5 = $game_actors[12].name
    s6 = $game_actors[13].name
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.x = 480
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
    # Make play time window
    @playtime_window = Window_GameName.new
    @playtime_window.x = 480
    @playtime_window.y = 224
    # Make steps window
    @steps_window = Window_Steps.new
    @steps_window.x = 480
    @steps_window.y = 320
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 480
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 0
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @playtime_window.update
    @steps_window.update
    @gold_window.update
    @status_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 5  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end



Instructions

They are in script but here they are again.
To change the words Status, Save, and End Game go into the Database under Actors. Make sure actors 11-13 are open. Name as following
Actor 11's Name = word for status
Actor 12's Name = word for save
Actor 13's Name = word for End Game
Also used to name the game
Actor 10's Name = Game Name

Replace Scene_Menu with this.


Compatibility

Wont work if you have any other cms's, Works with all scripts except cms's


Credits and Thanks




Author's Notes

Remember to have 10-13 in actors open in your database so you can name the words.
Title: Re: Game_Guy's Modded Default Menu
Post by: Starrodkirby86 on September 21, 2008, 04:30:38 pm
You got everything in the correct format, that's really good for a start. Just a minor coding error of BBS and an incorrect Key Term, but that's okay...

This is not a bad first script, but there are very easy ways to find how to edit the Status and End Game (etc.) strings without using an Actor as a name (Not a bad idea though, I'm sure it can be used well in other cases). For example, you can simply go into Scene_menu and find

    s4 = "Status"
    s5 = "Save"
    s6 = "End Game"


Saving you three slots in the actors.

I like the mirrored idea though. :P
Title: Re: [XP] Game_Guy's Modded Default Menu
Post by: Juan on September 21, 2008, 05:13:42 pm
Not sure why it says playtime under the game here. And you can always change the play time to something like Game Name. This part here
Actor 10's Name = Game Name
. Could be
Game_Name = 'Game Name Here'
. That saves an actor. And try adding using that to configurate with. Remember this is criticism I dont mean to offend you if I did. If you need help with doing what I suggested just ask.
Title: Re: [XP] Game_Guy's Modded Default Menu
Post by: cstb on November 15, 2008, 02:06:47 pm
@Game_Guy: Im going to use this as a template for a reverse menu for my game ok?
Title: Re: [XP] Game_Guy's Modded Default Menu
Post by: G_G on November 16, 2008, 12:26:20 pm
Quote from: cstb on November 15, 2008, 02:06:47 pm
@Game_Guy: Im going to use this as a template for a reverse menu for my game ok?
thats fine with me
Title: Re: [XP] Game_Guy's Modded Default Menu
Post by: cstb on November 16, 2008, 12:27:11 pm
ok ty!
EXTRA:Energy up because you gave me the x position for reverse menus.