Help with adding new equipment slots/types!

I know this was covered already http://forums.rpgmakerweb.com/index.php?/topic/41579-equip-engine-problem/?hl=%2Bequip+%2Btype#entry412099

but it doesn't quite cover the problem I'm having.

Using Fomar0153's Additional Equipment script, I tried to add addition equipment slots *gasp* . I'd link to it, but I don't entirely remember where I got it from. So I pasted the entire thing [with my additions] to the bottom. I tried to add the types "Gloves", "Pants", and "Boots", but they all end up in the wrong equipment slots. (View pictures below). How do I fix this? I somehow managed to get this to work before, but for some reason can't do it again. I think it was just pure luck that I got it to work last time... I can get the slots to be named correctly, that's the easy part. I just can't get the armors to be assigned to the right slot.

Also, is there a way I can add more Equipment Types as well? I feel that would make this easier...

The script:

=begin
Custom Equipment Slots Script
by Fomar0153
Version 1.2
----------------------
Notes
----------------------
No requirements
Allows you to customise what equipment characters can equip
e.g. add new slots or increase the number of accessories.
----------------------
Instructions
----------------------
You will need to edit the script in two locations both are near
the top of the script look for:
Slots[7] = "Spell Tomes"
return [0,0,2,3,4,4,4,7] if dual_wield?
and follow the instructions where they are.
----------------------
Changle Log
----------------------
1.0 -> 1.1 : Fixed a bug that caused a crash when equipping a weapon.
1.1 -> 1.2 : Fixed a bug with optimisation and remove all
             Increased compatibility
----------------------
Known bugs
----------------------
None
=end
#--------------------------------------------------------------------------
# ? New Module Extra_Slots
#--------------------------------------------------------------------------
module Extra_Slots

  Slots = []
  # Edit here to add new slot types
  # Slots[armour_type_id] = "name"
  # I know it is named in the database but I don't believe you can access
  # that name through Vocab
  Slots[5] = "Gloves"
  Slots[6] = "Pants"
  Slots[7] = "Boots"

end

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ? Rewrites equip_slots
  #--------------------------------------------------------------------------
  # Edit here to change what slots are available to your characters
  # 0 - Weapon
  # 1 - Shield
  # 2 - Head
  # 3 - Body
  # 4 - Accessory
  # 5+ a custom slot
  def equip_slots
    return [0,0,2,3,5,6,7,4]
    end
end

class Window_EquipSlot < Window_Selectable
  #--------------------------------------------------------------------------
  # ? Rewrites slot_name
  #--------------------------------------------------------------------------
  def slot_name(index)
    if @actor.equip_slots[index] >= 5
      Extra_Slots::Slots[@actor.equip_slots[index]]
    else
      @actor ? Vocab::etype(@actor.equip_slots[index]) : "Test?"
    end
  end
end

class Scene_Equip < Scene_MenuBase
  #--------------------------------------------------------------------------
  # ? Aliases create_slot_window
  #--------------------------------------------------------------------------
  alias custom_slots_create_slot_window create_slot_window
  def create_slot_window
    custom_slots_create_slot_window
    @slot_window.create_contents
    @slot_window.refresh
  end
  #--------------------------------------------------------------------------
  # ? Aliases on_actor_change
  #--------------------------------------------------------------------------
  alias custom_slots_on_actor_change on_actor_change
  def on_actor_change
    custom_slots_on_actor_change
    @slot_window.create_contents
    @slot_window.refresh
  end
end

module RPG
  class Armor
  #--------------------------------------------------------------------------
  # ? I wish I'd done this originally.
  #--------------------------------------------------------------------------
    def etype_id
      if Extra_Slots::Slots[self.atype_id] == false
        return @etype_id
      else
        return self.atype_id
      end
    end
  end
end

the pictures:

http://i.imgur.com/Dx1RfNE.png

http://i.imgur.com/W27HGVf.png

http://i.imgur.com/r95QMBl.png

http://i.imgur.com/SeFxQlt.png

http://i.imgur.com/BNDsmGw.png

http://i.imgur.com/GEt09FS.png
If you need assistance with scripts in the future, I'd recommend posting in the Script Support Subforum. The subforum we're in right now is for topics regarding the RMVX Ace program specifically.

It looks like the slot ID in the script doesn't match the ID of your Armor Type. In the Project Menu, under the 'Terms' tab, there's a list of armor types. You'll have to match the ID number there to the Slot ID in the script. Then you'll have to set the correct armor type for the item in the 'Armors' tab.

For instance, you have 'Gloves' set to Slot [5] in the script. In order for your items to show up in the correct category, you'll need to create an Armor Type in the 'Terms' menu with a matching ID, let's say it's 05: Gloves. Then you set the individual items' Armor Type to '05: Gloves' and it should all appear correctly in the equip menu.
I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
It looks like the slot ID in the script doesn't match the ID of your Armor Type. In the Project Menu, under the 'Terms' tab, there's a list of armor types. You'll have to match the ID number there to the Slot ID in the script. Then you'll have to set the correct armor type for the item in the 'Armors' tab.

For instance, you have 'Gloves' set to Slot [5] in the script. In order for your items to show up in the correct category, you'll need to create an Armor Type in the 'Terms' menu with a matching ID, let's say it's 05: Gloves. Then you set the individual items' Armor Type to '05: Gloves' and it should all appear correctly in the equip menu.
I did this and, for some reason, the pants would not show up. At all. I think I gave the game too much to think about? idk. Anyway, I "merged" the Pants with Bodygear and it seems to work perfectly now. The Slot IDs confused me a bit, but I think I got it now. It's all about alinement, right?
you need to start a new game for such changes to show up correctly - if you used a savegame it would result in a mixture of old and new data when changing scripts and script-related data. That might be an explanation why the change didn't happen as you expected.
I'm Having a similar problem.  My new slots are 5-Boots, 6-Cloak, 7-Ring, 8-Amulet.  I have them all in the Armor Types list correctly according to Armor Type ID 

(correct numbered slots in the "Terms" tab of the database).  In the individual items' Armor Type field, for example, Padded boots is set to "Boots" in the field.  The characters' features are set so they can equip Armor type boots.  I Have both the custom equipment slots and the Additional Equipment slots scripts. Here is how they are set up:

CUSTOM EQUIPMENT SLOTS BY FOMAR0153

=beginCustom Equipment Slots Scriptby Fomar0153Version 1.2----------------------Notes----------------------No requirementsAllows you to customise what equipment characters can equipe.g. add new slots or increase the number of accessories.----------------------Instructions----------------------You will need to edit the script in two locations both are nearthe top of the script look for:Slots[7] = "Spell Tomes"return [0,0,2,3,4,4,4,7] if dual_wield?and follow the instructions where they are.----------------------Changle Log----------------------1.0 -> 1.1 : Fixed a bug that caused a crash when equipping a weapon.1.1 -> 1.2 : Fixed a bug with optimisation and remove all Increased compatibility----------------------Known bugs----------------------None=end#--------------------------------------------------------------------------# ● New Module Extra_Slots#--------------------------------------------------------------------------module Extra_Slots Slots = [] # Edit here to add new slot types # Slots[armour_type_id] = "name" # I know it is named in the database but I don't believe you can access # that name through Vocab Slots[5] = "Boots" Slots[6] = "Cloak" Slots[7] = "Ring" Slots[8] = "Amulet"endclass Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● Rewrites equip_slots #-------------------------------------------------------------------------- # Edit here to change what slots are available to your characters # 0 - Weapon # 1 - Shield # 2 - Head # 3 - Body # 4 - Accessory # 5+ a custom slot def equip_slots return [0,0,2,3,5,6,7,7,8] if dual_wield? return [0,0,2,3,5,6,7,7,8] endendclass Window_EquipSlot < Window_Selectable #-------------------------------------------------------------------------- # ● Rewrites slot_name #-------------------------------------------------------------------------- def slot_name(index) if @actor.equip_slots[index] >= 5 Extra_Slots::Slots[@actor.equip_slots[index]] else @actor ? Vocab::etype(@actor.equip_slots[index]) : "" end endendclass Scene_Equip < Scene_MenuBase #-------------------------------------------------------------------------- # ● Aliases create_slot_window #-------------------------------------------------------------------------- alias custom_slots_create_slot_window create_slot_window def create_slot_window custom_slots_create_slot_window @slot_window.create_contents @slot_window.refresh end #-------------------------------------------------------------------------- # ● Aliases on_actor_change #-------------------------------------------------------------------------- alias custom_slots_on_actor_change on_actor_change def on_actor_change custom_slots_on_actor_change @slot_window.create_contents @slot_window.refresh endendmodule RPG class Armor #-------------------------------------------------------------------------- # ● I wish I'd done this originally. #-------------------------------------------------------------------------- def etype_id if Extra_Slots::Slots[self.atype_id] == nil return @etype_id else return self.atype_id end end endend ADDITIONAL EQUIPMENT SLOTS BY FOMAR0153

=beginAdditional Equipment Slotsby Fomar0153Version 1.0----------------------Notes----------------------Requires my Custom Equipment Slots ScriptAllows you to add "slots" to equipment----------------------Instructions----------------------Set Extra_SlotType to the type of your slots.Then notetag your equipment like so:<slots x>where x is the number of slots----------------------Known bugs----------------------None=endmodule Extra_Slots # Set this type as the type for all additional slots Extra_SlotType = 5 Extra_SlotType = 6 Extra_SlotType = 7 Extra_SlotType = 8endmodule RPG class EquipItem #-------------------------------------------------------------------------- # ● Note tagging for the masses #-------------------------------------------------------------------------- def slots if self.note =~ /<slots (.*)>/i return $1.to_i else return 0 end end endendclass Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● Aliases equip_slots #-------------------------------------------------------------------------- alias extra_equip_slots equip_slots def equip_slots slots = extra_equip_slots for equip in @equips if (not equip.nil? and not equip.object.nil?) and (equip.is_weapon? or equip.is_armor?) if equip.object.slots > 0 for i in 1..equip.object.slots slots.push(Extra_Slots::Extra_SlotType) end end end end for i in 0..slots.size @equips = Game_BaseItem.new if @equips.nil? end return slots endendWhen I start a new game, I check my character's equipment and find that no boots are listed as equipped but they are initial equipment for that character.  What else should I try to get the boots (and I assume other equipment types) to show up?

Thanks for any help,

Tiamat5774
If you need assistance with scripts in the future, I'd recommend posting in the Script Support Subforum. The subforum we're in right now is for topics regarding the RMVX Ace program specifically.

It looks like the slot ID in the script doesn't match the ID of your Armor Type. In the Project Menu, under the 'Terms' tab, there's a list of armor types. You'll have to match the ID number there to the Slot ID in the script. Then you'll have to set the correct armor type for the item in the 'Armors' tab.

For instance, you have 'Gloves' set to Slot [5] in the script. In order for your items to show up in the correct category, you'll need to create an Armor Type in the 'Terms' menu with a matching ID, let's say it's 05: Gloves. Then you set the individual items' Armor Type to '05: Gloves' and it should all appear correctly in the equip menu.

I did this and, for some reason, the pants would not show up. At all. I think I gave the game too much to think about? idk. Anyway, I "merged" the Pants with Bodygear and it seems to work perfectly now. The Slot IDs confused me a bit, but I think I got it now. It's all about alinement, right?
I'll be honest, I thought this thread died once I got the answer. I marked this thread as solved so the fix would be posted above.

You have to make sure the IDs of the equipment match up (for example: Armor Slot 05 is Gloves, so make sure the "Gloves" are set to 5 armor slot). Slots 0, 1, 2, 3, and 4 are set at Weapon, Shield, Headgear, Armor, and Accessory respectively, and you can't switch them.

I've encountered many problems with this, even when I thought I solved it. Trial and error works sometimes, switch things around until something works. I'm terrible at explaining things, so look through this thread or other threads marked with "equip types" as their tag and see if that helps!
Tiamat5774, please do not hijack other people's topics, but make your own topic.


For searchability and because problems on different projects usually need different solutions, we prefer one topic = one problem.


Also, provide a link to the original site of a script - do not repost it here in your own topic.


Closing this

Original thread: https://forums.rpgmakerweb.com/threads/help-with-adding-new-equipment-slots-types.42217/