Custom Equip Types

customEquipTypes4

By default, RPG Maker comes with 5 equip types:

  • Weapon
  • Shield
  • Headgear
  • Bodygear
  • Accessory

You can rename them to suit your project needs, but if you wanted to have more than 5 types of equips and manage all of your weapons and armors using these additional equip types, you couldn’t.

This script allows you to create custom equip types with their own equip slot names. You can then assign custom equip types to different items, allowing you to create your own equip types. Combined with an equip slot script that allows you to add more slots to your actors, you can fully customize what your actors can wear and how they will be presented.

Download

Script: download here

You can assign these custom equip slots using Core – Equip Slots

If you would like to work with these custom equip types, the engine does not support them by default. You would need additional scripts:

Installation

Place this script below Materials and above Main

Usage

In the configuration section, set up the Equip_Types table with the custom equip types. Each equip type is given a unique number and a name.

customEquipTypes3

To assign a custom equip type to an item, note-tag it with

<equip type: x>

Where x is one of the equip type ID’s that you have set up in the table.

customEquipTypes2

FAQ

Q: My game crashes when I use more than 6 equip types
A: In Core – Equip Slots there is a configuration called “Sort Order”. You must specify all of the etype ID’s that will be used.

Q: I can’t equip the custom equips. I’ve note-tagged them correctly
A: Your actor needs to have the features that allows it to equip the weapon/armor type.

You may also like...

51 Responses

  1. James says:

    I am note tagging my item however it still deems it as . Any ideas or suggestions?

    • Anonymous says:

      Here’s my set up.

      Custom Types__________

      module TH
      module Custom_Equip_Types

      # Set up your equip types here.
      # Format: etypeID => name
      Equip_Types = {

      #-Default Equips Types----------------------------------------------------
      0 => "Weapon",
      1 => "Shield",
      2 => "Headgear",
      3 => "Bodygear",
      4 => "Accessory",
      #-Custom Equips Types-----------------------------------------------------
      5 => "Pet",
      6 => "Mount",
      7 => "Wing"
      }

      Core_______________

      module TH
      module Core_Equip_Slots

      # Order that the equip slots will be sorted. You must include all
      # etype ID's defined in your project
      Sort_Order = [0, 1, 2, 3, 4, 4, 4, 5, 6, 7]

      # Default slots to assign to actor if no slots are provided.
      Default_Slots = [0, 1, 2, 3, 4, 4, 4, 5, 6, 7]

      # Assigns an equip slot
      Regex = /<equip[-_ ]slot:\s*(\d+)\s*(?:(.*))\s*>/i

      Actor_Notes______________

      Armor_Notes_________________

      Armor is set up as Accessory. With note-tag it should act as “Pet” but in game it still shows as an Accessory and only allows it to be placed in the slot 4 sections. I want it to go into the pet slot

  2. Tyler Starr says:

    Hello, Hime. I know you can start out equipping your character with a certain armor/weapon in custom slots using in the actor page of the database for equipping the second armor in your first equip slot. But, I want to give the player a choice at the beginning of the game, and that choice determines their initial equipment. Can I somehow turn this into a command in a conditional branch? For example, if they chose option 1, they get , but if they chose option 2, they get ? I know there is an event command to equip an actor with an item, but it only works for the default equipment slots. Thank you for your time, and for making this great script

    • Tyler Starr says:

      For some reason, it doesn’t want to show what I put in less-than/greater-than brackets, I meant to say
      [equip slot: 1 a2]
      between “using – in the actor page” (with triangular brackets)
      and
      [equip slot: 1 a2]
      and
      [equip slot: 1 a4]
      after “they get”

      • Tyler Starr says:

        What I mean is, in Yanfly’s Ace Equip Engine, you can use the “Equip Actor with Armor X” command in the custom slots by assigning your armor to an default slot and it will automatically put for armor in your custom slot. For example, if you had a custom “Legs” slot, and an armor “Leather Leggings”, you could go to the armor page in the database, put the equip type as “Shield” (or any other default category), but put in the notes that “Leather Leggings” should actually be equipped in the “Legs” custom slot. Then, in an event, you can use the “Equip Actor with Armor X command”, and see the armor “Leather Leggings” listed under the “Shields” category. You can use this command to equip the Leather Leggings, and the script will override the “Shield” category and equip it to your custom slot “Legs”.

  3. Anonymous says:

    “Stack level too deep”
    No idea what this means.

  4. Amyrakunejo says:

    My issue is this: I’ve the note tags all set; even initializing equipment.

    What happens: all custom equip slots, upon starting, place the equipment back in the inventory.

    Here’s my character.

    Evelynn…stats not important…

    <equip slot: 0 w19>
    <equip slot: 1 a41>
    <equip slot: 2 a6>
    <equip slot: 3 a1>
    <equip slot: 4 a60>
    <equip slot: 5 a52>
    <equip slot: 6 a53>
    <equip slot: 7 a57>

    All the brackets are there, there’s no runtime error, just a52, a53, and a57 in my inventory, and cannot be re-equipped.

    a52 is note-tagged like this: <equip type: 4, 5,>
    a53 is note-tagged like this: <equip type: 4, 5, 6>
    a57 is note-tagged like this: <equip type: 4, 5,>

    I have the scripts needed setup as they are supposed to be, I wonder what the issue is?

    • Amyrakunejo says:

      Nevermind.

      Needed Multiple Equip Types; got it and this is now no longer an issue.

      • Hime says:

        Oh ya, I separated the scripts since there may have been compatibility issues with other scripts.
        Perhaps the instructions were not clear.

        • Amyrakunejo says:

          However, it must be like this:

          <equip type: #>
          <equip type: #>
          <equip type: #>

          This doesn’t work:

          <equip type: #, #, #>

          But with others, multiple tags per line do. I’m guessing that each script has to be programmed in this way. I’m such a novice.

          No, the instructions were not clear.

          • Hime says:

            Custom equip types do not support multiple equip types. If it did, the instructions would have mentioned it.
            If you meant the “multiple equip types” script had confusing instructions, I looked at the usage and it mentioned that each equip type tag must be created separately.

  5. plasmatorture says:

    I’m having issues using script calls to change equipment in that it doesn’t seem to work for anything except the basic equipment types in their standard order. If the equipment is listed in a different order or is not one of the basic types then it destroys the item instead.

    Specifically I’m trying to get Falcao’s Tool selector working with either your system or Yanfly’s similar script and I can’t. But the fact that even change_equip script calls don’t work suggests that there’s something fundamentally broken with change_equip commands when using extra equip types. Is there something special that needs to happen in a script call to change equipment? If so I’m pretty sure I could make Falcao’s script work myself, but I’m totally lost on how to approach the problem.

    • Hime says:

      Does this issue occur when you remove falcao’s tool selector?

      • plasmatorture says:

        Yes, that’s trying both $game_actors[id].change_equip_by_id(slot, equip) if $game_actors[id] and $game_actors[1].change_equip(n,$data_weapons[1]) syntaxes for changing equipment.

        • Hime says:

          If the issue does not occur when Falcao’s tool selector has been removed, then you will need to try some more things

          1. Test whether Custom Equip Types works in a new project with no other scripts
          2. Test whether Custom Equip Types work in that new project with Falcao’s tool script

          If #1 fails, then the script has bugs, but I have not had any issue with it on its own or with my other equip scripts.
          If #2 fails, then the issue is another script in your project.

          • plasmatorture says:

            I should’ve spoken more clearly. The issue occurs even in a fresh project where only your two scripts exist.

            $game_actors[id].change_equip_by_id(slot, equip) if $game_actors[id] works perfectly fine for Weapon and Bodygear when those slots are in those default positions, but nowhere else. For custom equip types it doesn’t work at all (and eats the item into the void for some reason).

            I tried again with $game_actors[1].change_equip(n,$data_weapons[1])/$game_actors[1].change_equip(n,$data_armors[1])

            and had the exact same results (I don’t think those two things are functionally different anyway?).

            Then I tried with simple Change Equipment calls and still the same problems .

            The script works perfectly fine for just manually equipping stuff through the menu screen, but I can’t get outside equipment requests to work. Should I send you my otherwise blank testing project where it’s not working properly?

          • Hime says:

            That would be helpful.

          • plasmatorture says:

            Nevermind, I solved it. I thought I had tried this early on to no success but I guess I hadn’t. You have to specify the slot number based on where it is in the list, not what type it is. So if the custom item type “Tool” is slot type #6 but is #8 in your list, all script calls need to reference slot 8, not slot 6 (and of course subtract 1 from that cause the first slot is 0).
            If that’s obviously stated somewhere I must be missing it cause I couldn’t find it said directly. I think it might be nice to add a line to the instructions for the script on on your site for the dense people like me who are still learning how RGSS3 actually works.

            Anyway, thanks for your time and sorry for the alarm. Glad I got it worked out at least.

          • Hime says:

            There may be a bug somewhere in my code.

            In the custom equip type table, you have "Tool" set up as 8. This means that the equip type for tools is 8, and your tools would be note-tagged as follows in order to actually equip them:

            <equip type: 8>

            Assuming you have set up your actor with 6 equip slots, in the equip scene, the "Tool" equip slot will appear as the 6th slot on the list.

            When you use change_equip_by_id, you specify the slot ID, which is the order that it appears in your equip list (minus 1, because Ruby). When you change equips, you should be changing equips by slot ID, not by equip type ID.

            If the tool slot is the 6th slot on your actor, I would expect
            change_equip_by_id(5, ... )
            To be the correct script call. If this is not the case send me the project and I will look at what's going on.

          • plasmatorture says:

            No I think it’s working fine.

            The mistake is with this: “When you change equips, you should be changing equips by slot ID, not by equip type ID.” I never saw that spelled out anywhere, and thought it was the opposite. For some reason I thought I had tried doing it by slot ID, but apparently never tried it (otherwise would have solved the problem earlier). All the documentaiton for equip change I’ve seen anywhere says 0 for wepaon, 1 for shield, etc. – because those are the default slot IDs, but they also happen to be the dfault equip type IDs. Hence the confusion. As I said, unless I’m missing it somewhere, it might be nice to make that explicitly clear in your documentation of the script. Or maybe I’m the only one who’s made this mistake before?

            Anyway, the issue is totally solved and I don’t think there’s an error with your code (at least when it comes to this).

          • Hime says:

            I will add a note in the script.

  6. JlucasT says:

    Its possible to assign multiple types to one equip? something like: a dagger can be equipped at “hands” and at “accessory”, but not only at “hands”? (not at the same time) if not, you can make a update that can do it, like (Hands id) and (accessory id)??? thanks c:

  7. shadowblack says:

    Another question:
    Let’s say that I have a custom equip type called “Boots” and its etype ID is 6. Is there any way to check if a particular character has Boots equipped? ANY boots, no matter which ones. I know I can check for each individual item, but if I have – for example – 33 items that are Boots I would need 33 conditional branches per character. Is there any way I can do it with a single conditional branch that checks the etype ID instead?

  8. shadowblack says:

    Question: How do I “fix” a custom equip type? For example, let’s say equip type 6 is “Boots” and a character starts the game with a pair of cursed boots that he cannot remove until a quest is completed. How do I do that? The “Fix Equip” feature works for the default equip types, but what about the custom ones?

  9. Flimbo says:

    Hello,

    I´m having a bit of an issue when using this script and Core – Equip Slots, not sure if it's a configuration mistake. I defined 4 new slots on Custom equip types, numbers 5 to 8. If I add this to the actor…

    <equip slot: 6 a63>
    <equip slot: 7 a1>
    <equip slot: 8 a62>

    …it works fine, the initial equips are equipped, and slot 5 is (correctly) missing from that actor. But if I add this:

    <equip slot: 5>
    <equip slot: 6 a63>
    <equip slot: 7 a1>
    <equip slot: 8 a62>

    Then slot 5 is there, correctly without initial equip, but the initial equips on all other slots are in the inventory, but not equipped.

    Thanks!

    • Hime says:

      You're right, I actually did notice that behavior before…but never really thought that it was a bug.

      And when I looked into it, turns out I wasn't even considering the possibility that there could be slots that were initially empty.

      I've updated the script to address the bug.

  10. Yin says:

    Is there a way to assign multiple slot types to one item?

    for example: (equip type: 1,2,3)

    I tried it, but it only takes the first number.
    If there is no built in way, is that something easy to add?

  11. Toast says:

    I'm having the same issues as Zavern. I've got both this and Core – Equip Slots in the script section, with custom equip types

    5 = > "Gloves"
    6 = > "Boots"

    and Default_Slots = [0, 1, 2, 3, 4, 4, 5, 6],

    with my gloves tagged with equip type: 5 (with the brackets which I can't type in here) but no gloves/boots appear in the equip section.

  12. Helen Damnation says:

    coughs Um. Hime? You're wearing casual clothes on your head.

    • Hime says:

      Yes. It looks like it demonstrates that you can make it so that you can wear anything anywhere.
      I can’t justify what happened there.

  13. Zavern says:

    Can you help me out? I add <equip type: 6> to a pair of "Boots", but the boots won't appear in the equip selection.

  1. August 17, 2014

    […] Script: download here Required: Core Equip Slots, Custom Equip Types […]

  2. September 29, 2015

    […] 1: To start off, get the script from here, open the script editor (F11) and insert it under the “▼ Materials section” and above the […]

Leave a Reply

Your email address will not be published. Required fields are marked *