Custom Menu Status
#1
This is a locked, single-post thread from Creation Asylum.  Archived here to prevent its loss.
No support is given.  If you are the owner of the thread, please contact administration.


*NOTE*
If you get a Nil implicit conversion error remove the "#" from lines: 232,233,260,261,303,304,328,329,380,381

To implement this code just paste this script right about main

Screenshot

[Image: MenuStatus.png]

Code:
#==============================================================================
# ¡ Scene_Menu
#------------------------------------------------------------------------------
# @ƒƒjƒ…[‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Menu
 #--------------------------------------------------------------------------
 # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
 #     menu_index : ƒRƒ}ƒ“ƒh‚̃J[ƒ\ƒ‹‰ŠúˆÊ’u
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0)
    @menu_index = menu_index
 end
 #--------------------------------------------------------------------------
 # œ ƒƒCƒ“ˆ—
 #--------------------------------------------------------------------------
 def main
    # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðì¬
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save"
    s6 = "End Game"
    @command_window = Window_Command.new(140, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    # ƒp[ƒeƒBl”‚ª 0 l‚̏ꍇ
    if $game_party.actors.size == 0
      # ƒAƒCƒeƒ€AƒXƒLƒ‹A‘•”õAƒXƒe[ƒ^ƒX‚𖳌ø‰»
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # ƒZ[ƒu‹ÖŽ~‚̏ꍇ
    if $game_system.save_disabled
      # ƒZ[ƒu‚𖳌ø‚É‚·‚é
      @command_window.disable_item(4)
    end
    # ƒvƒŒƒCŽžŠÔƒEƒBƒ“ƒhƒE‚ðì¬
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 410
    @playtime_window.y = 416
    # •à”ƒEƒBƒ“ƒhƒE‚ðì¬
    @steps_window = Window_Steps.new
    @steps_window.x = 160
    @steps_window.y = 416
    # ƒS[ƒ‹ƒhƒEƒBƒ“ƒhƒE‚ðì¬
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðì¬
    @status_window = Window_MenuStatus.new
    @status_window.x = 135
    @status_window.y = 0
    @title_window = Window_Title.new
    @title_window.x = 0
    @title_window.y = 220
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
    Graphics.transition
    # ƒƒCƒ“ƒ‹[ƒv
    loop do
      # ƒQ[ƒ€‰æ–Ê‚ðXV
      Graphics.update
      # “ü—͏î•ñ‚ðXV
      Input.update
      # ƒtƒŒ[ƒ€XV
      update
      # ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f
      if $scene != self
        break
      end
    end
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ
    Graphics.freeze
    # ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @title_window.dispose
 end
 #--------------------------------------------------------------------------
 # œ ƒtƒŒ[ƒ€XV
 #--------------------------------------------------------------------------
 def update
    # ƒEƒBƒ“ƒhƒE‚ðXV
    @command_window.update
    @playtime_window.update
    @steps_window.update
    @gold_window.update
    @status_window.update
    @title_window.update
    # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_command ‚ðŒÄ‚Ô
    if @command_window.active
      update_command
      return
    end
    # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_status ‚ðŒÄ‚Ô
    if @status_window.active
      update_status
      return
    end
 end
 #--------------------------------------------------------------------------
 # œ ƒtƒŒ[ƒ€XV (ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
 #--------------------------------------------------------------------------
 def update_command
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::B)
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      # ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
      $scene = Scene_Map.new
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::C)
      # ƒp[ƒeƒBl”‚ª 0 l‚ŁAƒZ[ƒuAƒQ[ƒ€I—¹ˆÈŠO‚̃Rƒ}ƒ“ƒh‚̏ꍇ
      if $game_party.actors.size == 0 and @command_window.index < 4
        # ƒuƒU[ SE ‚ð‰‰‘t
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
      case @command_window.index
      when 0  # ƒAƒCƒeƒ€
        # Œˆ’è  SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒAƒCƒeƒ€‰æ–ʂɐ؂è‘Ö‚¦
        $scene = Scene_Item.new
      when 1  # ƒXƒLƒ‹
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # ‘•”õ
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # ƒXƒe[ƒ^ƒX
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # ƒZ[ƒu
        # ƒZ[ƒu‹ÖŽ~‚̏ꍇ
        if $game_system.save_disabled
          # ƒuƒU[ SE ‚ð‰‰‘t
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒZ[ƒu‰æ–ʂɐ؂è‘Ö‚¦
        $scene = Scene_Save.new
      when 5  # ƒQ[ƒ€I—¹
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒQ[ƒ€I—¹‰æ–ʂɐ؂è‘Ö‚¦
        $scene = Scene_End.new
      end
      return
    end
 end
 #--------------------------------------------------------------------------
 # œ ƒtƒŒ[ƒ€XV (ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
 #--------------------------------------------------------------------------
 def update_status
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::B)
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::C)
      # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
      case @command_window.index
      when 1  # ƒXƒLƒ‹
        # ‚±‚̃AƒNƒ^[‚̍s“®§ŒÀ‚ª 2 ˆÈã‚̏ꍇ
        if $game_party.actors[@status_window.index].restriction >= 2
          # ƒuƒU[ SE ‚ð‰‰‘t
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒXƒLƒ‹‰æ–ʂɐ؂è‘Ö‚¦
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # ‘•”õ
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ‘•”õ‰æ–ʂɐ؂è‘Ö‚¦
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # ƒXƒe[ƒ^ƒX
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒXƒe[ƒ^ƒX‰æ–ʂɐ؂è‘Ö‚¦
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
 end
end
#==============================================================================
# ¡ Window_Gold
#------------------------------------------------------------------------------
# @ƒS[ƒ‹ƒh‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_Gold < Window_Base
 #--------------------------------------------------------------------------
 # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
 #--------------------------------------------------------------------------
 def initialize
    super(0, 0, 170, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
#    self.contents.font.name = $fontface
#    self.contents.font.size = $fontsize
    refresh
 end
 #--------------------------------------------------------------------------
 # œ ƒŠƒtƒŒƒbƒVƒ…
 #--------------------------------------------------------------------------
 def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
 end
end
#==============================================================================
# ¡ Window_PlayTime
#------------------------------------------------------------------------------
# @ƒƒjƒ…[‰æ–ʂŃvƒŒƒCŽžŠÔ‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_PlayTime < Window_Base
 #--------------------------------------------------------------------------
 # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
 #--------------------------------------------------------------------------
 def initialize
    super(0, 0, 230, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
#    self.contents.font.name = $fontface
#    self.contents.font.size = $fontsize
    refresh
 end
 #--------------------------------------------------------------------------
 # œ ƒŠƒtƒŒƒbƒVƒ…
 #--------------------------------------------------------------------------
 def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 120, 32, "Play Time")
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(60, 0, 120, 32, text, 2)
 end
 #--------------------------------------------------------------------------
 # œ ƒtƒŒ[ƒ€XV
 #--------------------------------------------------------------------------
 def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
 end
end
#==============================================================================
# ¡ Window_Steps
#------------------------------------------------------------------------------
# @ƒƒjƒ…[‰æ–Ê‚Å•à”‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_Steps < Window_Base
 #--------------------------------------------------------------------------
 # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
 #--------------------------------------------------------------------------
 def initialize
    super(0, 0, 260, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
#    self.contents.font.name = $fontface
#    self.contents.font.size = $fontsize
    refresh
 end
 #--------------------------------------------------------------------------
 # œ ƒŠƒtƒŒƒbƒVƒ…
 #--------------------------------------------------------------------------
 def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Steps")
    self.contents.font.color = normal_color
    self.contents.draw_text(60, 0, 120, 32, $game_party.steps.to_s, 2)
 end
end
#==============================================================================
# ¡ Window_MenuStatus
#------------------------------------------------------------------------------
# @ƒƒjƒ…[‰æ–ʂŃp[ƒeƒBƒƒ“ƒo[‚̃Xƒe[ƒ^ƒX‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_MenuStatus < Window_Selectable
def initialize
super(0, 0, 505, 420)
self.contents = Bitmap.new(width - 32, height - 32)
#self.contents.font.name = $fontface
#self.contents.font.size = $fontsize
refresh
self.active = false
self.index = -1
end
 
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 90
actor = $game_party.actors[i]
draw_actor_face(actor, x + 200, y + 79)
draw_actor_graphic(actor, x - 50, y + 80)
self.contents.font.size = 18
draw_actor_name(actor, x - 60, y + 4)
self.contents.font.color = system_color
self.contents.draw_text(x - 5, y + 2, 120, 32, '-')
self.contents.font.color = normal_color
draw_actor_class(actor, x + 75, y + 4)
draw_actor_level(actor, x + 5, y + 4)
draw_actor_state(actor, x + 135, y + 4)
draw_actor_exp(actor, x - 35, y + 54)
draw_actor_hp(actor, x - 35, y + 32)
draw_actor_sp(actor, x + 115, y + 32)
end
end
 
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(1, @index * 90 + 33, 26, 48)
end
end  
 
def draw_actor_face(actor, x, y)
face = RPG::Cache.battler(actor.character_name, actor.character_hue)
fw = face.width
fh = 90
src_rect = Rect.new(3, -1, fw, fh)
opacity = 180
self.contents.blt(x - fw / 23, y - fh, face, src_rect, opacity)
end
end
class Window_Title < Window_Base
 
def initialize
    super(0, 0, 138, 200)
    self.contents = Bitmap.new (width - 32, height - 32)
#    self.contents.font.name = $fontface
#    self.contents.font.size = $fontsize
    refresh
 end
 def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.font.color = normal_color
    $maps = load_data("Data/MapInfos.rxdata")
    @map_id = $game_map.map_id
    @currmap = $maps[@map_id].name
    self.contents.font.size = 24
    self.contents.draw_text(4, 0, 120, 32, @currmap)
    #In the parenthesis put what you want
    self.contents.draw_text(4, 10, 120, 32, "")
    self.contents.draw_text(4, 52, 120, 32, "")
    self.contents.draw_text(4, 74, 120, 32, "")
    self.contents.draw_text(4, 96, 120, 32, "")
    self.contents.font.size = 14
    self.contents.draw_text(4, 128, 120, 32, "Press [Esc] to Exit")
 end
end
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Friend Death Status sandsand 0 3,348 10-10-2006, 01:00 PM
Last Post: sandsand
  GameOver Menu V.2 xLeD 0 2,490 10-03-2006, 01:00 PM
Last Post: xLeD
  Change menu character sprites to Pictures like in rpg maker 2003 Abyssos 0 4,052 09-28-2006, 01:00 PM
Last Post: Abyssos
  Slipknot's adorable menu Ordaz 0 2,456 09-09-2006, 01:00 PM
Last Post: Ordaz
  Pre-Title menu Tony 0 2,547 08-04-2006, 01:00 PM
Last Post: Tony
  Change Color of The diferent Status Script MASTERLOKI 0 2,633 07-18-2006, 01:00 PM
Last Post: MASTERLOKI
  Tasty custom menu screen with gradients tktarr 0 2,864 07-05-2006, 01:00 PM
Last Post: tktarr
  Addonscript for FFX2 Menu Akxiv 0 2,746 06-17-2006, 01:00 PM
Last Post: Akxiv
  Change Level/Exp/Status name ryujijitei 0 2,393 04-29-2006, 01:00 PM
Last Post: ryujijitei
  Save menu edit Kairose 0 2,647 01-23-2006, 01:00 PM
Last Post: Kairose



Users browsing this thread: 1 Guest(s)