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.

Equip Screen shows all stats

Currently, in the default system, the equip menu only shows changes to attack and defense. What I want is it to show changes to all stats. Now, I realize there is a script by Trance, but it is not compatible with the Multi-Slot Equipment script. So, if anyone can do this and make it compatible with the Multi-Slot Equipment script, I'd be grateful.

Thank you.
 

Mac

Member

Easy as one, two, three ^_^

Here you go.



Go into Scene_Equip and search for this line:-
Code:
      @left_window.set_new_parameters(nil, nil, nil)
Replace that line with this.
Code:
      @left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil)



Then scroll down to the lines:-
Code:
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
And replace these with this:-
Code:
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      new_str = @actor.str
      new_dex = @actor.dex
      new_agi = @actor.agi
      new_int = @actor.int



Keep scrolling down till you reach this line:-
Code:
@left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
Replace that with this:-
Code:
@left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)



And finally replace all Window_EquipLeft with this:-
Code:
#==============================================================================
# ** Window_EquipLeft
#------------------------------------------------------------------------------
#  This window displays actor parameter changes on the equipment screen.
#==============================================================================

class Window_EquipLeft < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 64, 272, 192)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 120, 0)
    draw_actor_level(@actor, 4, 20)
    draw_actor_parameter(@actor, 4, 42, 0)
    draw_actor_parameter(@actor, 4, 57, 1)
    draw_actor_parameter(@actor, 4, 72, 2)
    draw_actor_parameter(@actor, 4, 87, 3)
    draw_actor_parameter(@actor, 4, 102, 4)
    draw_actor_parameter(@actor, 4, 117, 5)
    draw_actor_parameter(@actor, 4, 132, 6)
    if @new_atk != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 42, 40, 32, "->", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, 42, 36, 32, @new_atk.to_s, 2)
    end
    if @new_pdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 57, 40, 32, "->", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, 57, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 72, 40, 32, "->", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, 72, 36, 32, @new_mdef.to_s, 2)
    end
    if @new_str != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 87, 40, 32, "->", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, 87, 36, 32, @new_str.to_s, 2)
    end
    if @new_dex != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 102, 40, 32, "->", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, 102, 36, 32, @new_dex.to_s, 2)
    end
    if @new_agi != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 117, 40, 32, "->", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, 117, 36, 32, @new_agi.to_s, 2)
    end
    if @new_int != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 132, 40, 32, "->", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, 132, 36, 32, @new_int.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Set parameters after changing equipment
  #     new_atk  : attack power after changing equipment
  #     new_pdef : physical defense after changing equipment
  #     new_mdef : magic defense after changing equipment
  #--------------------------------------------------------------------------
  def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
    if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      refresh
    end
  end
end

And thats it, simple and clean :D
 

Mac

Member

Thats very simple, give me a moment.

Here we go:-

Just replace Window_EquipLeft with this.

Code:
#==============================================================================
# ** Window_EquipLeft
#------------------------------------------------------------------------------
#  This window displays actor parameter changes on the equipment screen.
#==============================================================================

class Window_EquipLeft < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 64, 272, 192)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 120, 0)
    draw_actor_level(@actor, 4, 20)
    draw_actor_parameter(@actor, 4, 42, 0)
    draw_actor_parameter(@actor, 4, 57, 1)
    draw_actor_parameter(@actor, 4, 72, 2)
    draw_actor_parameter(@actor, 4, 87, 3)
    draw_actor_parameter(@actor, 4, 102, 4)
    draw_actor_parameter(@actor, 4, 117, 5)
    draw_actor_parameter(@actor, 4, 132, 6)
    if @new_atk != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 42, 40, 32, "->", 1)
      self.contents.font.color = crisis_color
      self.contents.draw_text(200, 42, 36, 32, @new_atk.to_s, 2)
    end
    if @new_pdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 57, 40, 32, "->", 1)
      self.contents.font.color = crisis_color
      self.contents.draw_text(200, 57, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 72, 40, 32, "->", 1)
      self.contents.font.color = crisis_color
      self.contents.draw_text(200, 72, 36, 32, @new_mdef.to_s, 2)
    end
    if @new_str != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 87, 40, 32, "->", 1)
      self.contents.font.color = crisis_color
      self.contents.draw_text(200, 87, 36, 32, @new_str.to_s, 2)
    end
    if @new_dex != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 102, 40, 32, "->", 1)
      self.contents.font.color = crisis_color
      self.contents.draw_text(200, 102, 36, 32, @new_dex.to_s, 2)
    end
    if @new_agi != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 117, 40, 32, "->", 1)
      self.contents.font.color = crisis_color
      self.contents.draw_text(200, 117, 36, 32, @new_agi.to_s, 2)
    end
    if @new_int != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 132, 40, 32, "->", 1)
      self.contents.font.color = crisis_color
      self.contents.draw_text(200, 132, 36, 32, @new_int.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Set parameters after changing equipment
  #     new_atk  : attack power after changing equipment
  #     new_pdef : physical defense after changing equipment
  #     new_mdef : magic defense after changing equipment
  #--------------------------------------------------------------------------
  def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
    if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      refresh
    end
  end
end
 
Well, thats one part. I'm sorry I forgot to mention, but what I wanted was a different color depending on if the item will raise or lower a stat (Like, green for raise and red for lower)

Sorry about that. and thank you, whether you can do it or not.
 

Mac

Member

Ok done finally ^_^

Here we go:-

1st:- Replace the Scene_Equip with this.

Code:
#==============================================================================
# ** Scene_Equip
#------------------------------------------------------------------------------
#  This class performs equipment screen processing.
#==============================================================================

class Scene_Equip
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor_index : actor index
  #     equip_index : equipment index
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    @equip_index = equip_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Get actor
    @actor = $game_party.actors[@actor_index]
    # Make windows
    @help_window = Window_Help.new
    @left_window = Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @item_window1 = Window_EquipItem.new(@actor, 0)
    @item_window2 = Window_EquipItem.new(@actor, 1)
    @item_window3 = Window_EquipItem.new(@actor, 2)
    @item_window4 = Window_EquipItem.new(@actor, 3)
    @item_window5 = Window_EquipItem.new(@actor, 4)
    # Associate help window
    @right_window.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    # Set cursor position
    @right_window.index = @equip_index
    refresh
    # 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
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Set item window to visible
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    # Get currently equipped item
    item1 = @right_window.item
    # Set current item window to @item_window
    case @right_window.index
    when 0
      @item_window = @item_window1
    when 1
      @item_window = @item_window2
    when 2
      @item_window = @item_window3
    when 3
      @item_window = @item_window4
    when 4
      @item_window = @item_window5
    end
    # If right window is active
    if @right_window.active
      # Erase parameters for after equipment change
      @left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil)
    end
    # If item window is active
    if @item_window.active
      # Get currently selected item
      item2 = @item_window.item
      # Change equipment
      last_hp = @actor.hp
      last_sp = @actor.sp
      last_atk = @actor.atk
      last_pdef = @actor.pdef
      last_mdef = @actor.mdef
      last_str = @actor.str
      last_dex = @actor.dex
      last_agi = @actor.agi
      last_int = @actor.int
      last_eva = @actor.eva
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      # Get parameters for after equipment change
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      new_str = @actor.str
      new_dex = @actor.dex
      new_agi = @actor.agi
      new_int = @actor.int
      # Changes in equipment
      @left_window.equip = [0, 0, 0, 0, 0, 0, 0, 0]
      if new_atk > last_atk
        @left_window.equip[0] = 1
      end
      if new_atk < last_atk
        @left_window.equip[0] = -1
      end
      if new_pdef > last_pdef
        @left_window.equip[1] = 1
      end
      if new_pdef < last_pdef
        @left_window.equip[1] = -1
      end
      if new_mdef > last_mdef
        @left_window.equip[2] = 1
      end
      if new_mdef < last_mdef
        @left_window.equip[2] = -1
      end
       if new_str > last_str
        @left_window.equip[3] = 1
      end
      if new_str < last_str
        @left_window.equip[3] = -1
      end
        if new_dex > last_dex
        @left_window.equip[4] = 1
      end
      if new_dex < last_dex
        @left_window.equip[4] = -1
      end
      if new_agi > last_agi
        @left_window.equip[5] = 1
      end
      if new_agi < last_agi
        @left_window.equip[5] = -1
      end
      if new_int > last_int
        @left_window.equip[6] = 1
      end
      if new_int < last_int
        @left_window.equip[6] = -1
      end
      # Return equipment
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      # Draw in left window
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @left_window.update
    @right_window.update
    @item_window.update
    refresh
    # If right window is active: call update_right
    if @right_window.active
      update_right
      return
    end
    # If item window is active: call update_item
    if @item_window.active
      update_item
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when right window is active)
  #--------------------------------------------------------------------------
  def update_right
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(2)
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If equipment is fixed
      if @actor.equip_fix?(@right_window.index)
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Activate item window
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # If R button was pressed
    if Input.trigger?(Input::R)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To next actor
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    # If L button was pressed
    if Input.trigger?(Input::L)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To previous actor
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when item window is active)
  #--------------------------------------------------------------------------
  def update_item
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Activate right window
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Play equip SE
      $game_system.se_play($data_system.equip_se)
      # Get currently selected data on the item window
      item = @item_window.item
      # Change equipment
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      # Activate right window
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      # Remake right window and item window contents
      @right_window.refresh
      @item_window.refresh
      return
    end
  end
end

2nd:- Replace Window_EquipLeft with this.

Code:
#==============================================================================
# ** Window_EquipLeft
#------------------------------------------------------------------------------
#  This window displays actor parameter changes on the equipment screen.
#==============================================================================

class Window_EquipLeft < Window_Base
  attr_accessor :equip
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 64, 272, 192)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    @equip = [0, 0, 0, 0, 0, 0, 0, 0]
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 120, 0)
    draw_actor_level(@actor, 4, 20)
    draw_actor_parameter(@actor, 4, 42, 0)
    draw_actor_parameter(@actor, 4, 57, 1)
    draw_actor_parameter(@actor, 4, 72, 2)
    draw_actor_parameter(@actor, 4, 87, 3)
    draw_actor_parameter(@actor, 4, 102, 4)
    draw_actor_parameter(@actor, 4, 117, 5)
    draw_actor_parameter(@actor, 4, 132, 6)
    if @new_atk != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 42, 40, 32, "->", 1)
      if @equip[0] == 0
      self.contents.font.color = normal_color
      elsif @equip[0] == -1
      self.contents.font.color = decrease_color
      else
      self.contents.font.color = increase_color
      end
      self.contents.draw_text(200, 42, 36, 32, @new_atk.to_s, 2)
    end
    if @new_pdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 57, 40, 32, "->", 1)
      if @equip[1] == 0
      self.contents.font.color = normal_color
      elsif @equip[1] == -1
      self.contents.font.color = decrease_color
      else
      self.contents.font.color = increase_color
      end
      self.contents.draw_text(200, 57, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 72, 40, 32, "->", 1)
      if @equip[2] == 0
      self.contents.font.color = normal_color
      elsif @equip[2] == -1
      self.contents.font.color = decrease_color
      else
      self.contents.font.color = increase_color
      end
      self.contents.draw_text(200, 72, 36, 32, @new_mdef.to_s, 2)
    end
    if @new_str != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 87, 40, 32, "->", 1)
      if @equip[3] == 0
      self.contents.font.color = normal_color
      elsif @equip[3] == -1
      self.contents.font.color = decrease_color
      else
      self.contents.font.color = increase_color
      end
      self.contents.draw_text(200, 87, 36, 32, @new_str.to_s, 2)
    end
    if @new_dex != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 102, 40, 32, "->", 1)
      if @equip[4] == 0
      self.contents.font.color = normal_color
      elsif @equip[4] == -1
      self.contents.font.color = decrease_color
      else
      self.contents.font.color = increase_color
      end
      self.contents.draw_text(200, 102, 36, 32, @new_dex.to_s, 2)
    end
    if @new_agi != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 117, 40, 32, "->", 1)
      if @equip[5] == 0
      self.contents.font.color = normal_color
      elsif @equip[5] == -1
      self.contents.font.color = decrease_color
      else
      self.contents.font.color = increase_color
      end
      self.contents.draw_text(200, 117, 36, 32, @new_agi.to_s, 2)
    end
    if @new_int != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 132, 40, 32, "->", 1)
      if @equip[6] == 0
      self.contents.font.color = normal_color
      elsif @equip[6] == -1
      self.contents.font.color = decrease_color
      else
      self.contents.font.color = increase_color
      end
      self.contents.draw_text(200, 132, 36, 32, @new_agi.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Set parameters after changing equipment
  #     new_atk  : attack power after changing equipment
  #     new_pdef : physical defense after changing equipment
  #     new_mdef : magic defense after changing equipment
  #--------------------------------------------------------------------------
  def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
    if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      refresh
    end
  end
end

3rd and Finally:- Add this below def knockout_color.
Code:
  #--------------------------------------------------------------------------
  # * Get Increase Text Color
  #--------------------------------------------------------------------------
  def increase_color
    return Color.new(255, 255, 64)
  end
  #--------------------------------------------------------------------------
  # * Get Decrease Text Color
  #--------------------------------------------------------------------------
  def decrease_color
    return Color.new(255, 10, 10)
  end
 

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