Dual Wield

Is there any way I can make it so a character can dual-wield two weapons, but certain weapons cannot be dual-wielded, since they require both hands to wield?
Someone gave me this code snippet that should help you out:


<Custom Passive Condition>
if (user.isEquipTypeSealed(2)) {
condition = false;
user.releaseUnequippableItems();
} else {
condition = true;
}
</Custom Passive Condition>


You need Yanfly's passive states plugin to use it.


Make your two handed weapons disable your shield slot, and put this note tag on a passive state that gives you dual wield. It isn't pretty, as it just immediately removes any disallowed equipment without a message or anything, but it works.
You can also use this instead if you don't want it to automatically unequip something. This will just gray out the 2h item in question if you already dual wielding (make it so one-handed weapons grant the dual wielding trait, instead of having it on the actor itself).
 


<Custom Equip Requirement Condition>


if (user.isDualWield()) {


condition = false;


} else {


condition = true;


}


</Custom Equip Requirement Condition>


Require's Yanfly's equiprequirements plugin.
Can I have it so dual welders can also use shields, though?
@Emperor DragonBreath


If an actor has the dual wield type, he would be unable to equip a shield unless you removed that type first. You could achieve this through traits on certain weapons, but it'd be nearly impossible to have an actor use the same weapon for both dual wielding and for one-handing with a shield.


There is a plugin that modifies this default behavior to force all actors to dual wield and treat shields as an offhand only weapon, but the name escapes me right now, and it involves a lot of setup.
@Emperor DragonBreath


If an actor has the dual wield type, he would be unable to equip a shield unless you removed that type first. You could achieve this through traits on certain weapons, but it'd be nearly impossible to have an actor use the same weapon for both dual wielding and for one-handing with a shield.


There is a plugin that modifies this default behavior to force all actors to dual wield and treat shields as an offhand only weapon, but the name escapes me right now, and it involves a lot of setup.

Maliki's Dual Wield?
Yeah that's the one.
Just make the shield a one handed weapon, but offer the stats of a shield. That's wut I did on my project
You can also use this instead if you don't want it to automatically unequip something. This will just gray out the 2h item in question if you already dual wielding (make it so one-handed weapons grant the dual wielding trait, instead of having it on the actor itself).
 


<Custom Equip Requirement Condition>


if (user.isDualWield()) {


condition = false;


} else {


condition = true;


}


</Custom Equip Requirement Condition>


Require's Yanfly's equiprequirements plugin.

I'm using Maliki's Dual Wield plugin. Can I use the condition you showed me to cut a weapon's attack power in half if you are wielding two weapons and not a shield?

Original thread: https://forums.rpgmakerweb.com/threads/dual-wield.58126/