MZ Assign multiple types to equipment

To be clear, I'm not talking about equipment slots. I'm talking about weapon and armor types, like here:

types.png


I would like to be able to assign more than one type for weapons and armors, ideally just with notetags in the notebox. Something like

<Weapon Type: x, x, x]
<Armor Type: x, x, x]

where "x" is the ID of the type to assign.

I think there are a lot of broader applications for this than just how I intend to use it, but if it helps to know: I'm unhappy with RPG Maker's "all or nothing" approach to assigning weapon/armor types to actors/classes. Some characters or classes should have overlapping types, but not necessarily be able to use every piece of equipment from that type. For example, in Final Fantasy 4, Cecil, the Paladin, can use swords as his primary type of weapon, but not dark-elemental swords. He can use spears, but not all spears, bows, but not all bows, staves, but not all staves, etc. I like this method of equipment assignment because it gives more flavor to classes and character personality than just "assign Swords and they use all Swords". This way, a sword can be assigned the Sword type in the Weapon Type dropbox, which is what the game would refer to for SV Attack Motions, but also have other types not referenced anywhere in the actual game, like "Reid", "Priscilla", etc. which will make the list of possible equips in the Equip menu display properly and not be bloated with unusable, grayed out options.

Using "dummy" types to assign weapons/armor of the same type to specific groups could work, except in my case I think that might exceed the 99 limit and if nothing else, is a massive headache administratively when a change is made somewhere in the database and then dozens of things have to be checked/edited when a simple plugin could just do the trick.

Hope this all makes sense. I can explain in more detail/post images if need be. I'm open to other options/suggestions if someone has one, as well. Thanks for reading!
I use this for MV, not sure if compatible with MZ, but it is a simple plugin so might be worth giving it a try/running it through fossil: https://forums.rpgmakerweb.com/inde...eapon-types-multiple-types-on-a-weapon.56027/
This can already be done by (at least) VisuStella Items and Equips Core - there may be others, I'm not the most versed in MZ plugins. You could check AquaEcho's thread of VS alternatives to see if there's anything listed for that.

But using that plugin, you can give your dark sword the notetag <Equip for Class Only: Dark Knight> and then Cecil the Paladin couldn't equip it.

I'm actually very surprised that they don't have a JavaScript Equip Requirements notetag, but it sounds like the provided ones would do what you want.

I use this for MV
I'm not sure that's what the OP is asking for. Even if it's compatible, the author says in the description:

1709946137044.png


And the OP is specifically asking about equipping.
Hmm, works exactly as OP requested for my project, but yes I am unsure if this works for MZ. I think you misunderstand what the author meant anyways. The default wType stays the same but you can add additional wTypes that can be used by any actor that is set to be able to use these additional wTypes.

For example I have a 2h Flail that can also be equipped by those who can wield Sickles and 1h Flails. The Kusarigama is a neat weapon 😛

1709946315696.png


Something else BR555, you should be able to increase the max limits your database gives you, at least you can with MV.

The default wType stays the same but you can add additional wTypes that can be used by any actor that is set to be able to use these additional wTypes.
Ah, I gotcha.
Now if he is trying to restrict being able to equip a wType, that I don't think the plugin does. But one could just make two different wTypes of the sword weapon, one dark, the other standard. And set the Paladin in this case to only equip the normal swords, while all characters who can use both types would have that set under their Class or Actor type. Dark swords would only be given the dark sword wType while standard swords would be set for both. So it should work however desired in this situation with a bit of logic.
This can already be done by (at least) VisuStella Items and Equips Core - there may be others, I'm not the most versed in MZ plugins. You could check AquaEcho's thread of VS alternatives to see if there's anything listed for that.

But using that plugin, you can give your dark sword the notetag <Equip for Class Only: Dark Knight> and then Cecil the Paladin couldn't equip it.

I'm actually already using that same exact tag, so technically I'm able to achieve kind of what I want. The problem with that method is this:

Spoiler
equips.png

You end up with all these grayed out equips that can't be used by that actor. I don't want those to appear. If I were able to assign multiple types to equipment, then the unnecessary stuff wouldn't appear. I can make a Short Sword a Sword type in the database, and then give traits to the classes, "Reid", "Priscilla", etc. and never actually assign anyone Sword. Not sure if I'm making sense lol.

Hmm, works exactly as OP requested for my project, but yes I am unsure if this works for MZ. I think you misunderstand what the author meant anyways. The default wType stays the same but you can add additional wTypes that can be used by any actor that is set to be able to use these additional wTypes.

For example I have a 2h Flail that can also be equipped by those who can wield Sickles and 1h Flails. The Kusarigama is a neat weapon 😛

View attachment 297700

Something else BR555, you should be able to increase the max limits your database gives you, at least you can with MV.



That plugin unfortunately doesn't work (even with FOSSIL). It seems like it is exactly what I'm asking for. I was however, able to increase types beyond 99 with the method you linked in the video. I'd still rather have a plugin just so I can manage all of this with notetags rather than dealing with potentially an absolutely absurd amount of types, if anyone wants to take up the task...

But hey, if I have to I'll just deal with it. Thanks!
I'm actually already using that same exact tag, so technically I'm able to achieve kind of what I want. The problem with that method is this:


You end up with all these grayed out equips that can't be used by that actor. I don't want those to appear. If I were able to assign multiple types to equipment, then the unnecessary stuff wouldn't appear. I can make a Short Sword a Sword type in the database, and then give traits to the classes, "Reid", "Priscilla", etc. and never actually assign anyone Sword. Not sure if I'm making sense lol.



That plugin unfortunately doesn't work (even with FOSSIL). It seems like it is exactly what I'm asking for. I was however, able to increase types beyond 99 with the method you linked in the video. I'd still rather have a plugin just so I can manage all of this with notetags rather than dealing with potentially an absolutely absurd amount of types, if anyone wants to take up the task...

But hey, if I have to I'll just deal with it. Thanks!
Post in the thread and see if the author is still around. Even if he isn't, it shouldn't be impossible for someone to update the plugin to MZ. A bit outside my scope unfortunately, but if I had to take a guess, it only needs the proper tags updated and perhaps a line or two commented out.

But this is the very reason I decided to stick with MV myself. MZ seems like it has more functionality out of the box, but I am pretty sure most everything MZ can do can also be done with MV thanks to the large selection of plugins out there. Good luck!
You can try this. Because VisuStella's plugins are obfuscated, I obviously can't guarantee it'll be compatible with them - but if you put this beneath them in your plugin manager, it may work.

Paste into a text editor, save as a *.js file, load as a plugin.
Code:
var TUR_canEquipWeapon = Game_BattlerBase.prototype.canEquipWeapon;
Game_BattlerBase.prototype.canEquipWeapon = function(item) 
{
    if (TUR_canEquipWeapon.call(this, item))
        return !(item.meta.blockedclass && item.meta.blockedclass.includes(this.currentClass().id));
   else
        return false;
};

var TUR_canEquipArmor = Game_BattlerBase.prototype.canEquipArmor;
Game_BattlerBase.prototype.canEquipArmor = function(item) 
{
    if (TUR_canEquipArmor.call(this, item))
        return !(item.meta.blockedclass && item.meta.blockedclass.includes(this.currentClass().id));
   else
        return false;
};

You'd add the notetag to weapons or armors of <blockedclass: x> where x is an ID (or space-separated list of IDs) of classes that can't equip the item.

e.g. <blockedclass: 6 9 14>

If it works, it'll stop the items from showing up in all appropriate screens.
You can try this. Because VisuStella's plugins are obfuscated, I obviously can't guarantee it'll be compatible with them - but if you put this beneath them in your plugin manager, it may work.

If it works, it'll stop the items from showing up in all appropriate screens.

It works! At least from what limited testing I've done with it. Thanks so much! Now I can just assign general types and block equipment on an individual basis. This will save me a lot of time.

Original thread: https://forums.rpgmakerweb.com/threads/assign-multiple-types-to-equipment.166606/