Equip Slots Core

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

(日本語の説明はこちらです)

By default, RPG Maker gives you 5 equip types to work with:

EquipSlotsCore2
You also have the ability to add and modify equip types directly in the database in the Terms tab.

EquipSlotsCore3

However, one problem you might notice is that every actor will have those equip slots, even if they can’t use any of the equips that you’ve designed for those slots.

EquipSlotsCore4

Another problem is you can’t add multiple copies of the same slot to an actor: they can only have one of each. Want to wear two accessories? Can’t be done.

This plugin solves that problem. It provides ways for you to customize your actors’ equip slots, allowing you to choose exactly which slots they will have in the game.

EquipSlotsCore5

Download

Plugin: download here (right-click and save as)

Patches

  • Patch for Yanfly’s Item Core

Tutorials

Installation

Download the plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_EquipSlotsCore plugin.

Once it is in your list of plugins, turn the plugin on.

Usage

(日本語の説明はこちらです)

Adding Equip Slots

First, if you are using this plugin, the default “Initial equipment” box will no longer be used. Instead, you will manage all actor equip slots using note-tags.

To add an equip slot, use the following note tag:

<equip slot: ETYPE>

The ETYPE, which is short for “equip type”, is one of the equip types that you have set up for your project. You can see this in the Types tab that I showed earlier

EquipSlotsCore3

You can either write the ID of the etype, or you can write the exact name of the etype. For example, Weapon is equip type 1, so you can write either

<equip slot: 1>
<equip slot: Weapon>

Depending on your preferences. I would recommend writing out the full name so that it is clearer, but if you ever change your equip types names you will need to remember to update these note-tags.

If you would like to add more equip slots, just add more note-tags. Want 3 weapons and 2 rings, assuming they are in the database?

<equip slot: Weapon>
<equip slot: Weapon>
<equip slot: Weapon>
<equip slot: Rings>
<equip slot: Rings>

And when you go into the game, you’ll see those slots set up for your actor!

EquipSlotsCore5

Specifying Initial Equip

Because the Initial Equipment box is no longer used, you will need to find another way to specify them.

The equip slot note-tag supports initial equip, using something called an “Item Code”, and is written like this:

<equip slot: ETYPE ITEMCODE>

An Item code is a quick way to reference a particular weapon, armor, or item. They look like this:

a1 - armor 1
w3 - weapon 3
i5 - item 5

So for example, if you want your actor to have a weapon slot with weapon 4 from the database as its initial equip, use the note-tag

<equip slot: Weapon w4>

Here is an example where I set starting weapons for three of my weapon slots:

EquipSlotsCore6

Adding and Removing Equip Slots Dynamically

You may want to add or remove equip slots during the game.
To add an equip slot, use the script call

ACTOR.addEquipSlot(ETYPE)

Where the ACTOR is a reference to a Game_Actor object, and the ETYPE is the name or ID of the equip slot you want to add.

For example, you can write

$gameActors.actor(2).addEquipSlot(4)
$gameActors.actor(2).addEquipSlot("Accessory")

To give actor 2 an extra equip slot of type 4 and “Accessory”

Removing slots is done using a similar script call

ACTOR.removeEquipSlot(ETYPE)

For example, if you want to remove the equip slot you added before, you can write

$gameActors.actor(2).removeEquipSlot(4)
$gameActors.actor(2).removeEquipSlot("Accessory")

A random equip slot of that type will be removed. If the equip slot contains an item, the item will be un-equipped and returned to the inventory.

If no such equip slot exists, nothing will happen.

Multiple Equip Types

By default, all equips have one equip type. You can assign additional equip types using note-tags.
With multiple equip types, you can put on the same equip in multiple slotsof your choice.

To assign additional equip types, note-tag armors or weapons with

<equip type: TYPE />

You can assign as many equip types as you want.

EquipSlotsCore8

Custom Scenes

This plugin provides bare-bones equip slot functionality. The purpose is to be able to use it with *any* equip scene, whether it is the default scene or a custom scene. You can try to see if my plugin will be able to work with other equip menus.

For example, if you would like to use Yanfly’s equip menu, but you would like to use my equip slot functionality, simply place my plugin under this.

EquipSlotsCore7

About Dual Wield

This plugin does not offer a way to handle “dual wield”, because you might not have a shield slot, and it doesn’t make sense to replace a different slot with a weapon slot. Please comment if you need dual wield and how your dual wield mechanics will work.

 

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

47 Responses

  1. AngryAragami says:

    Hey Hime, I have a question. I’m using a lot of yanfly plugins and I also want to use this script, enemy equips, and weapon damage. Where should I put these three scripts so that they play well with the yanfly scripts? Because I know the order of scripts is important.

  2. Ashikai says:

    Ahhh! This is exactly what I was looking for. Originally I was using Galv’s magic shards but that comes with it’s own set of issues (and is really better overall for something like a rune-based system), and then I was using a combination of Yanfly’s Equip Core and Equip Requirements (this plugin is not compatible with Equip Requirements, btw. Equip Core is fine though. This isn’t a request, I was just letting you know since Equip Requirements is an Equip Core extension). Hime, your plugin is exactly what I was looking for!

    I just need a little clarification on one point: You said in the comments that you could have an actor gain an equipment slot on level up, and then you cited your script call, $gameActors.actor(1).addEquipSlot(2). Are you suggesting that the level up event be done via a common event? Or is there another way to call this snippet on level up?

    Thanks very much! 😀

    • Hime says:

      It could be done in any way.

      The plugin just provides you with a script call to add or remove equip slots, and so it would be up to you to determine how you want the script call to be made.

  3. Trent says:

    Specifically, the first three actors in my game don’t start with any equips for some reason. Disabling the Yanfly Item Core seems to fix this problem for some reason. The patch provided doesn’t do anything to solve this problem. Copying and pasting notetags from the fourth actor into the notetags of problematic actors don’t do anything.

    • Trent says:

      I found this piece of coding in the Core Item Patch. I tried disabling it and it seems to have solved the problem:

      /* Just clear out the old equips */
      for (var i = 0; i < maxSlots; ++i) {
      this._equips[i].setObject(null);
      }

      To be honest, I barely have any knowledge of JavaScript, much less coding in general. Do you think removing this would have any destructive effects in the long run?

  4. Tevak says:

    Hi, trying to make dual wield work by having the weapon slot as a ‘main hand’ slot and a second ‘off hand’ slot that’s a new equipment type, along with a separate shield slot that seals the ‘off hand’ slot if filled through the item’s traits. The only trouble I’m having is getting it to recognize a weapon as an ‘off hand’ equip, even with an ” notetag it doesn’t take. Is there a way to do this?

    • Hime says:

      Are you using yanfly’s item core plugin? That plugin does not support note-tags for independent items.

      • Tevak says:

        I am but even with it off it doesn’t work, and there’s an option to keep notetags with midgame note parsing with it on. I think it might be that it’s a weapon and not an armor?

  5. Izeck says:

    I’m having some issues when I try to use this with Yanfly’s Item Core. When I start the test I get “Type Error. Unidentified is not an option”

    When I turn off either “YEP_ItemCore” or “HIME_EquipSlotCore” everything loads correctly. The problem is that I want to use both of these luggins for my game. Is there an alternative or a workaround?

  6. amonysoum says:

    i’m honestly somewhat surprised nobody has thought to make the a weapon that increases defense. i mean if you have a bashing board you should use it

  7. Izeck says:

    I managed to deal with dual wield in my own way. I made a “Dual-Wield” slot and gave it to my dual-wield characters. I also made all dual wield weapons a single weapon that does 2 attacks. It looks quite good too as you see 2 hits as opposed to just 1, like normal dual wield.

  8. Anonymous says:

    Ok, I might have an idea about Dual Wield, it can play the attack animation for each Weapon slot that actor has and the damage dealt would be damage / number of weapon slots.

  9. Anonymous says:

    Ok, I might have an idea about Dual Wield, it can play the attack animation for each Weapon slot that actor has and the damage dealt would be damage / number of weapon slots.

    • Hime says:

      Unfortunately, “atk” is based on the total atk of all weapons, so there would need to be a number of changes in order to separate equips during action execution.

  10. Sundricat says:

    Is there a way to make a default amount of equip types for all actors?

  11. PKM says:

    I don’t know if is me but the patch for the yanfly item core doesn’t seem to work. I had try running only those three script but it still give me TypeError Undefine is not a function. Also, I made sure the patch is on the bottom too.

  12. Victor says:

    Hiya! This plug-in does exactly what I need, but there is another feature I would like to be able to use. In my game each character can equip 1 weapon and additional accessories. Right now I can set it so some characters can only equip 1 accessory, others can equip 2, and so on. Is there a way to ADD these traits to a character, so that, say, after a certain point in the story they go from being able to equip 2 accessories to being able to equip 3, or even make it a level up trait so that when they hit level 20 they can now equip 3 instead of just two?

    Thanks again for the plug-in!

    • Hime says:

      I have updated the plugin so that you add and remove equip slots dynamically using script calls.
      The instructions have been updated to explain how this works.

      For example if actor 2 levels up to level 20, you can write
      ““
      $gameActors.actor(2).addEquipSlot(“Accessory”)

      ““

      Which would give actor 2 an extra accessory slot.

  13. Amir Clayton says:

    I need dual wield, and my dual wield will work so that you can use two weapons, but can also use a shield if not dual-wielding!

  14. DraynaRue says:

    OK so I have a major issue. Basically the plugin the only initially equipping the first actor with one thing, in this case its “Hull”.
    Notetags:

    <equip slot: Artillery w1>
    <equip slot: Secondary>
    <equip slot: Secondary>
    <equip slot: Wave-Armour>
    <equip slot: Superstructure a6>
    <equip slot: Hull a1>
    <equip slot: Deck a4>
    <equip slot: Propulsion a7>
    <equip slot: Chip>
    <equip slot: Chip>
    <equip slot: Chip>

    What’s more is that my second actor has nothing equipped, even though I gave her notes tags too:

    <equip slot: Artillery w2>
    <equip slot: Secondary>
    <equip slot: Secondary>
    <equip slot: Wave-Armour>
    <equip slot: Superstructure a6>
    <equip slot: Hull a2>
    <equip slot: Deck a5>
    <equip slot: Propulsion a7>
    <equip slot: Chip>
    <equip slot: Chip>
    <equip slot: Chip>

  15. Blaze says:

    Is there a way to apply these to classes that override the actor equipment, like a Fighter class that uses two weapon slots instead of one? I’m using the YEP_ClassChangeCore plugin.

    • Hime says:

      Hmm, I haven’t figured out a flexible way to implement class note-tags, since there are three cases

      1. Actor keeps all their equip slots
      2. Class overrides actor’s equip slots
      3. Actors and classes combine them together

      I’m not sure how to handle all three cases in a good way.

  16. Kloe says:

    I really wanna use this plugin, but it doesn’t like Yanfly Battle Core or Yanfly Job Points, it happens whenever you go into the game. Its not important for me, since I use neither of these two plugins but they are very popular so others may have the problem.
    Here is the error code if you want it,

    Blockquote

    TypeError: undefined is not a function
    at Game_Actor.equipSlots (/C:/Users/David/Documents/Games/Dragonspear/js/plugins/EquipSlotsCore.js:194)
    at Game_Actor.releaseUnequippableItems (rpg_objects.js:3661)
    at Game_Actor.refresh (rpg_objects.js:3741)
    at Game_Actor.refresh (/C:/Users/David/Documents/Games/Dragonspear/js/plugins/YEP_BattleEngineCore.js:3027)
    at Game_Actor.initEquips (/C:/Users/David/Documents/Games/Dragonspear/js/plugins/EquipSlotsCore.js:208)
    at Game_Actor.setup (rpg_objects.js:3429)
    at Game_Actor.setup (/C:/Users/David/Documents/Games/Dragonspear/js/plugins/YEP_JobPoints.js:360)
    at Game_Actor.initialize (rpg_objects.js:3394)
    at new Game_Actor (rpg_objects.js:3379)
    at Game_Actors.actor (rpg_objects.js:4556)rpg_managers.js:1618 SceneManager.catchException

  17. Pocky says:

    Hi!

    My plan is to have a character that can either:

    equip one 2-handed weapon
    equip two 1-handed weapons
    equip one 1-handed weapon and a shield

    Right now, I think the base system isn’t allowing me to do both dual wield and a shield. At least, when I flag the character as dual wield, it gives them two starter swords, and not the shield I have them set to start with. >.>;

    • Hime says:

      Dual wield shouldn’t do anything because the plugin changes the way slots are handled. I have not thought about how dual wield should work. Perhaps have users specify which slots will be replaced when dual wield is enabled.

      Do you have other equip related plugins installed?

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax