Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[RESOLVED] Puzzle Game CMS

RESOLVED

Hello again, scripters.

I have gotten bored of making my game  :cry:, so I started a side project (on RMXP), mainly based on puzzles, mazes, quests, etc. Since there will be no battling, I will need most of those HP related things removed. I made a mock-up of what I came up with.

http://i229.photobucket.com/albums/ee138/speedolphins/CMSRequest.jpg[/img]

A. This is normally executed, just by pressing the B button (Esc or X). And I just love semi-transparent things, I don't know why. Please make the map be visible in the backround, with everything paused.

B. Those green numbers:
                                          1. First character in the party's name.
                                          2. First character in the party's looking downward sprite.
                                          3. First character in the party's Level.
                                          4. Player's current gold, let me change the name of the gold in the database, please.
                                          5. First character in the party's EXP.

                                          In the right window, make it the regular choice-type window.
                                          6. Item. When the player selects this it will take them to Scene_Item.
                                          7. Save. When the player selects this it will take them to Scene_Save.
                                          8. End Game. When the player selects this it will take them to Scene_End.


Well, this request was hopefully descriptive enough. Please ask for more information if you need some.  :thumb:

Happy game making,
~speedolphins
 
Hi speedolphins!

I saw your script request and decided to give it a try :thumb:

Here is what i think you want.
I made it in two versions, first version is if you don't want to use the exp-bar thing, and the second is for if you do want to use the exp-bar thing.

Code:
#==============================================================================
# ** 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 = "Save"
    s3 = "End Game"
    @command_window = Window_Command.new(160, [s1, s2, s3])
    @menu_index -= 3 if @menu_index > 2
    @command_window.index = @menu_index
    # Set the command windows x and y position
    @command_window.x = 315
    @command_window.y = 0
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(1)
    end
    # Make status window
    @status_window = Custom_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 0
    # This makes the map show in the background
    @spriteset = Spriteset_Map.new
    # 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
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_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 < 2
        # 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  # 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 2  # 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
end

This is WHITOUT the exp-bar.
Code:
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Custom_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 315, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 30, y + 80)
      draw_actor_name(actor, x-60, y)
      draw_actor_level(actor, x + 20, y + 8)
      draw_actor_exp(actor, x + 18, y + 64)
      self.contents.draw_text(x-2, y+35, 32, 32, $game_party.gold.to_s, 2)
      self.contents.draw_text(245, 38, 32, 32, $data_system.words.gold, 2)
    end
  end
  def draw_actor_level(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y-10, 52, 52, "Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(250, y, 24, 32, actor.level.to_s, 2)
  end
    def draw_actor_exp(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 24, 32, "E")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
    self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
    self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
  end
end

This is WITH the exp bar.
Code:
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Custom_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 318, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 30, y + 80)
      draw_actor_name(actor, x-60, y)
      draw_actor_level(actor, x + 20, y + 8)
      draw_actor_exp(actor, x + 18, y + 64)
      self.contents.draw_text(x-2, y+35, 32, 32, $game_party.gold.to_s, 2)
      self.contents.draw_text(245, 38, 32, 32, $data_system.words.gold, 2)
    end
  end
  def draw_actor_level(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y-10, 52, 52, "Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(250, y, 24, 32, actor.level.to_s, 2)
  end
end

Just insert two new empty scripts in the Script Editor above Main and paste the scripts into them.


Here is the HP/SP/EXP Gauge Script made by cogwheel Not me.
It will display the Exp bar, if you decides to use the second version. Thought i would add this script in case you didn't have a similar script:

Code:
# HP/SP/EXP Gauge Script v1.00
# Distribution original support URL
# http://members.jcom.home.ne.jp/cogwheel/

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  def now_exp
    return @exp - @exp_list[@level]
  end
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Draw HP Gauge
  #--------------------------------------------------------------------------
  # Modification of the original Draw HP process
  alias :draw_actor_hp_hpsp :draw_actor_hp
  def draw_actor_hp(actor, x, y, width = 144)
    # Determine the rate of fill based on the actor's HP and HP Max
    if actor.maxhp != 0
      rate = actor.hp.to_f / actor.maxhp
    else
      rate = 0
    end
    # plus_x:     revised x-coordinate
    # rate_x:     revised X-coordinate as (%)
    # plus_y:     revised y-coordinate
    # plus_width: revised width
    # rate_width: revised width as (%)
    # height:     Vertical width
    # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
    # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
    # align3: Gauge type 0:Left justify 1: Right justify
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10
    align1 = 1
    align2 = 2
    align3 = 0
    # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
    # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
    grade1 = 1
    grade2 = 0
    # Color setting. color1: Outermost framework, color2: Medium framework
    # color3: Empty framework dark color, color4: Empty framework light/write color
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(64, 0, 0, 192)
    # Color setting of gauge
    # Usually color setting of the time    
    color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
    color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
    # Determine the gauge's width & fill based on the actor's HP
    if actor.maxhp != 0
      hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp
    else
      hp = 0
    end
    # Drawing of gauge
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, hp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # Call the original Draw HP process
    draw_actor_hp_hpsp(actor, x, y, width)
  end
  #--------------------------------------------------------------------------
  # * Draw SP Gauge
  #--------------------------------------------------------------------------
  # Modification of the original Draw SP process
  alias :draw_actor_sp_hpsp :draw_actor_sp
  def draw_actor_sp(actor, x, y, width = 144)
    # Determine the rate of fill based on the actor's SP and SP Max
    if actor.maxsp != 0
      rate = actor.sp.to_f / actor.maxsp
    else
      rate = 1
    end
    # plus_x:     revised x-coordinate
    # rate_x:     revised X-coordinate as (%)
    # plus_y:     revised y-coordinate
    # plus_width: revised width
    # rate_width: revised width as (%)
    # height:     Vertical width
    # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
    # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
    # align3: Gauge type 0:Left justify 1: Right justify
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10
    align1 = 1
    align2 = 2
    align3 = 0
    # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
    # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
    grade1 = 1
    grade2 = 0
    # Color setting. color1: Outermost framework, color2: Medium framework
    # color3: Empty framework dark color, color4: Empty framework light/write color
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(0, 64, 0, 192)
    # Color setting of gauge
    # Usually color setting of the time       
    color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
    color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
    # Determine the gauge's width & fill based on the actor's SP
    if actor.maxsp != 0
      sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp
    else
      sp = (width + plus_width) * rate_width / 100
    end
    # Drawing of gauge
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, sp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # Call the original Draw HP process
    draw_actor_sp_hpsp(actor, x, y, width)
  end
  #--------------------------------------------------------------------------
  # * Draw EXP Gauge
  #--------------------------------------------------------------------------
  # Modification of the original Draw HP process
  alias :draw_actor_exp_hpsp :draw_actor_exp
  def draw_actor_exp(actor, x, y, width = 204)
    # Determine the rate of fill based on the actor's EXP and Next EXP
    if actor.next_exp != 0
      rate = actor.now_exp.to_f / actor.next_exp
    else
      rate = 1
    end
    # plus_x:     revised x-coordinate
    # rate_x:     revised X-coordinate as (%)
    # plus_y:     revised y-coordinate
    # plus_width: revised width
    # rate_width: revised width as (%)
    # height:     Vertical width
    # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
    # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
    # align3: Gauge type 0:Left justify 1: Right justify
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10
    align1 = 1
    align2 = 2
    align3 = 0
    # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
    # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
    grade1 = 1
    grade2 = 0
    # Color setting. color1: Outermost framework, color2: Medium framework
    # color3: Empty framework dark color, color4: Empty framework light/write color
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(64, 0, 0, 192)
    # Color setting of gauge
    # Usually color setting of the time      
    color5 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192)
    color6 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192)
    # Determine the gauge's width & fill based on the actor's Next EXP
    if actor.next_exp != 0
      exp = (width + plus_width) * actor.now_exp * rate_width /
                                                          100 / actor.next_exp
    else
      exp = (width + plus_width) * rate_width / 100
    end
    # Drawing of gauge
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, exp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # Call the original Draw EXP process
    draw_actor_exp_hpsp(actor, x, y)
  end
  #--------------------------------------------------------------------------
  # * Drawing of gauge
  #--------------------------------------------------------------------------
  def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    case align1
    when 1
      x += (rect_width - width) / 2
    when 2
      x += rect_width - width
    end
    case align2
    when 1
      y -= height / 2
    when 2
      y -= height
    end
    # Framework Drawing
    self.contents.fill_rect(x, y, width, height, color1)
    self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2)
    if align3 == 0
      if grade1 == 2
        grade1 = 3
      end
      if grade2 == 2
        grade2 = 3
      end
    end
    if (align3 == 1 and grade1 == 0) or grade1 > 0
      color = color3
      color3 = color4
      color4 = color
    end
    if (align3 == 1 and grade2 == 0) or grade2 > 0
      color = color5
      color5 = color6
      color6 = color
    end
    # Drawing of empty gauge
    self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4,
                                  color3, color4, grade1)
    if align3 == 1
      x += width - gauge
    end
    #  Drawing of actual gauge
    self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4,
                                  color5, color6, grade2)
  end
end

#------------------------------------------------------------------------------
# New routine added to the Bitmap class. 
#============================================================================== 

class Bitmap
#-------------------------------------------------------------------------- 
# * Rectangle Gradation Indicator
#   color1: Start color 
#   color2: Ending color 
#   align: 0: On side gradation 
#          1: Vertically gradation 
#          2: The gradation (intense concerning slantedly heavily note) 
#-------------------------------------------------------------------------- 
  def gradation_rect(x, y, width, height, color1, color2, align = 0)
    if align == 0
      for i in x...x + width
        red   = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
        green = color1.green +
                (color2.green - color1.green) * (i - x) / (width - 1)
        blue  = color1.blue +
                (color2.blue - color1.blue) * (i - x) / (width - 1)
        alpha = color1.alpha +
                (color2.alpha - color1.alpha) * (i - x) / (width - 1)
        color = Color.new(red, green, blue, alpha)
        fill_rect(i, y, 1, height, color)
      end
    elsif align == 1
      for i in y...y + height
        red   = color1.red +
                (color2.red - color1.red) * (i - y) / (height - 1)
        green = color1.green +
                (color2.green - color1.green) * (i - y) / (height - 1)
        blue  = color1.blue +
                (color2.blue - color1.blue) * (i - y) / (height - 1)
        alpha = color1.alpha +
                (color2.alpha - color1.alpha) * (i - y) / (height - 1)
        color = Color.new(red, green, blue, alpha)
        fill_rect(x, i, width, 1, color)
      end
    elsif align == 2
      for i in x...x + width
        for j in y...y + height
          red   = color1.red + (color2.red - color1.red) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          green = color1.green + (color2.green - color1.green) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          blue  = color1.blue + (color2.blue - color1.blue) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          alpha = color1.alpha + (color2.alpha - color1.alpha) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          color = Color.new(red, green, blue, alpha)
          set_pixel(i, j, color)
        end
      end
    elsif align == 3
      for i in x...x + width
        for j in y...y + height
          red   = color1.red + (color2.red - color1.red) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          green = color1.green + (color2.green - color1.green) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          blue  = color1.blue + (color2.blue - color1.blue) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          alpha = color1.alpha + (color2.alpha - color1.alpha) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          color = Color.new(red, green, blue, alpha)
          set_pixel(i, j, color)
        end
      end
    end
  end
end

I think i've made it as you want it, but may i suggest 1 thing?
You should swap places with the 0 and the G, i think it will look better when the player get some money. You can try it out and increase the money and see for yourself what i mean ^^
If you decide to change it, you can tell me and i will fix it for you :thumb:

Soo, did i do good? :tongue2:

Edit:  Fixed the two MenuStatus scripts.
 
Gando":yaco8hw0 said:
Hi speedolphins!

I saw your script request and decided to give it a try :thumb:

Here is what i think you want.
I made it in two versions, first version is if you don't want to use the exp-bar thing, and the second is for if you do want to use the exp-bar thing.

This is WHITOUT the exp-bar.
Code:
#==============================================================================
# ** 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 = "Save"
    s3 = "End Game"
    @command_window = Window_Command.new(160, [s1, s2, s3])
    @menu_index -= 3 if @menu_index > 2
    @command_window.index = @menu_index
    # Set the command windows x and y position
    @command_window.x = 315
    @command_window.y = 0
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(1)
    end
    # Make status window
    @status_window = Custom_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 0
    # This makes the map show in the background
    @spriteset = Spriteset_Map.new
    # 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
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_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 < 2
        # 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  # 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 2  # 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
end

Code:
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Custom_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 315, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 30, y + 80)
      draw_actor_name(actor, x-60, y)
      draw_actor_level(actor, x + 20, y + 8)
      draw_actor_exp(actor, x + 18, y + 64)
      self.contents.draw_text(62, 36, 32, 32, $game_party.gold.to_s, 2)
      self.contents.draw_text(195, 38, 32, 32, $data_system.words.gold, 2)
    end
  end
  def draw_actor_level(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 32, 32, "Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(200, y, 24, 32, actor.level.to_s, 2)
  end
    def draw_actor_exp(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 24, 32, "E")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
    self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
    self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end

This is WITH the exp bar.
Code:
#==============================================================================
# ** 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 = "Save"
    s3 = "End Game"
    @command_window = Window_Command.new(160, [s1, s2, s3])
    @menu_index -= 3 if @menu_index > 2
    @command_window.index = @menu_index
    # Set the command windows x and y position
    @command_window.x = 318
    @command_window.y = 0
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(1)
    end
    # Make status window
    @status_window = Custom_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 0
    # This makes the map show in the background
    @spriteset = Spriteset_Map.new
    # 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
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_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 < 2
        # 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  # 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 2  # 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
end

Code:
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Custom_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 318, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 30, y + 80)
      draw_actor_name(actor, x-60, y)
      draw_actor_level(actor, x + 20, y + 8)
      draw_actor_exp(actor, x + 18, y + 64)
      self.contents.draw_text(62, 36, 32, 32, $game_party.gold.to_s, 2)
      self.contents.draw_text(245, 38, 32, 32, $data_system.words.gold, 2)
    end
  end
  def draw_actor_level(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 32, 32, "Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(250, y, 24, 32, actor.level.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end

Just insert two new empty scripts in the Script Editor above Main and paste the scripts into them.


Here is the HP/SP/EXP Gauge Script made by cogwheel Not me.
It will display the Exp bar, if you decides to use the second version. Thought i would add this script in case you didn't have a similar script:

Code:
# HP/SP/EXP Gauge Script v1.00
# Distribution original support URL
# http://members.jcom.home.ne.jp/cogwheel/

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  def now_exp
    return @exp - @exp_list[@level]
  end
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Draw HP Gauge
  #--------------------------------------------------------------------------
  # Modification of the original Draw HP process
  alias :draw_actor_hp_hpsp :draw_actor_hp
  def draw_actor_hp(actor, x, y, width = 144)
    # Determine the rate of fill based on the actor's HP and HP Max
    if actor.maxhp != 0
      rate = actor.hp.to_f / actor.maxhp
    else
      rate = 0
    end
    # plus_x:     revised x-coordinate
    # rate_x:     revised X-coordinate as (%)
    # plus_y:     revised y-coordinate
    # plus_width: revised width
    # rate_width: revised width as (%)
    # height:     Vertical width
    # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
    # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
    # align3: Gauge type 0:Left justify 1: Right justify
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10
    align1 = 1
    align2 = 2
    align3 = 0
    # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
    # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
    grade1 = 1
    grade2 = 0
    # Color setting. color1: Outermost framework, color2: Medium framework
    # color3: Empty framework dark color, color4: Empty framework light/write color
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(64, 0, 0, 192)
    # Color setting of gauge
    # Usually color setting of the time    
    color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
    color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
    # Determine the gauge's width & fill based on the actor's HP
    if actor.maxhp != 0
      hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp
    else
      hp = 0
    end
    # Drawing of gauge
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, hp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # Call the original Draw HP process
    draw_actor_hp_hpsp(actor, x, y, width)
  end
  #--------------------------------------------------------------------------
  # * Draw SP Gauge
  #--------------------------------------------------------------------------
  # Modification of the original Draw SP process
  alias :draw_actor_sp_hpsp :draw_actor_sp
  def draw_actor_sp(actor, x, y, width = 144)
    # Determine the rate of fill based on the actor's SP and SP Max
    if actor.maxsp != 0
      rate = actor.sp.to_f / actor.maxsp
    else
      rate = 1
    end
    # plus_x:     revised x-coordinate
    # rate_x:     revised X-coordinate as (%)
    # plus_y:     revised y-coordinate
    # plus_width: revised width
    # rate_width: revised width as (%)
    # height:     Vertical width
    # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
    # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
    # align3: Gauge type 0:Left justify 1: Right justify
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10
    align1 = 1
    align2 = 2
    align3 = 0
    # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
    # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
    grade1 = 1
    grade2 = 0
    # Color setting. color1: Outermost framework, color2: Medium framework
    # color3: Empty framework dark color, color4: Empty framework light/write color
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(0, 64, 0, 192)
    # Color setting of gauge
    # Usually color setting of the time       
    color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
    color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
    # Determine the gauge's width & fill based on the actor's SP
    if actor.maxsp != 0
      sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp
    else
      sp = (width + plus_width) * rate_width / 100
    end
    # Drawing of gauge
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, sp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # Call the original Draw HP process
    draw_actor_sp_hpsp(actor, x, y, width)
  end
  #--------------------------------------------------------------------------
  # * Draw EXP Gauge
  #--------------------------------------------------------------------------
  # Modification of the original Draw HP process
  alias :draw_actor_exp_hpsp :draw_actor_exp
  def draw_actor_exp(actor, x, y, width = 204)
    # Determine the rate of fill based on the actor's EXP and Next EXP
    if actor.next_exp != 0
      rate = actor.now_exp.to_f / actor.next_exp
    else
      rate = 1
    end
    # plus_x:     revised x-coordinate
    # rate_x:     revised X-coordinate as (%)
    # plus_y:     revised y-coordinate
    # plus_width: revised width
    # rate_width: revised width as (%)
    # height:     Vertical width
    # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
    # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
    # align3: Gauge type 0:Left justify 1: Right justify
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10
    align1 = 1
    align2 = 2
    align3 = 0
    # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
    # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
    grade1 = 1
    grade2 = 0
    # Color setting. color1: Outermost framework, color2: Medium framework
    # color3: Empty framework dark color, color4: Empty framework light/write color
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(64, 0, 0, 192)
    # Color setting of gauge
    # Usually color setting of the time      
    color5 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192)
    color6 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192)
    # Determine the gauge's width & fill based on the actor's Next EXP
    if actor.next_exp != 0
      exp = (width + plus_width) * actor.now_exp * rate_width /
                                                          100 / actor.next_exp
    else
      exp = (width + plus_width) * rate_width / 100
    end
    # Drawing of gauge
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, exp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # Call the original Draw EXP process
    draw_actor_exp_hpsp(actor, x, y)
  end
  #--------------------------------------------------------------------------
  # * Drawing of gauge
  #--------------------------------------------------------------------------
  def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    case align1
    when 1
      x += (rect_width - width) / 2
    when 2
      x += rect_width - width
    end
    case align2
    when 1
      y -= height / 2
    when 2
      y -= height
    end
    # Framework Drawing
    self.contents.fill_rect(x, y, width, height, color1)
    self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2)
    if align3 == 0
      if grade1 == 2
        grade1 = 3
      end
      if grade2 == 2
        grade2 = 3
      end
    end
    if (align3 == 1 and grade1 == 0) or grade1 > 0
      color = color3
      color3 = color4
      color4 = color
    end
    if (align3 == 1 and grade2 == 0) or grade2 > 0
      color = color5
      color5 = color6
      color6 = color
    end
    # Drawing of empty gauge
    self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4,
                                  color3, color4, grade1)
    if align3 == 1
      x += width - gauge
    end
    #  Drawing of actual gauge
    self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4,
                                  color5, color6, grade2)
  end
end

#------------------------------------------------------------------------------
# New routine added to the Bitmap class. 
#============================================================================== 

class Bitmap
#-------------------------------------------------------------------------- 
# * Rectangle Gradation Indicator
#   color1: Start color 
#   color2: Ending color 
#   align: 0: On side gradation 
#          1: Vertically gradation 
#          2: The gradation (intense concerning slantedly heavily note) 
#-------------------------------------------------------------------------- 
  def gradation_rect(x, y, width, height, color1, color2, align = 0)
    if align == 0
      for i in x...x + width
        red   = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
        green = color1.green +
                (color2.green - color1.green) * (i - x) / (width - 1)
        blue  = color1.blue +
                (color2.blue - color1.blue) * (i - x) / (width - 1)
        alpha = color1.alpha +
                (color2.alpha - color1.alpha) * (i - x) / (width - 1)
        color = Color.new(red, green, blue, alpha)
        fill_rect(i, y, 1, height, color)
      end
    elsif align == 1
      for i in y...y + height
        red   = color1.red +
                (color2.red - color1.red) * (i - y) / (height - 1)
        green = color1.green +
                (color2.green - color1.green) * (i - y) / (height - 1)
        blue  = color1.blue +
                (color2.blue - color1.blue) * (i - y) / (height - 1)
        alpha = color1.alpha +
                (color2.alpha - color1.alpha) * (i - y) / (height - 1)
        color = Color.new(red, green, blue, alpha)
        fill_rect(x, i, width, 1, color)
      end
    elsif align == 2
      for i in x...x + width
        for j in y...y + height
          red   = color1.red + (color2.red - color1.red) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          green = color1.green + (color2.green - color1.green) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          blue  = color1.blue + (color2.blue - color1.blue) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          alpha = color1.alpha + (color2.alpha - color1.alpha) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          color = Color.new(red, green, blue, alpha)
          set_pixel(i, j, color)
        end
      end
    elsif align == 3
      for i in x...x + width
        for j in y...y + height
          red   = color1.red + (color2.red - color1.red) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          green = color1.green + (color2.green - color1.green) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          blue  = color1.blue + (color2.blue - color1.blue) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          alpha = color1.alpha + (color2.alpha - color1.alpha) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          color = Color.new(red, green, blue, alpha)
          set_pixel(i, j, color)
        end
      end
    end
  end
end

I think i've made it as you want it, but may i suggest 1 thing?
You should swap places with the 0 and the G, i think it will look better when the player get some money. You can try it out and increase the money and see for yourself what i mean ^^
If you decide to change it, you can tell me and i will fix it for you :thumb:

Soo, did i do good? :tongue2:

Wow!  :crazy:

It works prefectly! Awesome! How long did it take you to code that?  :shock:

Gando":yaco8hw0 said:
Soo, did i do good? :tongue2:

You did great! I like it except for a few things...

Gando":yaco8hw0 said:
If you decide to change it, you can tell me and i will fix it for you :thumb:

Here's a picture of what I want you to fix...if you can't it's fine.

http://i229.photobucket.com/albums/ee138/speedolphins/CMSRequest2.jpg[/img]

The first thing I noticed was that it was awesome. The second thing I noticed was that the level was kinda smushed; is there a way to fix that?

Third, look at the zero for the gold, and then look at the zero for the EXP. It seems like the zero for the gold lost...quality? Can you fix that?

But overall, it's wonderful. If you cannot do this I can still use it.

Again, thank you Gando.
~speedolphins
 
speedolphins":1gj1p6yd said:
It works prefectly! Awesome! How long did it take you to code that?

ehm, it didn't take that long, a couple of minutes or so^^

speedolphins":1gj1p6yd said:
The first thing I noticed was that it was awesome. The second thing I noticed was that the level was kinda smushed; is there a way to fix that?

Third, look at the zero for the gold, and then look at the zero for the EXP. It seems like the zero for the gold lost...quality? Can you fix that?

I've updated the MenuStatus script, and i think it's what you wanted now.
The "Level" is normal size now, and the 0 for the gold looks normal now, (in my opinion)
I hope you like it! :thumb:
 
Gando":a0029slv said:
speedolphins":a0029slv said:
It works prefectly! Awesome! How long did it take you to code that?

ehm, it didn't take that long, a couple of minutes or so^^

speedolphins":a0029slv said:
The first thing I noticed was that it was awesome. The second thing I noticed was that the level was kinda smushed; is there a way to fix that?

Third, look at the zero for the gold, and then look at the zero for the EXP. It seems like the zero for the gold lost...quality? Can you fix that?

I've updated the MenuStatus script, and i think it's what you wanted now.
The "Level" is normal size now, and the 0 for the gold looks normal now, (in my opinion)
I hope you like it! :thumb:

It works fine now!  :lol: You don't know how much this means to me!!!

Thanks, Gando!

Happy game making,
~speedolphins
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top