Core – Equip Slots

equipSlotsCore3

(UI not included)

This script allows you to customize your actor’s equip slots. You can choose exactly which slots you want to have. Don’t need a hat? Need two accessories for a necklace and a ring? Customize your 5 slots the way you want them to be shown.

In RPG Maker, each actor is given 5 equip slots:

  • Weapon
  • Shield
  • Headgear
  • Bodygear
  • Accessory

Additionally, you have the option to turn your Shield slot into an extra Weapon slot using “dual wield” features that can be applied to your actor. However, your actors can only have 5 slots. Perhaps your actor can wear 3 accessories? Unfortunately, the default engine doesn’t support that, but that’s where this script comes in.

In addition to choosing which slots you have, you can add or remove slots. Maybe 5 slots is too much, or too little. You can additional slots as you need them.

You can choose what type of equips a particular slot will take. Each equip slot comes with an equip type. Combined with scripts that allow you to create your own equip types, you can then add any number of custom slots to your actors such as gloves or boots in addition to the default equip types.

The order that the slots appear can be configured so that they automatically sort themselves in the window.

For scripters, this script refines the way equip slots are managed, allowing you to easily add new functionality to them such as adding or removing equip slots dynamically without having to worry about the drawbacks that the default implementation holds.

Download

Script: download here

Add-ons

Further equip slot functionality can be added using the following scripts. These scripts must be placed under the core equip slots script.

Installation

Place this script below Materials and above Main

Tutorials

Usage

Assign initial equip slots

Note-tag actors or classes with

<equip slot: x>

Where x is the equip type ID (etype ID). By default, they are as follows:

0 - weapon
1 - shield
2 - headgear
3 - bodygear
4 - accessory

Actor equip slots take precedence over class equip slots if both have been
assigned. If no equip slots are assigned, then the class receives default
equip slots defined in the configuration.

Assigning initial equips

Because your actors may not have the default equip slots, the database editor may not be suitable. To set an initial equip for the slots, you can set them when you are defining your equip slots:

<equip slot: 0 w4>
<equip slot: 1 a2>

This equips the first slot with weapon 4, and the second slot with armor 2.
Note that the script currently only allows one type of equip in a slot, so
you can’t equip both weapons OR armors in the same slot.

Custom Equip Types

If you are using a custom equip script that allows you to define your own
equip types, you can use those etype ID’s as well.

equipSlotsCore1

Sorting equip slots

In the configuration, there is a Sort_Order that determines how your equip
slots will be sorted based on etype ID. You must provide a value for every
etype ID in your project.

equipSlotsCore2

You may also like...

112 Responses

  1. Zina says:

    Hey so my name is Zina – Starfyre222 on Steam – and I’ve been working on a game. I found your script and I’m curious about using it and it says to contact you about commercial use. I’m not sure if I’m keeping with your script or not nor am I sure about which direction I’ll take things regarding production but I figured I’d try contacting you through the comments.

  2. Card says:

    I’m very late to this, but did you ever consider implementing enemy equipment to this version of rpg maker as well?

  3. robot says:

    I’ve been exploring for a bit for any high quality
    articles or blog posts on this sort of area . Exploring in Yahoo I finally stumbled
    upon this site. Studying this info So i am satisfied to express that I’ve an incredibly just
    right uncanny feeling I discovered just what I
    needed. I so much certainly will make sure to don?t disregard this website and
    give it a look regularly.

  4. fishing says:

    Why people still make use of to read news papers when in this technological world all is existing on web?

  5. Matheus_B says:

    Very good
    I’m using all add-ons.
    I would like to know if you can create a condition to check a weapon [0] in the shield slot [1]??

  6. tablet says:

    If some one needs expert view concerning blogging and site-building then i advise him/her to visit this website, Keep up the nice work.

  7. Amyrakunejo says:

    I’ve come back to this, and I still have the same issue, even after trying it on a new project.

    I’ve even tried note tagging the weapon itself; does no good.

    • Amyrakunejo says:

      Actually, yes! I have to note-tag everything, and even then, have to re-start test play (previous save-files don’t work). Odd, but to finally have two accessory slots, sugar sweet.

      Oh, now I have to listen to Def Leppard. Excuse me…

  8. Arsist says:

    Just to mention: If you are using Selchar’s Weapon Durability, you will need to put this script above Instance Item’s and Weapon Durability, or else upon attacking, the durability reduction process will return an error.

  9. Amyrakunejo says:

    I got this error when I was play testing. I went into menu mode, chose ‘Armaments’ for which is what I renamed Equipment, and this message came up:

    “Script: line 280: NoMethod Error occurred. undefined method ‘etype id’ for #<Game_BaseItem:0x7eef9b7c@class=RPG::Weapon, @item_id=1>

    What happened? Do I have to note tag every weapon and armor?

    • Hime says:

      It sounds like a compatibility issue between two or more scripts with my equip slots script. Determine if there is another script that is causing the problem by disabling each script one by one until the problem disappears.

      • Skye says:

        I get exactly the same error and the only custom scripts I’m using are this one and the Custom Equip Types from here.
        http://himeworks.com/2013/07/custom-equip-types/

        It comes up that theres an error in line 280 of the core equip slots script.

        • Hime says:

          How are your equip types and slots set up? Maybe you can send a project to me so I can look at the issue.

        • KHRS says:

          Was having this problem myself. I’m guessing you guys had a saved game in your demo, added the script after your save file was made, then tried testing out the demo using the same save file. Try testing out the script on a new game, worked fine for me.

          Also, for whatever reason, the script’s note tag syntax is wrong. The author says to add to enable weapons then to initialize the first weapon in your list, but what this does (for me anyways) is create 2 weapon slots, an empty slot and a 2nd slot with the initialized weapon (without using any other script that modifies equips). Just using worked perfectly.

          • KHRS says:

            Uh my syntax lines didn’t post. anyways,
            “The author says to add (equip slot: 0) to enable weapons then (equip slot: 0 w1) to initialize the first weapon in your list”

            “Just using (equip slot: 0 w1) worked perfectly.”

          • Hime says:

            I’m sorry if there was confusion. I read over the instructions and my understanding is that using

            
            

            alone will add a slot with equip type 0. Using

            
            

            would add a slot for equip type 0, initialized with weapon 1.

  10. Rpgmaker says:

    Help I keep getting “no method occurred.Undefined method etype id for game_baseitem:0 x 8421 @class RPG::Weapon,item id =2>” what do i do?

  11. Arkaik says:

    Hi Tsukihime!
    I’m a Brazilian maker, i’m a little bit new with Rpg Maker, but i’ve been thinking about a script and i wonder if you could help me (even because i’ll use some of your scripts in my project and i worry about someone do it and end up incompatible).

    Well, the script idea i had was about equip itens (key itens, potions, etc.) to use in battle through a specific command, and i know that a script like this already exists, but the difference is that the equipped itens will appear randomly in a preset number (like 5, for example) and you could “draw” other equipments, just like a card game.

    In fact, that’s my idea, a card system.
    I’ll set a large number of equipment slots (like 40 slots), to equip cards (build your deck), and then use it in battle. But i need that this usage costs TP and a way that once used, an item couldn’t be used after this until the battle ends. I know it’s a little bit huge to ask, but i need to try.
    Hope you can help. Thanks a lot and sorry for some kind of language error and for being so annoying asking this.

    • Hime says:

      This sounds like a system that would be built on top of the equip slots. If you need help writing the system you can put in a request at one of the rpgmaker forums.

  12. Lynn says:

    This might be an extremely silly question but how exactly do you map the weapon and armor types for each equip slot? The script says “You can choose what type of equips a particular slot will take.” but I don’t understand how to do this.

    The script changes the equip slots but fails to find any weapons or armor in the database to to put into the slot.

    • Hime says:

      By default there are five equip types: weapons, shields, headgear, bodygear, and accessory. All weapons go in the weapon slot. You can choose which type of equip an armor is in the database.

      An equip slot by default can only take the equip type that is assigned to it. When you specify your equip slot for your actors, you specify the equip type.

      Using the custom equip type script, you can define additional equip types. For example, if “Weapon” is too generic you might go and create more specific equip types. That script then allows you to tag equips with a custom equip type, allowing you to use the new equip types you’ve defined.

      • Lynn says:

        And now I feel extremely silly as it was a mistake in database input and an event actually adding the items for the player… Script works perfect. User error. ^^;

        Thank you for your answer!

  13. Mattchaby says:

    Hello,

    I have an issue: the available slots are not changing when my actors are changing class. They keep the first slots settings they have (even when the slots are only configured into classes notetags to avoid overwritting from the actors' notetags).
    I am using both the Equip Slots Core and Custom.
    I have tried making them start with an empty class then changing but it remains the same.
    For compatibility, I am using loads of scripts but the only ones which would interfer are:
    * Yanfly Classes Manager
    * Yanfly Classes level requirement
    * GTBS (long list of scripts)

    Thank you in advance for your help, I love your work.

  14. TiagoMS says:

    How do I put two-handed weapon?
    I'm serious difficulties …

    If I put 2x hands weapons, 1, 1, 2, 3, 4 By placing a shield that "locks" the slot "weapon", a bug occurs. The shield is Fixed.

    I'm trying to develop (with the help of your script) conditions which are certain heroes using certain types of weapons in different slots.

    Example: Actor 0 can use: "Dagger".
    Actor 1 can use: "Little Shield, Dagger."
    Actor 2 can use: "Little Shield, Dagger"
    Actor 3 can use: "Little Shield, Great Shield (2H), Dagger"
    4 actor can use: "Shell small, Small Sword, Great Sword (2h)".
    Actor 5 can use: "Shell small, Small Sword, Great Sword (2h)".
    Actor 6 can use: "Dagger, short sword, Greatsword (2H)".

    You can use Actor 0: only 1 dagger.
    Actor 1 can use: 2x Dagger or 1 dagger + shield 1
    Actor 2 can use: 2x Shield and Dagger 1 + 1 shield
    Actor 3 can use: (1 dagger + shield 1) or (2 shields) or (1 Shield of two hands.)
    Actor 4 can use: Small Sword + Shield Small or 1 big two-handed sword.
    Actor 5 can use: (Sword + Shield Small small) or (1 large two-handed sword with small shield) or (two large two-handed swords)
    Actor 6 can use: (2 daggers), or (2 small swords) or (1 large two-handed sword)

    is possible to do this?

  15. Wavelength says:

    Just wanted to say this is probably the single coolest script I have ever tried from any scripter. I especially like that it lets you not only expand the total number of equippable slots for each actor, but also lets you "mix and match" equipment between slots if you classify them as the same type.

    Beautiful work, Hime.

  16. buckles says:

    Hello,

    I have been combing the web for the proper notetag to use in a script call event where I want to add a weapon type to the character's equipment options. I was curious if you could provide some guidance?

    currently, I think I need to use something similar to:
    $game_actors[1].add_equiptype(1)
    or
    $game_actors[1].unlock_wtype(1)

    You seem to respond more often than some of the other code sites I frequent, so I figured it was worth a shot. Any help you could provide would be most appreciated!

  17. Alana says:

    I've been looking for a script that allows me to make different item types for each slot (so cloth shoes, fur shoes, leather shoes, etc.) and equip different ones for each class (so magic users can only use cloth, fighters can use plate/chain, etc.). Is it possible to do that with this script?

  18. akatony1992 says:

    im having some trouble using this script. it says line 275 has a NoMethodError. How do I fix it?

  19. Nate Bodine says:

    Nice! So I'd be able to use this to create a 4-armed character who can equip 2 weapons and two shields, or dual-wield 2H weapons?

  20. Alex Magnie says:

    I get this Script Error.
    Script ‘Core – Equip Slots’ line 243: NoMethodError occured.
    undefined method ‘etype_id’ for nil:NilClass
    Can you help me?
    Sincerely, Alex Magnie

    • Hime says:

      This is likely a script compatibility issue. You will need to figure out which script is causing the problem. Also, DO NOT use the equip manager with this script.

  21. Alex Magnie says:

    Where do I put Core Equip Slots?
    I put scripts in order of the Tsukihime Script list on your wordpress.

  22. Alex Magnie says:

    In what order do I put your scripts?
    Sincerely, Alex Magnie

    • Hime says:

      Which ones? Each script includes the installation instructions so if they say to put it under specific script then that is the order they should be placed.

  23. Hime says:

    “Dual Wield” feature now correctly updates the equip slots.

  24. naridar says:

    Is this compatible with Yanfly’s Ace equip engine?

  25. digger says:

    For this is there a way to name the equip slots?
    I mean for armor types some might have unique names for their types.
    IE: Light Armor could be seperated into Hats, Jacket, Clothes, Etc…

  1. September 29, 2015

    […] the script from Hime’s website, 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 *