Ramza's True Dual Wield -=Deprecated August 24 2017=-

I tried using it to make barehanded attacks work, but this.equips() is null if the mainhand is empty, so it doesn't have any properties to take, and if I detect a null value and manually set the imageId and weaponMotion to reflect an unarmed attack, it still pulls the weapon data from the offhand weapon instead.

Just make it so if it's null, it skips the default function, then create your own function to handle that exception. Basically this was what I did. 


This is how I handle this.

Spoiler
    VictorEngine.DualWield.performAttack = Game_Actor.prototype.performAttack;
    Game_Actor.prototype.performAttack = function() {
        var weapons = this.equips();
        if (this._dualWieldSpriteIndex === 2 || (!weapons[0] && DataManager.isWeapon(weapons[1]))) {
            var index = this._dualWieldSpriteIndex - 1;
            this.performDualWieldAttack(index);
        } else {
            VictorEngine.DualWield.performAttack.call(this)
        }
    };
    
    Game_Actor.prototype.performDualWieldAttack = function(index) {
        var weapons = this.equips();
        var wtypeId = weapons[index] ? weapons[index].wtypeId : 0;
        var attackMotion = $dataSystem.attackMotions[wtypeId];
        if (attackMotion) {
            if (attackMotion.type === 0) {
                this.requestMotion('thrust');
            } else if (attackMotion.type === 1) {
                this.requestMotion('swing');
            } else if (attackMotion.type === 2) {
                this.requestMotion('missile');
            }
            this.startWeaponAnimation(attackMotion.weaponImageId);
        }
    };

The only think you need to make the motion is the wtypeId, and the wtypeId = 0 is the one for the bare handed motion.


I made a condition to check if the action is a second attack or an unarmed attack while dual wielding. If either of them is ok, it calls my own 'performAttack' function.
Is this plugin still alive? I'm having a little problem.


I've given an actor 999atk sword in first hand and 1atk dagger in the other hand, but when attacking in the battle the actor first pulls his sword and deals the dagger's damage. Then he attacks with the dagger and deals the sword's damage. Somehow the attacks are swapped.


Also when I put the dagger and the sword in his opposite hands, the first attack deals 999atk and the next one deals 1000atk. I somehow fixed that, but the damage order still stays the same no matter in which hand I'm holding which weapon.


I'm not sure if the issue is on my side or the plugins', but here's my Attack action sequence.

Code:
<setup action>
display action
immortal: targets, true
</setup action>
<target action>
if user.attackMotion() !== 'missile'
  move user: targets, front, 20
else
  perform start
end
wait for movement
motion attack: user
wait: 10
attack animation: target
wait for animation
action effect
RamzaDWCleanup()
</target action>

I'd be glad if anyone could help, because it seems like this is the only dual wielding plugin in the internet.
Put the DWcleanup call in the finish section instead of the target section. With the dual attack, it plays the target action twice, and if you call it from there it'll swap the weapon stats incorrectly.


There might be something else wrong with that sequence too, I can look into it better when I'm at my computer.
Okay, I'll first state I'm not using the special animations from YanFly where they jump forward.


I'm explain the scenario I'm trying to accomplish and I think your plugin is working for it (animation wise).


But I don't think it's doing the damage correctly.  I'll explain.  I have the actor set to Slot Dual Wield, Attack +1 and ATK damage 75% as required.


In one hand we have a Thunder weapon.  In the other a Water weapon.  


In battle she attacks twice.  First shows thunder animation, second shows water animation.  GREAT!  


The jellyfish here are weak to thunder and nearly immune to water.


I'm getting numbers that just don't make sense.  Attacks with Thunder weapon.  Does 50.  Next is water, expecting about 5, does like 64?????


Is this because of that metadata or weapon cleanup stuff you refer too?


I am not using anything special for attack animations, just the standard SV ones,  


Any assistance with figuring out what the weapon damage values seem to be not working would be awesome!
Okay, I'll first state I'm not using the special animations from YanFly where they jump forward.


I'm explain the scenario I'm trying to accomplish and I think your plugin is working for it (animation wise).


But I don't think it's doing the damage correctly.  I'll explain.  I have the actor set to Slot Dual Wield, Attack +1 and ATK damage 75% as required.


In one hand we have a Thunder weapon.  In the other a Water weapon.  


In battle she attacks twice.  First shows thunder animation, second shows water animation.  GREAT!  


The jellyfish here are weak to thunder and nearly immune to water.


I'm getting numbers that just don't make sense.  Attacks with Thunder weapon.  Does 50.  Next is water, expecting about 5, does like 64?????


Is this because of that metadata or weapon cleanup stuff you refer too?


I am not using anything special for attack animations, just the standard SV ones,  


Any assistance with figuring out what the weapon damage values seem to be not working would be awesome!









If you're not using yanfly's action sequence plugin, I think it's impossible to properly call RamzaDMGsetup(user); before making the first strike, so I wouldn't be surprised if that was how this problem came up.


But in addition to that, RM MV does something weird with elemental weakness, and probably isn't properly calculating enemy resistance to those elements when you attack. My individual hits don't take into account other features of the weapons you're using, only the change in ATK stat, so the engine thinks you're attacking with two elements, in addition to probably losing the ATK on the second hit, which would explain the wide damage difference.


If you're not using yanfly's action sequences, Victor Sant's dual wield plugin is a better fit for you.


VE - Dual Wield
Perfect, looks like exactly what I was looking for.  (Not sure what it didn't come up with search results.  Thanks Ramza!
I don't understand the line

  • For it to properly work, you need dual wielding to be set up as a state that increases attack by (at least) 1. See image:

You referr to a State like Death or Sleep?


Because when i use it while I'm with dual wield, when I remove my sword in the off hand, Still have 2 hits.
I don't understand the line

  • For it to properly work, you need dual wielding to be set up as a state that increases attack by (at least) 1. See image:

You referr to a State like Death or Sleep?


Because when i use it while I'm with dual wield, when I remove my sword in the off hand, Still have 2 hits.

That happens for a combination of reasons.

  • The plugin has an issue where a barehanded attack will appear as if it were an attack made with a weapon equipped.
  • The plugin was designed that a dual wield actor would always dual wield, with or without weapons equipped.

The issue with the barehanded attack looking like a weapon swing is probably fixable, but I'm not sure where to look in the default scripts to find out where it's causing that problem. Victor has also suggested a completely different way of doing it, but I don't think I can successfully pull that off at this time, without losing compatibility with yanfly's weapon animations plugin.


If you don't want an actor dual wielding a weapon and a fist, you'll need to find a way to remove the dual wield state if he doesn't have two weapons equipped.
That happens for a combination of reasons.

  • The plugin has an issue where a barehanded attack will appear as if it were an attack made with a weapon equipped.
  • The plugin was designed that a dual wield actor would always dual wield, with or without weapons equipped.

The issue with the barehanded attack looking like a weapon swing is probably fixable, but I'm not sure where to look in the default scripts to find out where it's causing that problem. Victor has also suggested a completely different way of doing it, but I don't think I can successfully pull that off at this time, without losing compatibility with yanfly's weapon animations plugin.


If you don't want an actor dual wielding a weapon and a fist, you'll need to find a way to remove the dual wield state if he doesn't have two weapons equipped.

You could upload a video explain how set up the plugin?


I just fix it, thx.


But another question, I want to equip a Greatsword, and it's two handed, so In the Weapon states, I put "resistance" to the state assigned to dual wielding, how I could, when I unnequip the Greatsword, gain the dual wield state again?
Rather than resist the dual wield state, you can set the dual wield state to not be applied when you have a two handed weapon equipped.


<Custom Passive Condition>
if (user.isStateAffected(148)) { //state number is your two handed state
condition = false;
user.releaseUnequippableItems();
} else {
condition = true;
}
</Custom Passive Condition>


The above note tag on your dual wield state will make the state inactive when you have a two handed weapon equipped, and will force unequip your offhand weapon. You can also set the two-handed state to seal your shield/offhand slot in the traits box.


2handed.PNG
alright, I can't seem to get it working.


I have the dual wield set as a state. (using yanflys passive state). dual wield with the 75% and attack times +1 


in the default attack skill's notebox, i copy/pasted your sample action sequence.


I have a 1 hand sword in main hand, a dual wield gun in the offhand.


What i am seeing on a normal attack is the battler moves to enemy. Then attacks twice with the sword (should be sword first, then gun ).  One the first hit is the pierce animation, 2nd has a slash animation (should be slash then pierce). The battler returns to the side.


I have no action sequences set up but do have the 3 action sequence plugins. Did I misunderstand the instructions? Did the passive state affect this?


I am using the weapon animation and attachable augments. (changing weapon icons to match elements) Is this compatible?


Update: seems to work but only if i have the augments attached. <weapon image: x> seems to have no effect whether attached or not. Just for kicks I tried <weapon animation: x> too.
alright, I can't seem to get it working.


I have the dual wield set as a state. (using yanflys passive state). dual wield with the 75% and attack times +1 


in the default attack skill's notebox, i copy/pasted your sample action sequence.


I have a 1 hand sword in main hand, a dual wield gun in the offhand.


What i am seeing on a normal attack is the battler moves to enemy. Then attacks twice with the sword (should be sword first, then gun ).  One the first hit is the pierce animation, 2nd has a slash animation (should be slash then pierce). The battler returns to the side.


I have no action sequences set up but do have the 3 action sequence plugins. Did I misunderstand the instructions? Did the passive state affect this?


I am using the weapon animation and attachable augments. (changing weapon icons to match elements) Is this compatible?


Update: seems to work but only if i have the augments attached. <weapon image: x> seems to have no effect whether attached or not. Just for kicks I tried <weapon animation: x> too.

Sorry it took so long to get back to you on this.


I actually discovered a while back that you require the weapon animations plugin for this plugin to work at all. I'm pulling the weapon image files directly from that plugin. While I don't think there's anything wrong with the action sequence, as long as you copy-pasted it, anyway. I suspect what's happening is one or both of your weapons don't have the <weapon image: x> tag being read properly. With my own testing, I discovered that updating these tags mid-playthrough will not update them in an old save. Meaning that the animations may actually be correct, but will only display in a new save of your project.


Since the animations are displaying backwards though, I'm not 100% sure that the action sequence you're using is correct. Let me know what happens in a new save, and we'll see where to go from there.

Original thread: https://forums.rpgmakerweb.com/threads/ramzas-true-dual-wield-deprecated-august-24-2017.58194/