Rpg Maker Vx Menu Support Needed

Hi guys it's been a while since posting . I have run into a little problem (i hope)

i edited rubymats compact script and added gold window fine, added roninators location window fine, but now i want to add hp/mp on the character window but dont know how could anyone help me please .

I have Attatched the script and a pic thanks again stu
help.jpg

Spoiler: Script
Ruby:
==============================================================================
#  Compact One Actor Menu
#         RMVX
#        Version 1
#       by  stulee1
# Edited from rubymatts compact menu script RMRK.NET
# Location Window - Roninator2 #
#==============================================================================
#==============================================================================
# ** Window_Gold
#------------------------------------------------------------------------------
#  This window displays the amount of gold.
#==============================================================================

class Window_Gold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     x : window X coordinate
  #     y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 160, WLH + 34)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_currency_value($game_party.gold, 4, 0, 120)
  end
end
#==============================================================================
# **Window_MenuStatus
#==============================================================================

class Window_NewMenuStatus < Window_Selectable
  def initialize(x, y)
    super(0, 0, 64, $game_party.members.size * 36 + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      x = 66
      y = actor.index * 36
      draw_actor_graphic(actor, x - 51, y + 32)
      
      end
  end
  def update_cursor
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(-2, @index * 36 - 2, 36, 36)
    end
  end
end

#==============================================================================
# **Scene_Menu
#==============================================================================

class Scene_Menu < Scene_Base
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(170, 295)
    @location_window = Window_Location.new(170,350,160,48)
    @location_window.refresh
    @status_window = Window_NewMenuStatus.new(170, 0)
    @status_window.x = 170
    @status_window.width = 160
    if $game_party.members.size == 1
      @status_window.y = 53
    end
  end
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @status_window.dispose
    @gold_window.dispose
    @location_window.dispose
  end
  def update
    super
    update_menu_background
    @command_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.x = 170
    @command_window.y = 120
    @command_window.height = 176
    @command_window.index = @menu_index
    if $game_party.members.size == 0   
      @command_window.draw_item(0, false)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false) 
      @command_window.draw_item(3, false) 
    end
    if $game_system.save_disabled         
      @command_window.draw_item(4, false)
    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 
        $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
  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
        $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
class Window_Location < Window_Base
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.font.size = 20
    self.contents.draw_text(0, -5, 120, 20, find_map_name, 1)
  end
  def find_map_name
    name = "no where"
    id = $game_map.map_id.to_s
    data = load_data("Data/MapInfos.rvdata")
    map_name = data[$game_map.map_id].name
    if !map_name.include?(id)
      name = map_name
    end
    return name
  end
end
Moved to: RGSSx Script Support
I don't recall if you have only one actor in the game.
The menu doesn't work well when more than one.
But this works for just the one actor
Ruby:
class Window_NewMenuStatus < Window_Selectable
  def initialize(x, y)
    super(0, 0, 160, 68)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    actor = $game_party.members[0]
      x = 66
      y = actor.index * 36
      draw_actor_graphic(actor, x - 51, y + 32)
      draw_actor_hp(actor, 30, -5, 100)
      draw_actor_mp(actor, 30, 15, 100)
  end
  def update_cursor
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(-2, @index * 36 - 2, 36, 36)
    end
  end
end
Here's a full fledged version of the script with the hero selection stuff removed by default.

compactoneactormenu01.jpg

Ruby:
#==============================================================================
#  Compact One Actor Menu
#         RMVX
#        Version 1
#       by  stulee1
# Edited from rubymatts compact menu script RMRK.NET
# Location Window - Roninator2 #
#==============================================================================

class Window_Gold < Window_Base
  def initialize(x, y)
    super(x, y, 160, WLH + 34)
    refresh
  end

  def refresh
    self.contents.clear
    draw_currency_value($game_party.gold, 4, 0, 120)
  end
end

class Window_NewMenuStatus < Window_Selectable
  def initialize(x, y)
    super(x, y, 160, 74)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 1
    self.index = 0
    self.cursor_rect.empty
    refresh
    self.active = false
    self.index = -1
  end

  def refresh
    self.contents.clear
    actor = $game_party.leader
    draw_actor_graphic(actor, 14, 36)
    draw_actor_hp(actor, 32, -2, 94)
    draw_actor_mp(actor, 32, 20, 94)
  end
  def update_cursor() end
end

class Game_Party
  def leader
    $game_actors[@actors[0]]
  end
end

class Scene_Menu < Scene_Base
  def initialize(menu_index = 0)
    $game_party.last_actor_index = 0
    @menu_index = menu_index
  end

  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(170, 295)
    @location_window = Window_Location.new(170, 350, 160, 48)
    @location_window.refresh
    @status_window = Window_NewMenuStatus.new(170, 46)
  end

  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @status_window.dispose
    @gold_window.dispose
    @location_window.dispose
  end

  def update
    super
    update_menu_background
    @command_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.x = 170
    @command_window.y = 120
    @command_window.height = 176
    @command_window.index = @menu_index
    if $game_party.members.size == 0 
      @command_window.draw_item(0, false)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false)
      @command_window.draw_item(3, false)
    end
    if $game_system.save_disabled       
      @command_window.draw_item(4, false)
    end
  end

  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      pos = @command_window.index
      if $game_party.members.size == 0 and pos < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and pos == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case pos
      when 0
        $scene = Scene_Item.new
      when 1
        $scene = Scene_Skill.new(0)
      when 2
        $scene = Scene_Equip.new(0)
      when 3
        $scene = Scene_Status.new(0)
      when 4
        $scene = Scene_File.new(true, false, false)
      when 5
        $scene = Scene_End.new
      end
    end
  end
end

class Window_Location < Window_Base
  def refresh
    c = self.contents
    c.clear
    c.font.color = normal_color
    c.font.size = 20
    c.draw_text(0, -2, 120, 20, find_map_name, 1)
  end

  def find_map_name
    name = "Nowhere"
    map_id = $game_map.map_id
    data = load_data("Data/MapInfos.rvdata")
    map_name = data[map_id].name
    if !map_name.include?(map_id.to_s)
      name = map_name
    end
    name
  end
end
Here's a full fledged version of the script with the hero selection stuff removed by default.


Ruby:
#==============================================================================
#  Compact One Actor Menu
#         RMVX
#        Version 1
#       by  stulee1
# Edited from rubymatts compact menu script RMRK.NET
# Location Window - Roninator2 #
#==============================================================================

class Window_Gold < Window_Base
  def initialize(x, y)
    super(x, y, 160, WLH + 34)
    refresh
  end

  def refresh
    self.contents.clear
    draw_currency_value($game_party.gold, 4, 0, 120)
  end
end

class Window_NewMenuStatus < Window_Selectable
  def initialize(x, y)
    super(x, y, 160, 74)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 1
    self.index = 0
    self.cursor_rect.empty
    refresh
    self.active = false
    self.index = -1
  end

  def refresh
    self.contents.clear
    actor = $game_party.leader
    draw_actor_graphic(actor, 14, 36)
    draw_actor_hp(actor, 32, -2, 94)
    draw_actor_mp(actor, 32, 20, 94)
  end
  def update_cursor() end
end

class Game_Party
  def leader
    $game_actors[@actors[0]]
  end
end

class Scene_Menu < Scene_Base
  def initialize(menu_index = 0)
    $game_party.last_actor_index = 0
    @menu_index = menu_index
  end

  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(170, 295)
    @location_window = Window_Location.new(170, 350, 160, 48)
    @location_window.refresh
    @status_window = Window_NewMenuStatus.new(170, 46)
  end

  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @status_window.dispose
    @gold_window.dispose
    @location_window.dispose
  end

  def update
    super
    update_menu_background
    @command_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.x = 170
    @command_window.y = 120
    @command_window.height = 176
    @command_window.index = @menu_index
    if $game_party.members.size == 0
      @command_window.draw_item(0, false)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false)
      @command_window.draw_item(3, false)
    end
    if $game_system.save_disabled      
      @command_window.draw_item(4, false)
    end
  end

  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      pos = @command_window.index
      if $game_party.members.size == 0 and pos < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and pos == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case pos
      when 0
        $scene = Scene_Item.new
      when 1
        $scene = Scene_Skill.new(0)
      when 2
        $scene = Scene_Equip.new(0)
      when 3
        $scene = Scene_Status.new(0)
      when 4
        $scene = Scene_File.new(true, false, false)
      when 5
        $scene = Scene_End.new
      end
    end
  end
end

class Window_Location < Window_Base
  def refresh
    c = self.contents
    c.clear
    c.font.color = normal_color
    c.font.size = 20
    c.draw_text(0, -2, 120, 20, find_map_name, 1)
  end

  def find_map_name
    name = "Nowhere"
    map_id = $game_map.map_id
    data = load_data("Data/MapInfos.rvdata")
    map_name = data[map_id].name
    if !map_name.include?(map_id.to_s)
      name = map_name
    end
    name
  end
end
Thank you very much this is amazing
Can’t wait to use it
I don't recall if you have only one actor in the game.
The menu doesn't work well when more than one.
But this works for just the one actor
Ruby:
class Window_NewMenuStatus < Window_Selectable
  def initialize(x, y)
    super(0, 0, 160, 68)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    actor = $game_party.members[0]
      x = 66
      y = actor.index * 36
      draw_actor_graphic(actor, x - 51, y + 32)
      draw_actor_hp(actor, 30, -5, 100)
      draw_actor_mp(actor, 30, 15, 100)
  end
  def update_cursor
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(-2, @index * 36 - 2, 36, 36)
    end
  end
end
Thank you roninator as always flying in to save the day
Thank you roninator as always flying in to save the day
sure, but what kyonides wrote is better.
sure, but what kyonides wrote is better.
Just my way of saying thank you to you cause every query I have ever had since been here you always respond I haven’t had chance to use it yet as I’m out but I will be as soon as I’m back so thank you to both of you

Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-vx-menu-support-needed.155318/