I'm having problems with my Window_EquipRight Script.
Here's the stuff I have:
DATABASE
Weapon => "Main-Wep"
Shield => "Sec-Wep"
Helmet => Removed
Body Armor => "Accessory" Surprising, I leave the Main Armor in the Body Armor section and it appears where the "Body" slot is but the "Body" slot is the default Accessory Section so it needs to be in that section but it stays in the the Accessory Section.
Accessory => "Body"
SCRIPTS Default Window_EquipRight
Default Window_EquipItem
My Window_EquipRight
My Window_EqupItem
No matter what I do, the initial Accessory with the Actor will always display and doesn't seem to be able to be un-equipped.
The Body Armor doesn't show and when it does show, it won't show the other stuff in the item window unless you move the cursor over one of the other slots such as Accessory.
This is the main part I've edited.
The stuff I need help with:
How to make the equipped Body Armor show and the other stuff that the party has within the item window
Items need to be in the righ section of each Window.
Example:
The Right Way=> Equipped Shield: Silver Shield Item Window: Round Shield : 1 Small Shield : 2
For Me=> Equipped Shield: Silver Shield Item Window: Steel Plate Armor : 2 Bronze Chestplate: 1
How to fix the Accessory Issue.
You may use my Window_EquipRight and Window_EquipItem and try to test it and fix it. I would appreciate it. :smile:
Here's the stuff I have:
DATABASE
Weapon => "Main-Wep"
Shield => "Sec-Wep"
Helmet => Removed
Body Armor => "Accessory" Surprising, I leave the Main Armor in the Body Armor section and it appears where the "Body" slot is but the "Body" slot is the default Accessory Section so it needs to be in that section but it stays in the the Accessory Section.
Accessory => "Body"
SCRIPTS Default Window_EquipRight
Code:
Â
#============================================================================
# ** Window_EquipRight
#------------------------------------------------------------------------------
# Â This window displays items the actor is currently equipped with on the
# Â equipment screen.
#==============================================================================
Â
class Window_EquipRight < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #   actor : actor
 #--------------------------------------------------------------------------
 def initialize(actor)
  super(272, 64, 368, 192)
  self.contents = Bitmap.new(width - 32, height - 32)
  @actor = actor
  refresh
  self.index = 0
 end
 #--------------------------------------------------------------------------
 # * Item Acquisition
 #--------------------------------------------------------------------------
 def item
  return @data[self.index]
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  @data = []
  @data.push($data_weapons[@actor.weapon_id])
  @data.push($data_armors[@actor.armor1_id])
  @data.push($data_armors[@actor.armor2_id])
  @data.push($data_armors[@actor.armor3_id])
  @data.push($data_armors[@actor.armor4_id])
  @item_max = @data.size
  self.contents.font.color = system_color
  self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
  self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
  self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
  self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
  self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
  draw_item_name(@data[0], 92, 32 * 0)
  draw_item_name(@data[1], 92, 32 * 1)
  draw_item_name(@data[2], 92, 32 * 2)
  draw_item_name(@data[3], 92, 32 * 3)
  draw_item_name(@data[4], 92, 32 * 4)
 end
 #--------------------------------------------------------------------------
 # * Help Text Update
 #--------------------------------------------------------------------------
 def update_help
  @help_window.set_text(self.item == nil ? "" : self.item.description)
 end
end
Â
Code:
Â
#==============================================================================
# ** Window_EquipItem
#------------------------------------------------------------------------------
# Â This window displays choices when opting to change equipment on the
# Â equipment screen.
#==============================================================================
Â
class Window_EquipItem < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #   actor    : actor
 #   equip_type : equip region (0-3)
 #--------------------------------------------------------------------------
 def initialize(actor, equip_type)
  super(0, 256, 640, 224)
  @actor = actor
  @equip_type = equip_type
  @column_max = 2
  refresh
  self.active = false
  self.index = -1
 end
 #--------------------------------------------------------------------------
 # * Item Acquisition
 #--------------------------------------------------------------------------
 def item
  return @data[self.index]
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
  if self.contents != nil
   self.contents.dispose
   self.contents = nil
  end
  @data = []
  # Add equippable weapons
  if @equip_type == 0
   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)
     @data.push($data_weapons[i])
    end
   end
  end
  # Add equippable armor
  if @equip_type != 0
   armor_set = $data_classes[@actor.class_id].armor_set
   for i in 1...$data_armors.size
    if $game_party.armor_number(i) > 0 and armor_set.include?(i)
     if $data_armors[i].kind == @equip_type-1
      @data.push($data_armors[i])
     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)
  for i in 0...@item_max-1
   draw_item(i)
  end
 end
 #--------------------------------------------------------------------------
 # * Draw Item
 #   index : item number
 #--------------------------------------------------------------------------
 def draw_item(index)
  item = @data[index]
  x = 4 + index % 2 * (288 + 32)
  y = index / 2 * 32
  case item
  when RPG::Weapon
   number = $game_party.weapon_number(item.id)
  when RPG::Armor
   number = $game_party.armor_number(item.id)
  end
  bitmap = RPG::Cache.icon(item.icon_name)
  self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  self.contents.font.color = normal_color
  self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
  self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
 end
 #--------------------------------------------------------------------------
 # * Help Text Update
 #--------------------------------------------------------------------------
 def update_help
  @help_window.set_text(self.item == nil ? "" : self.item.description)
 end
end
Â
Code:
Â
#==============================================================================
# ** Window_EquipRight
#------------------------------------------------------------------------------
# Â This window displays items the actor is currently equipped with on the
# Â equipment screen.
#==============================================================================
Â
class Window_EquipRight < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #   actor : actor
 #--------------------------------------------------------------------------
 def initialize(actor)
  super(272, 64, 368, 192)
  self.contents = Bitmap.new(width - 32, height - 32)
  @actor = actor
  refresh
  self.index = 0
 end
 #--------------------------------------------------------------------------
 # * Item Acquisition
 #--------------------------------------------------------------------------
 def item
  return @data[self.index]
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
  self.contents.clear
  @data = []
  @data.push($data_weapons[@actor.weapon_id])
  @data.push($data_armors[@actor.armor1_id])
  @data.push($data_armors[@actor.armor3_id])
  @data.push($data_armors[@actor.armor4_id])
  @item_max = @data.size
  self.contents.font.color = system_color
  self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
  self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
  self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor3)
  self.contents.draw_text(5, 32 * 3, 92, 32, $data_system.words.armor4)
  draw_item_name(@data[0], 122, 32 * 0)
  draw_item_name(@data[1], 122, 32 * 1)
  draw_item_name(@data[3], 122, 32 * 2)
  draw_item_name(@data[4], 122, 32 * 3)
 end
 #--------------------------------------------------------------------------
 # * Help Text Update
 #--------------------------------------------------------------------------
 def update_help
  @help_window.set_text(self.item == nil ? "" : self.item.description)
 end
end
Â
Code:
Â
#==============================================================================
# ** Window_EquipItem
#------------------------------------------------------------------------------
# Â This window displays choices when opting to change equipment on the
# Â equipment screen.
#==============================================================================
Â
class Window_EquipItem < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #   actor    : actor
 #   equip_type : equip region (0-3)
 #--------------------------------------------------------------------------
 def initialize(actor, equip_type)
  super(0, 256, 640, 224)
  @actor = actor
  @equip_type = equip_type
  @column_max = 1
  refresh
  self.active = false
  self.index = -1
 end
 #--------------------------------------------------------------------------
 # * Item Acquisition
 #--------------------------------------------------------------------------
 def item
  return @data[self.index]
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
  if self.contents != nil
   self.contents.dispose
   self.contents = nil
  end
  @data = []
  # Add equippable weapons
  if @equip_type == 0
   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)
     @data.push($data_weapons[i])
    end
   end
  end
  # Add equippable armor
  if @equip_type != 0
   armor_set = $data_classes[@actor.class_id].armor_set
   for i in 1...$data_armors.size
    if $game_party.armor_number(i) > 0 and armor_set.include?(i)
     if $data_armors[i].kind == @equip_type-1
      @data.push($data_armors[i])
     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)
  for i in 0...@item_max-1
   draw_item(i)
  end
 end
 #--------------------------------------------------------------------------
 # * Draw Item
 #   index : item number
 #--------------------------------------------------------------------------
 def draw_item(index)
  item = @data[index]
  x = 4 + index % 2 * (288 + 32)
  y = index / 2 * 32
  case item
  when RPG::Weapon
   number = $game_party.weapon_number(item.id)
  when RPG::Armor
   number = $game_party.armor_number(item.id)
  end
  bitmap = RPG::Cache.icon(item.icon_name)
  self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  self.contents.font.color = normal_color
  self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
 end
 #--------------------------------------------------------------------------
 # * Help Text Update
 #--------------------------------------------------------------------------
 def update_help
  @help_window.set_text(self.item == nil ? "" : self.item.description)
 end
end
Â
The stuff I need help with:
How to make the equipped Body Armor show and the other stuff that the party has within the item window
Items need to be in the righ section of each Window.
Example:
The Right Way=> Equipped Shield: Silver Shield Item Window: Round Shield : 1 Small Shield : 2
For Me=> Equipped Shield: Silver Shield Item Window: Steel Plate Armor : 2 Bronze Chestplate: 1
How to fix the Accessory Issue.
You may use my Window_EquipRight and Window_EquipItem and try to test it and fix it. I would appreciate it. :smile: