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.

Guillaume777's Multi-Slot Equipment Script

Is there any status or equipment script that could forge into this like master of the wind script 
it got multi like this and a status script that could fit this.
 
I know this is long past dew, but your script worked. Thank you so much. And your comments helped me to the point that I think I could set it up any way I want now. So once again, thank you, you rock man.
 
How do I enable this script to use a different equipment set-up? Im making a military based game, set about 100 years into the future, in a semi-post apocalyptic world, and I need to be able to have different equipment slots. For example, my light recon unit can equip 1 weapon, 1 reactor, 1 shield, 1 optional equipment
while my heavy assault unit can equip 10 weapons, 3 reactors, 2 shields, 0 optional equipment
 
Hey, may i ask something ?
1.It is possible to create an equipment that can equiped on 2 or more diferent slot ?
2.Well, i have 2 slot, Left Hand and Righ Hand, both of them can wield weapon, now how i can make a shield can equiped on them just like weapon ?
 
Hey I was just wondering if someone could please help me setup a script modification to the left-equipment window because it needs to be in the Windows script of this multi-slot equipment script. Here is a link to the topic: http://www.rmxp.org/forums/index.php?topic=11821.0. It is Customizable Equip Screen script I have the top of the script (customization) and the lower top of the script (adding new stats) already complete. I just need the placement for this part of the script:

Code:
#============================================================
#   CHANGED!
#============================================================
      new_str = @actor.str
      new_dex = @actor.dex
      new_agi = @actor.agi
      new_int = @actor.int
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
#============================================================
      # Return equipment
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      # Draw in left window
#============================================================
#   CHANGED!
#============================================================
      @left_window.set_new_parameters(new_str, new_dex, new_agi, new_int, new_atk, new_pdef, new_mdef)
#============================================================
    end
  end

Could someone please help me place this script piece?


Also here is my Windows script just incase it has some errors :
Code:
#==============================================================================
# Multi-slot equipment script 
#------------------------------------------------------------------------------
# Section 3:  Windows
#------------------------------------------------------------------------------
# Guillaume777
# 6.2.1
# 2006/02/14
#==============================================================================
# Enhanced Equipment Window Customization#
      $desired_font = "Times New Roman"
      $desired_font_size = 18
      $desired_arrow_style = "→"
      $color_coded_bonuses = true 
      $stat_goes_up_color = Color.new(0, 200, 0)
      $stat_goes_down_color = Color.new(200, 0, 0)
      $stat_stays_the_same_color = Color.new(150, 150, 150)
      $display_str = [true, 1] # Strength
      $display_dex = [true, 2] # Dexterity
      $display_agi = [true, 3] # Agility
      $display_int = [true, 4] # Intelligence
      $display_atk = [true, 5] # Attack Power
      $display_pdef = [true, 6] # Physical Defense
      $display_mdef = [true, 7] # Magical Defense
      $list_start_y_pos = 25
      $seperation_distance = 15

  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
class Window_EquipLeft < Window_Base
  def initialize(actor)
    super(0, 64, 272, 192)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $desired_font  # "Equip" left side (Status) window font
    self.contents.font.size = $desired_font_size
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_level(@actor, 4, 20)
    if $display_str[0] == true
      draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_str[1]), 3)
    end
    if $display_dex[0] == true
      draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_dex[1]), 4)
    end
    if $display_agi[0] == true
      draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_agi[1]), 5)
    end
    if $display_int[0] == true
      draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_int[1]), 6)
    end
    if $display_atk[0] == true
      draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_atk[1]), 0)
    end
    if $display_pdef[0] == true
      draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 1)
    end
    if $display_mdef[0] == true
      draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 2)
    end
  
    if @new_str != nil and $display_str[0] == true
      if $color_coded_bonuses == true
        if @new_str > @actor.str
          self.contents.font.color = $stat_goes_up_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_str[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_str[1]), 36, 32, @new_str.to_s, 2)
        elsif @new_str == @actor.str
          self.contents.font.color = $stat_stays_the_same_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_str[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_str[1]), 36, 32, @new_str.to_s, 2)
        elsif @new_str < @actor.str
          self.contents.font.color = $stat_goes_down_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_str[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_str[1]), 36, 32, @new_str.to_s, 2)
        end
      elsif
      self.contents.font.color = system_color
      self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_str[1]), 40, 32, $desired_arrow_style, 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_str[1]), 36, 32, @new_str.to_s, 2)
    end
  end
    if @new_dex != nil and $display_dex[0] == true
      if $color_coded_bonuses == true
        if @new_dex > @actor.dex
          self.contents.font.color = $stat_goes_up_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_dex[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_dex[1]), 36, 32, @new_dex.to_s, 2)
        elsif @new_dex == @actor.dex
          self.contents.font.color = $stat_stays_the_same_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_dex[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_dex[1]), 36, 32, @new_dex.to_s, 2)
        elsif @new_dex < @actor.dex
          self.contents.font.color = $stat_goes_down_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_dex[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_dex[1]), 36, 32, @new_dex.to_s, 2)
        end
      elsif
      self.contents.font.color = system_color
      self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_dex[1]), 40, 32, $desired_arrow_style, 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_dex[1]), 36, 32, @new_dex.to_s, 2)
    end
  end
    if @new_agi != nil and $display_agi[0] == true
      if $color_coded_bonuses == true
        if @new_agi > @actor.agi
          self.contents.font.color = $stat_goes_up_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_agi[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_agi[1]), 36, 32, @new_agi.to_s, 2)
        elsif @new_agi == @actor.agi
          self.contents.font.color = $stat_stays_the_same_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_agi[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_agi[1]), 36, 32, @new_agi.to_s, 2)
        elsif @new_agi < @actor.agi
          self.contents.font.color = $stat_goes_down_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_agi[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_agi[1]), 36, 32, @new_agi.to_s, 2)
        end
      elsif
      self.contents.font.color = system_color
      self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_agi[1]), 40, 32, $desired_arrow_style, 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_agi[1]), 36, 32, @new_agi.to_s, 2)
    end
  end
    if @new_int != nil and $display_int[0] == true
      if $color_coded_bonuses == true
        if @new_int > @actor.int
          self.contents.font.color = $stat_goes_up_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_int[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_int[1]), 36, 32, @new_int.to_s, 2)
        elsif @new_int == @actor.int
          self.contents.font.color = $stat_stays_the_same_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_int[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_int[1]), 36, 32, @new_int.to_s, 2)
        elsif @new_int < @actor.int
          self.contents.font.color = $stat_goes_down_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_int[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_int[1]), 36, 32, @new_int.to_s, 2)
        end
      elsif
      self.contents.font.color = system_color
      self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_int[1]), 40, 32, $desired_arrow_style, 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_int[1]), 36, 32, @new_int.to_s, 2)
    end
  end
    if @new_atk != nil and $display_atk[0] == true
      if $color_coded_bonuses == true
        if @new_atk > @actor.atk
          self.contents.font.color = $stat_goes_up_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_atk[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_atk[1]), 36, 32, @new_atk.to_s, 2)
        elsif @new_atk == @actor.atk
          self.contents.font.color = $stat_stays_the_same_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_atk[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_atk[1]), 36, 32, @new_atk.to_s, 2)
        elsif @new_atk < @actor.atk
          self.contents.font.color = $stat_goes_down_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_atk[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_atk[1]), 36, 32, @new_atk.to_s, 2)
        end
      elsif
      self.contents.font.color = system_color
      self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_atk[1]), 40, 32, $desired_arrow_style, 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_atk[1]), 36, 32, @new_atk.to_s, 2)
    end
  end
    if @new_pdef != nil and $display_pdef[0] == true
      if $color_coded_bonuses == true
        if @new_pdef > @actor.pdef
          self.contents.font.color = $stat_goes_up_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 36, 32, @new_pdef.to_s, 2)
        elsif @new_pdef == @actor.pdef
          self.contents.font.color = $stat_stays_the_same_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 36, 32, @new_pdef.to_s, 2)
        elsif @new_pdef < @actor.pdef
          self.contents.font.color = $stat_goes_down_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 36, 32, @new_pdef.to_s, 2)
        end
      elsif
      self.contents.font.color = system_color
      self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 40, 32, $desired_arrow_style, 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 36, 32, @new_pdef.to_s, 2)
    end
  end
    if @new_mdef != nil and $display_mdef[0] == true
      if $color_coded_bonuses == true
        if @new_mdef > @actor.mdef
          self.contents.font.color = $stat_goes_up_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 36, 32, @new_mdef.to_s, 2)
        elsif @new_mdef == @actor.mdef
          self.contents.font.color = $stat_stays_the_same_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 36, 32, @new_mdef.to_s, 2)
        elsif @new_mdef < @actor.mdef
          self.contents.font.color = $stat_goes_down_color
          self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 40, 32, $desired_arrow_style, 1)
          self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 36, 32, @new_mdef.to_s, 2)
        end
      elsif
      self.contents.font.color = system_color
      self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 40, 32, $desired_arrow_style, 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 36, 32, @new_mdef.to_s, 2)
    end
  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_str, new_dex, new_agi, new_int, new_atk, new_pdef, new_mdef)
    if @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int or @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      refresh
    end
  end
end

#==============================================================================
# ** Scene_Equip
#------------------------------------------------------------------------------
#  This class performs equipment screen processing.
#==============================================================================
class Scene_Equip
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  alias g7_ms_scene_equip_main main
  def main
    @additional_initialize_done = false
    g7_ms_scene_equip_main
    for i in 5...@item_windows.size
      @item_windows[i].dispose unless @item_windows[i].nil?
    end
  end
  #--------------------------------------------------------------------------
  # * Initialize the extra right windows
  #--------------------------------------------------------------------------
  def g7_ms_scene_equip_additional_initialize
  unless @additional_initialize_done
    @item_windows = []
    @item_windows[0] = @item_window1  # Weapon
    @item_windows[1] = @item_window2  # Shield
    @item_windows[2] = @item_window3  # Helmet
    @item_windows[3] = @item_window4  # Armor
    @item_windows[4] = @item_window5  # Accessory
    nb_old_windows = @item_windows.size
    for i in nb_old_windows...@actor.armor_slots.max+1
      # Add the remaining windows for extra slots
      @item_windows.push(Window_EquipItem.new(@actor, i) )
      @item_windows[i].help_window = @help_window
    end
    @item_windows.push(Window_EquipOffHand.new(@actor, 0))
    @item_windows[-1].help_window = @help_window
    # If windows_stretch is true, stretch window
    if G7_MS_MOD::WINDOWS_STRETCH
      h = (@actor.weapon_slots.size + @actor.armor_slots.size + 1) * 32
      h2 = (G7_MS_MOD::MAX_SHOW_SLOTS+1) * 32
      h = [h, h2].min
      @right_window.height = h
      if @right_window.index > @actor.weapon_slots.size + @actor.armor_slots.size - 1
        @right_window.index = @actor.weapon_slots.size + @actor.armor_slots.size - 1
      end
      if @left_window.y + @left_window.height == 256
        @left_window.height = @right_window.height
      elsif G7_MS_MOD::HELP_AT_BOTTOM == true and @left_window.height == 416 then
        # Make left window shorter
        @left_window.height -= 64
      end
      y_pos = (@right_window.y + @right_window.height)
      y_space = 480 - y_pos
      # If help at bottom, reduce bottom item window size
      if G7_MS_MOD::HELP_AT_BOTTOM == true then y_space -= 64  end 
      for item_window in @item_windows
        next if item_window.nil?
        item_window.y = y_pos
        item_window.height = y_space
      end
    end
    @additional_initialize_done = true
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh and make visible the correct right window
  #-------------------------------------------------------------------------- 
  alias g7_ms_scene_equip_refresh refresh
  def refresh
    # This part is used to refresh the equipped item at the right window
    g7_ms_scene_equip_additional_initialize
    @actor.translucent_texts.fill(false)
    @actor.equip_type_force = index_to_equip_part(@right_window.index)
    @right_window.item_fix_on
    @right_window.scroll_fix_on
    save = @right_window.index
    @right_window.index = index_to_equip_kind(@right_window.index)
    if @right_window.index == 0 and @actor.ignore_offhand? != true then
      if @actor.nb_offhand_required(save) > 0 then
        @right_window.index = @item_windows.size-1
      end
    end
    @actor.equip_from_menu = true
    # Ensure current equipment will get properly stored...
    @actor.equip_mode = 'STORE'
    # ...and re-equiped
    @item_window = @item_windows[@right_window.index]
    @item_windows[@right_window.index].visible = true
    for i in 0...@item_windows.size
      if i != @right_window.index then
        @item_windows[i].visible = false
      end
    end
    # Equip and remove item
    g7_ms_scene_equip_refresh
    @actor.equip_from_menu = false                           
    @actor.equip_mode = nil
    @actor.equip_type_force = nil
    @right_window.index = save 
    @right_window.scroll_fix_off
    @right_window.item_fix_off
    if @item_window.index != @old_index
      @right_window.refresh
    end
    @old_index = @item_window.index
  end
  #--------------------------------------------------------------------------
  # * Convert the right_window.index to equip_type
  #--------------------------------------------------------------------------
  alias g7_ms_scene_equip_update_item update_item
  def update_item 
    # This changes the @right_window.index to the correct value to take 
    # account of extra slots
    @actor.equip_type_force = index_to_equip_part(@right_window.index)
    @right_window.item_fix_on
    @right_window.scroll_fix_on
    save = @right_window.index
    @right_window.index = index_to_equip_kind(@right_window.index)
    @actor.equip_from_menu = true
    # Equip item
    g7_ms_scene_equip_update_item
    @actor.equip_from_menu = false
    @actor.equip_type_force = nil
    # If not in item_window screen
    if @item_window.index == -1
      # If shield-weapon can modify each other
      if @actor.shield_hand_wield == true and 
        if @right_window.index == @actor.shield_hand_slot then
          @item_windows[0].refresh
          @item_windows[-1].refresh
        elsif @right_window.index == 0
          # Refresh the shield slot
          @item_windows[@actor.shield_hand_slot].refresh
        end
      end
      if @right_window.index == 0 and @actor.ignore_offhand? != true then
        if @item_window == @item_windows[-1] then 
          @item_windows[0].refresh
        elsif @item_window == @item_windows[0] then
          @item_windows[-1].refresh
        end
      end
    end
    @right_window.index = save 
    @right_window.scroll_fix_off
    @right_window.item_fix_off
    @actor.equip_type_force = nil
  end
  #--------------------------------------------------------------------------
  # * Convert index to equip part
  #     index : slot number
  #--------------------------------------------------------------------------
  def index_to_equip_part(index)
    # Return index of slot in the 
    # array [0, @actor.armor_slots, actor.weapon_slots] 
    # If Armor
    if index >= @actor.weapon_slots.size
      return index - (@actor.weapon_slots.size - 1)
    # If extra weapon
    elsif index >= 1
      # Make it last
      return index + [@actor.armor_slots.size, 4].max
    else
      return 0
    end
 end
  #--------------------------------------------------------------------------
  # Convert index to equip kind
  #     index : slot number
  #--------------------------------------------------------------------------
  def index_to_equip_kind(index)
    # Return index of slot in either actor.weapon_slots or actor.armor_slots
    i = index_to_equip_part(index)
    # If armor
    if index >= @actor.weapon_slots.size
      set = @actor.armor_slots[i-1] 
    # If weapon  
    else
      i = i == 0 ? 0 : i - [@actor.armor_slots.size, 4].max
      set = @actor.weapon_slots[i]
    end
    return set != nil ? set : 0
  end
      # Erase parameters for after equipment change

#==============================================================================
# ** Window_EquipRight
#------------------------------------------------------------------------------
#  This window displays items the actor is currently equipped with on the
#  equipment screen.
#==============================================================================
class Window_EquipRight < Window_Selectable
  #--------------------------------------------------------------------------
  # * Item Fix On
  #--------------------------------------------------------------------------
  def item_fix_on
    # Fix window
    @fixed_item = @data[self.index]
    @fixed = true
  end
  #--------------------------------------------------------------------------
  # * Item Fix Off
  #--------------------------------------------------------------------------
  def item_fix_off
    #stop fixing window
    @fixed_item = nil
    @fixed = false
  end
  #--------------------------------------------------------------------------
  # * Don't scroll right window if you press L or R
  #--------------------------------------------------------------------------
  def update
    if Input.repeat?(Input::R) or  Input.repeat?(Input::L) then
      return
    else
      super
    end
  end
  #--------------------------------------------------------------------------
  # Draws equipped items with support of translucent and cursed items
  #     item        : item
  #     x           : draw spot x-coordinate
  #     y           : draw spot y-coordinate
  #     translucent : draw translucent
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y, translucent = false)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    if item.cursed
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
      self.contents.font.color = G7_MS_MOD::CURSED_COLOR
    elsif translucent 
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), 128)
      self.contents.font.color = disabled_color
    else
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
      self.contents.font.color = normal_color
    end
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
  #--------------------------------------------------------------------------
  # * Prevent needless update of item quantities in item window
  #--------------------------------------------------------------------------
  alias g7_ms_window_equipright_item item 
  def item
    # This ensures that the number of items doesn't get updated if you move 
    # cursor in item window
    return @fixed_item if @fixed
    return g7_ms_window_equipright_item
  end
  #--------------------------------------------------------------------------
  # * Change the height of right windows to fit the slots
  #     actor : actor
  #--------------------------------------------------------------------------
  alias g7_ms_window_equipright_initialize initialize
  def initialize(actor)
    # Initialize with a different height
    g7_ms_window_equipright_initialize(actor)
    # Total height of right window
    h = (actor.weapon_slots.size + actor.armor_slots.size) * 32
    # Change the height                                                        
    self.contents = Bitmap.new(width - 32, h)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Shows the slot names and the name of the items you have equipped
  #--------------------------------------------------------------------------
  def refresh
    # Replaced method to show caption of all items and slot
    self.contents.clear
    @data = [] 
    # Begin Multi-slot equipment script Edit
    self.contents.font.name = G7_MS_MOD::FONT_NAME
    for i in 0...@actor.weapon_slots.size
      # Push the name(s) of the weapon(s)
      @data.push($data_weapons[@actor.weapon_ids[i]])
    end
    for i in 0...@actor.armor_slots.size
      # Push the names of the armors
      @data.push($data_armors[@actor.armor_ids[i]])
    end
    @caption = []
    for i in 0...@actor.weapon_slots.size
      # Push the name(s) of the weapon slots
      @caption.push(@actor.weapon_slot_names[i])
    end
    for i in 0...@actor.armor_slots.size
      # Push the names of the armor slots
      @caption.push(@actor.armor_slot_names[@actor.armor_slots[i]-1])
    end
    @item_max = @data.size
    if @actor.translucent_texts == nil then @actor.translucent_texts = Array.new end
    for i in 0...@data.size
      if @caption[i] != nil
        self.contents.font.color = system_color
        # Draw the name of the slots
        self.contents.draw_text(4, 32 * i, 92, 32, @caption[i])
      end
      # Draw the name of the equipment
      draw_item_name(@data[i], 92, 32 * i, @actor.translucent_texts[i])
    end
    # Support for other script
    if defined? xrxs_additional_refresh
      xrxs_additional_refresh
    end
  # End Multi-slot equipment script Edit
  end
  #--------------------------------------------------------------------------
  # * End of CLASS:  Window EquipRight
  #--------------------------------------------------------------------------
end



#============================================================================
# ** Window_EquipOffHand
#----------------------------------------------------------------------------
#  A new window class that displays an equipped item in the actor's off hand.
#============================================================================
class Window_EquipOffHand < Window_EquipItem
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # Add equippable weapons
    weapon_set = $data_classes[@actor.class_id].weapon_set
    for i in 1...$data_weapons.size
      if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
        weapon = $data_weapons[i]
        if weapon.needs_offhand == false
          if G7_MS_MOD::TWOHANDED_IN_OFFHAND != false and weapon.nb_hands <= 1 then
            @data.push(weapon)
          end
        end
      end
    end
    # Add blank page
    @data.push(nil)
    # Make a bit map and draw all items
    @item_max = @data.size
    self.contents = Bitmap.new(width - 32, row_max * 32)
    self.contents.font.name = G7_MS_MOD::FONT_NAME
    #self.contents.font.size = 24
    for i in 0...@item_max-1
      draw_item(i)
    end
    if G7_MS_MOD::SHOW_REMOVE then
       i = @item_max -1
       x = 4 + i % @column_max * (288 + 32)
       y = i / @column_max * 32
       self.contents.draw_text(x+4, y, 100, 32, '[Remove]')
    end
  end
  #--------------------------------------------------------------------------
  # * End of CLASS:  Window EquipOffHand
  #--------------------------------------------------------------------------
end



#==============================================================================
# ** Window_Selectable
#------------------------------------------------------------------------------
#  This window class contains cursor movement and scroll functions.
#==============================================================================
class Window_Selectable < Window_Base
  #--------------------------------------------------------------------------
  # * Scroll Fix On
  #--------------------------------------------------------------------------
  def scroll_fix_on
    @scroll_fixed = true
  end
  #--------------------------------------------------------------------------
  # * Scroll Fix Off
  #--------------------------------------------------------------------------  
  def scroll_fix_off
    @scroll_fixed = false
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # * Update Cursor Rectangle
  #--------------------------------------------------------------------------
  alias g7_ms_update_cursor_rect update_cursor_rect
  def update_cursor_rect
    # This prevents the windows from scrolling if scroll is fixed
    # This was added to ensure that if there are few slots, the right equip
    # screen doesn't scroll needlessly
    return if @scroll_fixed
    g7_ms_update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # * End of CLASS:  Window Selectable
  #--------------------------------------------------------------------------  
end



#==============================================================================
# *** Global IF condition
#     Shows a new status window if Status_window_arrange is true
#==============================================================================
if G7_MS_MOD::STATUS_WINDOW_ARRANGE
  #============================================================================
  # ** Window_Status
  #----------------------------------------------------------------------------
  #  This window displays full status specs on the status screen.
  #============================================================================
  class Window_Status < Window_Base
    #--------------------------------------------------------------------------
    # * Refresh
    #--------------------------------------------------------------------------
    def refresh
      # Begin Multi-slot equipment script Edit
      self.contents.font.name = G7_MS_MOD::FONT_NAME
      # End Multi-slot equipment script Edit
      self.contents.clear 
      draw_actor_graphic(@actor, 40, 112)
      draw_actor_name(@actor, 4, 0)
      draw_actor_class(@actor, 4 + 144, 0)
      draw_actor_level(@actor, 96, 32)
      draw_actor_state(@actor, 96, 64)
      draw_actor_hp(@actor, 96, 112, 172)
      draw_actor_sp(@actor, 96, 144, 172)
      draw_actor_parameter(@actor, 96, 192, 0)
      draw_actor_parameter(@actor, 96, 224, 1)
      draw_actor_parameter(@actor, 96, 256, 2)
      draw_actor_parameter(@actor, 96, 304, 3)
      draw_actor_parameter(@actor, 96, 336, 4)
      draw_actor_parameter(@actor, 96, 368, 5)
      draw_actor_parameter(@actor, 96, 400, 6)
      # Begin Multi-slot equipment script Edit
      if G7_MS_MOD::EVADE
        # Activate if you have a draw_actor_paramter method that draws evade
        draw_actor_parameter(@actor, 96, 432, 7)
      end
      self.contents.font.color = system_color
      self.contents.draw_text(320, 16, 80, 32, 'EXP')
      self.contents.draw_text(320, 48, 80, 32, 'NEXT')
      self.contents.font.color = normal_color
      self.contents.draw_text(320 + 80, 16, 84, 32, @actor.exp_s, 2)
      self.contents.draw_text(320 + 80, 48, 84, 32, @actor.next_rest_exp_s, 2)
      self.contents.font.color = system_color
      self.contents.draw_text(320, 80, 96, 32, 'Equipment')
      y = 108
      for i in 0...@actor.weapon_slots.size
        draw_item_name($data_weapons[@actor.weapon_ids[i]], 320 + 16, y)
        y += G7_MS_MOD::STATUS_WINDOW_SPACING
      end
      for i in 0...@actor.armor_slots.size
        draw_item_name($data_armors[@actor.armor_ids[i]], 320 + 16, y)
        y += G7_MS_MOD::STATUS_WINDOW_SPACING
      end
      # End Multi-slot equipment script Edit      
    end
    #------------------------------------------------------------------------
    # * End of CLASS:  Window Status
    #------------------------------------------------------------------------
  end
  #--------------------------------------------------------------------------
  # * End of Global IF condition
  #--------------------------------------------------------------------------
end

All I know is it has one error and I need help for one placement, please someone who knows this script (or doesn't) help me out here.

!EDIT!: Self-Fixed.
 
I'm getting an error message when I attempt to equipt items to the extra slots. From what I know about programming, the ">" sign isn't being recognized. the error is an undefined modifier and it's in line 182 of the actors section, but I can see that it's in some others as well. What do I need to do to fix it?
 

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