MZ Question about creating dual wield weapons

I want to create a different equipment system than the default RPGMaker MZ(Default sword and shield mode), the actor has a main hand and a off hand, and the two hands have three equipment states, as follows:
1. equip a two-handed weapon in the main hand, at the same time the off-hand was sealed;
2. equip a one-handed weapon in the main hand and a one-handed weapon in the off-hand ;
3. equip a one-handed weapon in the main hand and a shield in the off-hand.

At first, I tried the dual wielding that comes with the RMMZ system, it causes dual wielding actors to not be able to equip shields, so I drop this method.

Then I found "Maliki's Dual Wield" in the forum, I tried it, it can achieve my requirements well, but it conflicts with two other plugins I use in the game, and because of the code is encrypted(I know some people on the forum don't like visustella, but please don't attack me, I'm sorry if it made you uncomfortable), so it is difficult to deal with conflicts, so I have to abandon it, the specific situation is in another thread, in which I made it clear what conflicts: https://forums.rpgmakerweb.com/index.php?threads/malikis-dual-wield-mvmz-ver-1-2.126317/post-1367800

Finally, I found "NIJI Equip Slot Core", which does not implement two-handed weapons by itself, but can achieve two-handed weapons through some settings, and because it allows equipment to have multiple equipment types, it can be easily implemented to equip one-handed swords To the off-hand, the way to implement two-handed weapons: In the weapon list of the database, set the characteristics of the two-handed weapon to seal the off-hand when equipped, and then execute the code to clear the off-hand when equipped. One-handed weapon implementation: In the weapon list of the database, add "<equip-type 2 />" to the note of the one-handed weapon, 2 refers to the equipment type id of the off-hand, so that the one-handed weapon can be equipped on the main hand, can also be equipped in the off-hand, as for the shield, use the database default settings. One problem with this solution is that the equipment restrictions on actors or occupations in the database are invalid, and now all actors can equip any equipment, although the plugin gives tags to limit which actors and occupations can be equipped, but this is for equipment, the tags can limit the equipment to only one class, but it cannot allow two classes to support this type of equipment at the same time.

I tried to contact nijiko twice, but failed, he seems to have not been in the forum for a long time. In fact, what I most want to achieve is how to add more than one type of equipment to the equipment, such as a one-handed sword with two types of equipment in the main hand and the off-hand at the same time.

If possible, I would like to implement the plugin by myself instead of using someone else's plugin, because I only need a little bit of functionality, and I need someone to guide me on which part of the code should be modified to achieve multiple equipment types for equipment(System APIs of RMMZ), many thanks.

This is my first time posting in the forum, my english is not very good, hope i explained clearly. If there is any violation, please let me know, thank you.
my english is not very good, hope i explained clearly.
then you should not set your first language to english in your account, because that is what it is used for: if we see that someone does not have english as first language, we know to ask clarifications due to language barriers.

second, what you describe as the NIJI method is basically the default method used by the maker - sealing the shield slot to simulate a two-handed weapon.
But nothing in your text implies that you tried to use that without any plugin - can you try that and tell us what part doesn't work the way you want?

third - there is another option that has its limitations but might be better for you: you can give the dual wield trait to a weapon. Then as soon as that weapon is equipped, the shield slot turns into a second wepon slot.
The limitation ot this is that those specific weapons will never be combined with a shield, you would have to have diferent swords for sword shield and dual sword combos.

It would also help if you posted a screenshot of your plugin manager so we can see what other plugins you have to check for compatibility problems.
then you should not set your first language to english in your account, because that is what it is used for: if we see that someone does not have english as first language, we know to ask clarifications due to language barriers.

second, what you describe as the NIJI method is basically the default method used by the maker - sealing the shield slot to simulate a two-handed weapon.
But nothing in your text implies that you tried to use that without any plugin - can you try that and tell us what part doesn't work the way you want?

third - there is another option that has its limitations but might be better for you: you can give the dual wield trait to a weapon. Then as soon as that weapon is equipped, the shield slot turns into a second wepon slot.
The limitation ot this is that those specific weapons will never be combined with a shield, you would have to have diferent swords for sword shield and dual sword combos.

It would also help if you posted a screenshot of your plugin manager so we can see what other plugins you have to check for compatibility problems.
Hi, I set English as my first language in the settings because that's the only language I can communicate with people on the forum, or should I remove the first language?(I can't remove English because the forum requires me to choose a language, but I don't want to expose my country, so I won't use my own language)

First, the first method I tried was the third method you said;

Then, when I use the "Maliki's Dual Wield" plugin, I have two other plugins "VisuMZ_1_BattleCore" and "VisuMZ_1_ItemsEquipsCore" in my project;

Finally, when I use "NIJI Equip Slot Core", there is another plugin "CommonEventEquipment"(https://forums.rpgmakerweb.com/index.php?threads/common-event-on-equip-unequip.137381/) in my project, its function is to execute some code(Clear off-hand equipment for two-handed weapons) written in the note when I equip this equipment, to help me make Two-handed weapons, but I just tried it, and even if I don't enable CommonEventEquipment, the "NIJI Equip Slot Core" plugin still causes the database to invalidate the equipment restrictions for actors or classes.

Thank you for your reply.
it conflicts with two other plugins I use in the game, and because of the code is encrypted(I know some people on the forum don't like visustella, but please don't attack me
There is no reason for this. People on these forums don't just "attack" other people because of the plugins they choose to use.

my english is not very good
As Andar said, it is to your benefit and ours if you put that in your profile.

Hi, I set English as my first language in the settings because that's the only language I can communicate with people on the forum, or should I remove the first language?
"First language" means what you natively speak. If it's not English, you should say so and other people will accommodate you in their replies.

(I can't remove English because the forum requires me to choose a language, but I don't want to expose my country, so I won't use my own language)
That seems a little silly...just you saying that gives a very obvious clue of where you're from - and, again, no one here cares.

But you can type whatever you want into that field, so you can simply put "Not English".

So anyway...

If you're having all these problems with other plugins because of VisuStella, why not just use VisuStella plugins to do this?

With the Items and Equips Core, you can give an actor two weapon slots and a shield slot.

Then, you put on your weapons the notetag:
Code:
<Equip Requirements>
!user.armors().some(armor => armor.etypeId==1) || !user.weapons().length;
</Equip Requirements>
that means you can only equip a weapon if it is your first weapon or you have no shield.

Then you put on your shields the notetag:
Code:
<Equip Requirements>
user.weapons().length<2;
</Equip Requirements>
you can only equip a shield if you have 0 or 1 weapons.
Thank you for replying, sorry for the late reply, I had a power outage here just now, and then spent a lot of time organizing the language.
There is no reason for this. People on these forums don't just "attack" other people because of the plugins they choose to use.
Because I saw others arguing about this on the forum before, so I don't want to have a quarrel in this post.
As Andar said, it is to your benefit and ours if you put that in your profile.


"First language" means what you natively speak. If it's not English, you should say so and other people will accommodate you in their replies.


That seems a little silly...just you saying that gives a very obvious clue of where you're from - and, again, no one here cares.
I come from a backward developing country, so I have a bit of a low self about it. Of course it doesn't mean I don't love my country. In my country, the game industry is still a desert, and I want to plant some grass for this desert, so i came here.
But you can type whatever you want into that field, so you can simply put "Not English".
This is a good idea, I have modified. I'm still learning how to use the community, thank you for telling me.
So anyway...

If you're having all these problems with other plugins because of VisuStella, why not just use VisuStella plugins to do this?

With the Items and Equips Core, you can give an actor two weapon slots and a shield slot.
You seem to mean to add this note to the class:
<Equip Slots> weapon weapon shield </Equip Slots>

Unfortunately, that doesn't seem to be the question I'm asking. . . Without considering the head, body and decorations, my actor only has two equipment slots.

These two equipment slots are the main hand and the off hand. You can equip a one-handed sword or a two-handed sword in the main hand (the equipment in the off-hand is cleared at this time), and you can equip a one-handed sword or shield in the off-hand. The only problem I have is how to make the weapon has multiple equipment types, the one handed sword (in the weapon list in the database) has a natural weapon type, if I can add a shield type to it, I can make it equip to the off hand.

The "NIJI Equip Slot Core" plugin has the ability to add multiple equipment types to weapons, but it will cause the database's equipment restrictions for actors and classes to be invalid. I'm still trying to read its code to isolate this part of the functionality, but I can't understand his code.
Then, you put on your weapons the notetag:
Code:
<Equip Requirements>
!user.armors().some(armor => armor.etypeId==1) || !user.weapons().length;
</Equip Requirements>
that means you can only equip a weapon if it is your first weapon or you have no shield.

Then you put on your shields the notetag:
Code:
<Equip Requirements>
user.weapons().length<2;
</Equip Requirements>
you can only equip a shield if you have 0 or 1 weapons.
I would like to know where you checked the user.armors() and user.weapons() you wrote in "Equip Requirements", I didn't find them on the "Items_and_Equips_Core" plug-in page of the VS official website, I want to look them up myself, thanks again.
Unfortunately, that doesn't seem to be the question I'm asking. . . Without considering the head, body and decorations, my actor only has two equipment slots.
Yes, it is the question you're asking. You want to be able to dual wield weapons or use one weapon and a shield. This is a simple way to do it. One of those slots will always be empty.

There are other plugins that might be able to make you not see a third, empty slot. But you have written some very long posts about how you can't make those plugins work. This is a simple way to have the system you want in your game.

I would like to know where you checked the user.armors() and user.weapons() you wrote in "Equip Requirements", I didn't find them on the "Items_and_Equips_Core" plug-in page of the VS official website, I want to look them up myself, thanks again.
There's a pinned thread of MZ script calls you can use.
Yes, it is the question you're asking. You want to be able to dual wield weapons or use one weapon and a shield. This is a simple way to do it. One of those slots will always be empty.

There are other plugins that might be able to make you not see a third, empty slot. But you have written some very long posts about how you can't make those plugins work. This is a simple way to have the system you want in your game.


There's a pinned thread of MZ script calls you can use.
Thanks, I'll take the time to look up this thread.
With the Items and Equips Core, you can give an actor two weapon slots and a shield slot.

Then, you put on your weapons the notetag:
Code:
<Equip Requirements>
!user.armors().some(armor => armor.etypeId==1) || !user.weapons().length;
</Equip Requirements>
that means you can only equip a weapon if it is your first weapon or you have no shield.

Then you put on your shields the notetag:
Code:
<Equip Requirements>
user.weapons().length<2;
</Equip Requirements>
you can only equip a shield if you have 0 or 1 weapons.
Hi Turan, I hope you don't mind if I follow this up. I feel like I'm right on the edge of utilizing this method, but it's just not quite clicking.

So far I've managed to get multiple weapon slots on my characters, using the method you suggested. That part works fine.

The code you posted doesn't seem to do anything though. All I did was copy & paste your code into the sections you suggested. What am I missing here?

Just to clarify or rephrase your words (to make sure I'm understanding). The tag put in the weapon notes designates that it is a 2 handed weapon, correct? (like a broadsword or a bow). Without adding that tag, it's considered a single handed weapon. Am I correct?

The note put in the armour tag says, this armour is a shield that can only be equipped alongside a single, one handed weapon. Am I correct?

I'm sure I'll have questions about deeper complexities, but I'm (as usual) tripping over the basics.

I hope the mashup screenshot provides all the info you need.

Spoiler: Screen Grabs
Help Request Dual Wield.jpg

At present the character is still able to equip any weapon in either weapon slot and a shield. The system seems to be completely ignoring these tags.
At present the character is still able to equip any weapon in either weapon slot and a shield. The system seems to be completely ignoring these tags.
So sorries-nyan! 😢

I totally didn't read the instructions all righty. They have their own syntax of specific requirements they use, they can't take JavaScript.

I wrote stuff that would work with Yanfly's Equip Requirements, but it doesn't look like the VisuStella plugin has a way to support that.

Maybe there's another MZ plugin that can do it! 😊
So sorries-nyan! 😢

I totally didn't read the instructions all righty. They have their own syntax of specific requirements they use, they can't take JavaScript.

I wrote stuff that would work with Yanfly's Equip Requirements, but it doesn't look like the VisuStella plugin has a way to support that.

Maybe there's another MZ plugin that can do it! 😊
Hey no worries! Fiddle sticks! I really thought I was about to crack this problem. At least I'm not being as stupid as I thought I was.
Sadly, I think I'm gonna have to put in a new help request. At least I'm not barking up the wrong tree anymore. Thanks for the rapid response.

Also, you've transformed into a cute cat girl now. What the heck? haha
@Lomaxient
@Lomaxient
Duuuuude!!! I mean young lady!!! If this works like it looks like I think it's gonna, I'll be singing your praises tomorrow!

Original thread: https://forums.rpgmakerweb.com/threads/question-about-creating-dual-wield-weapons.159793/