With the Barehanded Attack option set to OFF, if my ambidextrous actor has only one hand equipped as a mainhand, he attacks with a punch using the offhand.
I tested this on a blank project, with only YEP_BattleEngineCore and Ramza_dualWield, and didn't touch any parameters other than setting Barehanded Attack to OFF.
The problem was with a function that returned whether or not an actor was currently dual wielding. For some reason, when I rewrote that function on a previous update, I completely neglected to take that plugin parameter into account, so it was always considered dual wielding, whether or not the parameter was set.
I have uploaded the fix for that just a few minutes ago.
The intent was that you could turn off an extra barehanded attack if your offhand was empty, mostly for two handed weapon use, honestly, but if you're using no weapons at all, in the normal engine, the actor would still make a barehanded attack, so his main hand should always be considered armed, even if he has a weapon in his offhand.
Changing that in particular would be difficult because the plugin was not designed with that in mind. Attacks always come from the main hand first, the only exception being if the offhand is locked during a skill. To change it permanently would be much more involved than the change I did to make the offhand empty attack not trigger.
Hello, I'm on MV, and I'm working on a project along the lines of FF5, and I'm very interested in your plugins.
1st question:
I use a lot of yanfly plugins, do you have any known incompatibilities with your plugins ? and where should I place the addon among the other plugins?
2nd question:
Is your dualwield plugin fully compatible with MV/MZ weapon attack formulas?
so that each shot of each weapon is calculated with its own formula?
And still on the MV/MZ weapon attack formulas plugin (as I'm interested in the package) Do multi-line formulas work or, as with the basic skills formula box, am I limited to one line?
The only incompatibility I'm aware of between Dual Wield and Yanfly plugins is weapon unleash. Yanfly's weapon unleash doesn't work with default dual wielding, it only unleashes the skill of the first weapon, and that is how it works with my dual wield plugin as well.
Multiline formulas work in the note tags on weapons, but I don't think the code box in the plugin params supports them. Single line formulas that call other functions work great, and are probably better to use in such a case. In that case, you can pass a (subject), b (target), or any other value attached to them to the function as well.
Dual wield and weapon attack formulas are 100% compatible. Skills that lock to one weapon use the formula for only that weapon. Individual hits from multi hit skills (and a dual wield attack) will use the weapon formula for whatever weapon is being swung.
I understand asking questions prior to purchase. These aren't cheap plugins (the cost of them combined can be more expensive than you can get MV for some of the time), and it's good to know exactly what you're getting before you buy them, for sure.
I bought your plugins and they are great and despite the large number of plugins I use, including mine, no incompatibility concerns!
However, I'm running into a problem:
Would it be possible for tags to be isolated and treated like the basic atk, def, agi... weapon parameters?
Here's why:
I don't use the default damage formulas but I do use a tag on weapons <WeaponPower:X
In my version before your plugin:
This value was used to calculate damage via a formula, to equip an actor via "optimize", and it's displayed in the status and equipment menus.
No worries there.
My problem is that in my damage formulas, the <WeaponPower:X> values of my weapons add up for each hit, because they're not isolated like the param (atk, mat...).
I wanted to know if you had an idea of how I could isolate the values on the tags (and apply the scale mainhand, offhand or twohand) like the basic parameters.
I don't know if it's understandable in a single message and if you'd even be willing to discuss it with me.
If not, we could discuss it on Discord. My pseudo : Alasthorn
What plugin are you using to get that <WeaponPower: x> tag?
Since the value of that tag is being used in damage calculations, it should be pretty easy to isolate it on a per weapon basis similar to atk. I'd just have to know what I'm looking for to devise a patch.
Hi Ramza, just wanted to ask, assuming my actor is equipped with a range weapon in one hand and a melee weapon in another, is there a way to stop the dual-wielding attack when attacking a range enemy or limit to only the hand with a range weapon (such as in an aerial battle mechanics for example)?
I am using a mix of YEP's Target Core, Selection Control, Skill Core, and Row Formation, and this works great when the actor only has 1 weapon. However, with 2 weapons, I either have to disable the skill entirely or allow both attacks to happen, but no in between, or at least no known way. Hence, I am writing to check if this is possible?
EDIT: I guess what I am really asking is, if there is a "lunatic mode" of sorts to tag a skill as <Mainhand Skill>, <Offhand Skill>, or <Dualwield Skill>, depending on equipment.
This plugin has been extremely wonderful but i've been having one teensy issue with it, that being I have an actor who can wield both One-Hand (Dual Wield) & Two-Handed Weapons. For whatever reason, when the actor uses a two-hand weapon, the attack will play out as is but then will seemingly deal an additional attack that misses.
At first i thought it had to do with the issue of the "Barehand Attack" being enabled, so i disabled it and its still occurs for whatever reason.
What i do know is that it doesn't seem to be much of an issue with other characters (who use similar invoked skills), as they aren't dual wielding. So I am only guessing that its something to do with dual wielding characters.
Also i am now just noticing you addressed a bug like this in v2.73, which is actually the same problem i am currently facing, yet I am using v2.74..? Did i do something wrong then?
My load order:
YEP_CoreEngine
YEP_BattleEngineCore
YEP_X_BattleSysATB
YEP_X_ActSeqPack1 (& 2)
Ramza_DualWield
UPDATE, after re-configuring the load order (hoping that it would address the issue in some manner, it did not), my load order now represents the recommended Yanfly Load Order.
I do not have the monkey grip plugin and there is nothing equipped in my offhand, sorry for the late replay, I only just now noticed the comment.
Additionally, yes, I do have it set to "<twohanded>" and the attack in question is set to invoke a skill that is using YEP_ActSequence so it can attack all enemies at once but another <twohanded> weapon that doesn't use that skill (instead it's attack hits one target) has the same issue where it seemingly strikes twice.
So the weapon is not using the standard attack skill, but some other skill?
Is that via the Yanfly Weapon unleash plugin? What are the note tags you're using on the skill that it is using? Is it tagged as a dual wield skill? Does it have a unique action sequence?
its through weapon unleash yes, however said skill is VERY similar to the base attack, its just under a different name. (Instead of "Attack" its called "Shoot")
[here is the one without the Action Sequence stuff that still has the issue when its assigned to a two-handed weapon]
Here's the other one, still very much the same but it strikes all targets (i've assigned this one to shotguns) & has the action sequence stuff attached (I did this due to a problem i was facing last month where it would individually strike each and every target individually rather than all at once, and as I've stated, its only applied to shotguns)
I should note that i've tried mostly everything i could think of in regards to attempting to fix it, including just putting both Mainhand & Twohanded Tags, also after taking these images, i replaced the weapon skill plugin note tag with a weapon unleash notetag and its still attacking twice somehow, (also i am just learning i can attach more than one image, whoops! sorry for the multiple replies! I will update this one to include the multiple replies i made)
Also! Here is the plugin list in its entirety (it uploaded backwards..)! + Plugin Itself
(i tried adding in some of the extra plugins the DualWield Plugin had compatability, hoping that would resolve the issue, it sadly did not)
(UPDATE, i used another weapon that is assigned to the very first skill, which i then renamed back to "Attack" to see if it has something to do with the name, still attacks twice, what did i do to cause this bug to come back??? I'm honestly flabbergasted at myself because i feel like this is inadvertently my fault and i dont know how)
Unfortunately, weapon unleash isn't exactly compatible with the dual wield plugin, so I wonder if the problem is coming from that?
Can you try, for experimentation sake, using the twohanded weapon without weapon unleash to see the 'normal attack' skill that it would usually use and see if it also hits twice? I'm not entirely sure how weapon unleash codes its skill usage, but dual wield only 'detects' a skill as dual wielding automatically if it's the first skill in the skill list, or if it's tagged specifically as a <dual wield> skill, but the only effect this would have would be to have sequential attacks switch weapons (and damage) within that skill.
Moreover, the problem seems to be that the game is deciding that your actor is dual wielding, when he's not, which is triggering the extra attack even when he isn't.
During battle, can you open the console (f12) and put in the following script?
$gameParty.members()[0].isCurrentlyDualWielding()
Replace the 0 with the index of the party slot where the guy with the two handed weapon is. If he's the lead, he'll be index 0, if he's the second in line it's index 1, etc.
For someone who's actually actively got two weapons equipped, this should return true, but for someone using a twohander, it should be false. It should also return false if you have the barehanded attack parameter disabled, and he's got a one handed weapon and nothing in his off hand, or if he's got a shield in his offhand.
If that's coming back true, we probably know where the problem is, it's that the engine is detecting the user as dual wielding when he's not, and I can go from there to figure out why.
If it isn't detecting him as dual wielding via that script, then something is adding an extra attack to your skill, and that could be the skill unleash incompatibility I was talking about earlier. The dual wield plugin does make some 'secret' changes to the action sequence of the attack skill, and to any skills tagged with the skill tags.
It could also be something simple, like a trait adding an extra attack to the actor, which would also make the regular attack skill hit twice.
I'm sorry you're having this issue. But I am unable to reproduce the problem on my end, so it might be being caused by a bug with some configuration you're using.
Please ensure that you are starting a fresh savegame when you're testing this, as the equipment in an old saves database files may not contain all of the metadata that the plugin is expecting.
Did you use the <Forbidden Wtypes: x y z> note tag on any weapons that are currently equipped, or might show up in the equipment list?
If yes, can you temporarily remove that tag and test to see if the crash still happens?
How is dual wielding set on an actor? Is it on their class traits? Their actor traits? A piece of equipment? A weapon?
Does the crash happen when trying to equip a weapon in the main hand or offhand slot? Both?
Does the actor start with two weapons already equipped? Does the crash still happen if they have only one, or no weapons at all equipped?
If you make your actors no longer dual wielding type (remove the trait), does the crash still happen?
Once I get a little more info, we'll try to get this sorted out for you.
Wow fast response, I fixed it just now by adding the Ramza_X_DW_MenuExtension plugin that I saw in the demo project. Maybe this is also mandatory? It wasn't mentioned in the required plugins.
I have run into another issue. Two attacks are occurring despite the off hand having no weapon equipped, having a main weapon and a shield equipped or when wielding a two handed weapon. This second attack with a main+shield equipped has no animation.
The Barehanded Attack parameter doesn't change any of this for me.
Hi, is there a way to make a state add bonus to specified hand? I can make condition to check if left hand or right hand is a specified weapon type equipped, however it can only add regular state which increases the to hit/damage/critical bonus to the character which affects both hands.
The modifier plugin parameters for dual wielding, offhand, and two handing a weapon can all be eval'd. By default, they're just a float number (0.75 for example), but you can use code in this box to make the number different based on a condition being met using a ternary operator:
(user.isStateAffected(21) ? 0.90 : 0.75
Something like the above would make the offhand do 90% normal damage if the user is affected by state 21, or 75% or not. These can be nested as well, allowing for different levels of offhand mastery, or ambidexterity, or whatever
I'm not entirely sure that's the exact code you'd use to do that, I didn't get a chance to test it, but I had set it up once a long time ago, in an old project, and it was designed for that use case. It's not exactly what you're looking for, but it can work for what you need.
The hit and crit bonuses are weapon specific. Any source of hit rate or crit rate that isn't on a weapon is given to both hands, and any that is on a weapon is only given to that one weapon. There is no way to change this currently.
← Return to add-on
Comments
Log in with itch.io to leave a comment.
Hi Ramza,
I've just detected a bug (I'm on MV) :
With the Barehanded Attack option set to OFF, if my ambidextrous actor has only one hand equipped as a mainhand, he attacks with a punch using the offhand.
I tested this on a blank project, with only YEP_BattleEngineCore and Ramza_dualWield, and didn't touch any parameters other than setting Barehanded Attack to OFF.
This is the last version : v2.75
Good catch.
The problem was with a function that returned whether or not an actor was currently dual wielding. For some reason, when I rewrote that function on a previous update, I completely neglected to take that plugin parameter into account, so it was always considered dual wielding, whether or not the parameter was set.
I have uploaded the fix for that just a few minutes ago.
I've just tested your modification but there's another bug:
- when you equip a Hand alone, everything's fine, just one sword strike.
- But if you equip an Offhand weapon only, only one blow is triggered, but it's the MainHand punch, and the Offhand weapon is useless.
EDIT: To be more precise, it's the Offhand weapon's animation that's played, but the Mainhand's damage is applied
(I tested it on a blank project to be sure)...
Ah, I probably missed that contingency when I rewrote the code again. I'll have it fixed in a few minutes.
Edit: the fix is live, redownload it from the devlog or the main page again and it should say it's version 2.76a now.
sorry, you're going to end up hating me :P
but there's one last bug:
when the weapon is in offhand, the first punch is also triggered
no worries when there's no weapon, two weapons, or one weapon but in mainhand.
Alas, that one is intended.
The intent was that you could turn off an extra barehanded attack if your offhand was empty, mostly for two handed weapon use, honestly, but if you're using no weapons at all, in the normal engine, the actor would still make a barehanded attack, so his main hand should always be considered armed, even if he has a weapon in his offhand.
Changing that in particular would be difficult because the plugin was not designed with that in mind. Attacks always come from the main hand first, the only exception being if the offhand is locked during a skill. To change it permanently would be much more involved than the change I did to make the offhand empty attack not trigger.
~Ramza
Hello, I'm on MV, and I'm working on a project along the lines of FF5, and I'm very interested in your plugins.
1st question:
I use a lot of yanfly plugins, do you have any known incompatibilities with your plugins ?
and where should I place the addon among the other plugins?
2nd question:
Is your dualwield plugin fully compatible with MV/MZ weapon attack formulas?
so that each shot of each weapon is calculated with its own formula?
And still on the MV/MZ weapon attack formulas plugin (as I'm interested in the package)
Do multi-line formulas work or, as with the basic skills formula box, am I limited to one line?
For example, is a formula like this possible?
const power = power1Base + Math.randomInt(power1Base / 8);
const def = Math.floor(b.def / 16 + b.armurePhysique());
const multi = Math.floor((a.level * a.atk) / 128) + 2;
Math.floor(Math.max((power - def), 0) * multi) ;
or a script call like this?
DamageFormulas.blackMagicAttack(a, b,power)
I'm sorry but I don't have much money so I want to be sure that the plugin is compatible with my project before I buy it.
Thank you for your understanding!
Greetings.
I understand asking questions prior to purchase. These aren't cheap plugins (the cost of them combined can be more expensive than you can get MV for some of the time), and it's good to know exactly what you're getting before you buy them, for sure.
Let me know if you have any other questions.
~Ramza
thanks for the quick reply!
I'll try using your plugins :)
Hi Ramza,
I bought your plugins and they are great and despite the large number of plugins I use, including mine, no incompatibility concerns!
However, I'm running into a problem:
Would it be possible for tags to be isolated and treated like the basic atk, def, agi... weapon parameters?
Here's why:
I don't use the default damage formulas but I do use a tag on weapons <WeaponPower:X
In my version before your plugin:
This value was used to calculate damage via a formula, to equip an actor via "optimize", and it's displayed in the status and equipment menus.
No worries there.
My problem is that in my damage formulas, the <WeaponPower:X> values of my weapons add up for each hit, because they're not isolated like the param (atk, mat...).
I wanted to know if you had an idea of how I could isolate the values on the tags (and apply the scale mainhand, offhand or twohand) like the basic parameters.
I don't know if it's understandable in a single message and if you'd even be willing to discuss it with me.
If not, we could discuss it on Discord. My pseudo : Alasthorn
Thanks for your time!
What plugin are you using to get that <WeaponPower: x> tag?
Since the value of that tag is being used in damage calculations, it should be pretty easy to isolate it on a per weapon basis similar to atk. I'd just have to know what I'm looking for to devise a patch.
~Ramza
hi,
This is not a plugin available online, it's a plugin that I made myself.
The plugin allows you to declare weapon power and armor quality values independent of the basic stats.
these tags allow use in formulas.
simplistic example: damage = ( a.atk / 8 + a.weaponpower() ) - (b.def/16 + b.physicalArmor)
it's a simple plugin (with my level in javascript, I didn't make it too complicated :P)
do you think I can send it to you by discord (name : Alasthorn) or RPG Maker forum (name : Alasth)
Hi Ramza, just wanted to ask, assuming my actor is equipped with a range weapon in one hand and a melee weapon in another, is there a way to stop the dual-wielding attack when attacking a range enemy or limit to only the hand with a range weapon (such as in an aerial battle mechanics for example)?
I am using a mix of YEP's Target Core, Selection Control, Skill Core, and Row Formation, and this works great when the actor only has 1 weapon. However, with 2 weapons, I either have to disable the skill entirely or allow both attacks to happen, but no in between, or at least no known way. Hence, I am writing to check if this is possible?
EDIT: I guess what I am really asking is, if there is a "lunatic mode" of sorts to tag a skill as <Mainhand Skill>, <Offhand Skill>, or <Dualwield Skill>, depending on equipment.
This plugin has been extremely wonderful but i've been having one teensy issue with it, that being I have an actor who can wield both One-Hand (Dual Wield) & Two-Handed Weapons. For whatever reason, when the actor uses a two-hand weapon, the attack will play out as is but then will seemingly deal an additional attack that misses.
At first i thought it had to do with the issue of the "Barehand Attack" being enabled, so i disabled it and its still occurs for whatever reason.
What i do know is that it doesn't seem to be much of an issue with other characters (who use similar invoked skills), as they aren't dual wielding. So I am only guessing that its something to do with dual wielding characters.
Also i am now just noticing you addressed a bug like this in v2.73, which is actually the same problem i am currently facing, yet I am using v2.74..? Did i do something wrong then?
My load order:
YEP_CoreEngine
YEP_BattleEngineCore
YEP_X_BattleSysATB
YEP_X_ActSeqPack1 (& 2)
Ramza_DualWield
UPDATE, after re-configuring the load order (hoping that it would address the issue in some manner, it did not), my load order now represents the recommended Yanfly Load Order.
Hello there.
When the actor is using a twohanded weapon, do they have something in their offhand, like a shield, or is that slot completely empty?
Is the two handed weapon tagged as <twohanded>?
Are you using the Monkey Grip extension, and is the actor monkeygripping?
I did fix a bug like this in a previous version but it may not have been the exact situation you have going on right now.
~Ramza
I do not have the monkey grip plugin and there is nothing equipped in my offhand, sorry for the late replay, I only just now noticed the comment.
Additionally, yes, I do have it set to "<twohanded>" and the attack in question is set to invoke a skill that is using YEP_ActSequence so it can attack all enemies at once but another <twohanded> weapon that doesn't use that skill (instead it's attack hits one target) has the same issue where it seemingly strikes twice.
So the weapon is not using the standard attack skill, but some other skill?
Is that via the Yanfly Weapon unleash plugin? What are the note tags you're using on the skill that it is using? Is it tagged as a dual wield skill? Does it have a unique action sequence?
~Ramza
its through weapon unleash yes, however said skill is VERY similar to the base attack, its just under a different name. (Instead of "Attack" its called "Shoot")
[here is the one without the Action Sequence stuff that still has the issue when its assigned to a two-handed weapon]
I should note that i've tried mostly everything i could think of in regards to attempting to fix it, including just putting both Mainhand & Twohanded Tags, also after taking these images, i replaced the weapon skill plugin note tag with a weapon unleash notetag and its still attacking twice somehow, (also i am just learning i can attach more than one image, whoops! sorry for the multiple replies! I will update this one to include the multiple replies i made)
Also! Here is the plugin list in its entirety (it uploaded backwards..)! + Plugin Itself
(UPDATE, i used another weapon that is assigned to the very first skill, which i then renamed back to "Attack" to see if it has something to do with the name, still attacks twice, what did i do to cause this bug to come back??? I'm honestly flabbergasted at myself because i feel like this is inadvertently my fault and i dont know how)
Unfortunately, weapon unleash isn't exactly compatible with the dual wield plugin, so I wonder if the problem is coming from that?
Can you try, for experimentation sake, using the twohanded weapon without weapon unleash to see the 'normal attack' skill that it would usually use and see if it also hits twice? I'm not entirely sure how weapon unleash codes its skill usage, but dual wield only 'detects' a skill as dual wielding automatically if it's the first skill in the skill list, or if it's tagged specifically as a <dual wield> skill, but the only effect this would have would be to have sequential attacks switch weapons (and damage) within that skill.
Moreover, the problem seems to be that the game is deciding that your actor is dual wielding, when he's not, which is triggering the extra attack even when he isn't.
During battle, can you open the console (f12) and put in the following script?
Replace the 0 with the index of the party slot where the guy with the two handed weapon is. If he's the lead, he'll be index 0, if he's the second in line it's index 1, etc.
For someone who's actually actively got two weapons equipped, this should return true, but for someone using a twohander, it should be false. It should also return false if you have the barehanded attack parameter disabled, and he's got a one handed weapon and nothing in his off hand, or if he's got a shield in his offhand.
If that's coming back true, we probably know where the problem is, it's that the engine is detecting the user as dual wielding when he's not, and I can go from there to figure out why.
If it isn't detecting him as dual wielding via that script, then something is adding an extra attack to your skill, and that could be the skill unleash incompatibility I was talking about earlier. The dual wield plugin does make some 'secret' changes to the action sequence of the attack skill, and to any skills tagged with the skill tags.
It could also be something simple, like a trait adding an extra attack to the actor, which would also make the regular attack skill hit twice.
~Ramza
Only running this plugin + Battle Engine Core/Core Engine and I get this error whenever I try to equip a weapon
TypeError: undefined is not a function
at Window_EquipItem.isMHAllowedWithOffHandWtypeId (file:///E:/RPGMVProjects/Project2/js/plugins/Ramza_DualWield.js:1568:37)
at Window_EquipItem.includes (file:///E:/RPGMVProjects/Project2/js/plugins/Ramza_DualWield.js:1608:33)
at Window_EquipItem.<anonymous> (file:///E:/RPGMVProjects/Project2/js/rpg_windows.js:1972:21)
at Array.filter (native)
at Window_EquipItem.Window_ItemList.makeItemList (file:///E:/RPGMVProjects/Project2/js/rpg_windows.js:1971:40)
at Window_EquipItem.Window_ItemList.refresh (file:///E:/RPGMVProjects/Project2/js/rpg_windows.js:2013:10)
at Window_EquipItem.setSlotId (file:///E:/RPGMVProjects/Project2/js/rpg_windows.js:2474:14)
at Window_EquipSlot.update (file:///E:/RPGMVProjects/Project2/js/rpg_windows.js:2391:26)
at file:///E:/RPGMVProjects/Project2/js/rpg_core.js:7029:19
at Array.forEach (native)
Greetings.
I'm sorry you're having this issue. But I am unable to reproduce the problem on my end, so it might be being caused by a bug with some configuration you're using.
Once I get a little more info, we'll try to get this sorted out for you.
~Ramza
Wow fast response, I fixed it just now by adding the Ramza_X_DW_MenuExtension plugin that I saw in the demo project. Maybe this is also mandatory? It wasn't mentioned in the required plugins.
That shouldn't be required, and isn't turned on in my test project where I was trying to duplicate your crash.
I'm glad it's working for you now, though. Let me know if you have any other issues.
Thank you!
I have run into another issue. Two attacks are occurring despite the off hand having no weapon equipped, having a main weapon and a shield equipped or when wielding a two handed weapon. This second attack with a main+shield equipped has no animation.
The Barehanded Attack parameter doesn't change any of this for me.
Hi, I think I've found a situtational minor bug.
By using these 3 plugins (yanfly core, yanfly battle core, dual wield), if a character equips a weapon that has tag <Twohanded>,
then uses an item that uses gainHP formula such as b.gainHp(Math.randomInt(50) + 51); b.startDamagePopup();, the heal effect becomes twice.
Using <Mainhand> does not cause this bug.
Hi, is there a way to make a state add bonus to specified hand? I can make condition to check if left hand or right hand is a specified weapon type equipped, however it can only add regular state which increases the to hit/damage/critical bonus to the character which affects both hands.
There is currently no way to do that exactly.
The modifier plugin parameters for dual wielding, offhand, and two handing a weapon can all be eval'd. By default, they're just a float number (0.75 for example), but you can use code in this box to make the number different based on a condition being met using a ternary operator:
Something like the above would make the offhand do 90% normal damage if the user is affected by state 21, or 75% or not. These can be nested as well, allowing for different levels of offhand mastery, or ambidexterity, or whatever
I'm not entirely sure that's the exact code you'd use to do that, I didn't get a chance to test it, but I had set it up once a long time ago, in an old project, and it was designed for that use case. It's not exactly what you're looking for, but it can work for what you need.
The hit and crit bonuses are weapon specific. Any source of hit rate or crit rate that isn't on a weapon is given to both hands, and any that is on a weapon is only given to that one weapon. There is no way to change this currently.
~Ramza
Thanks for the reply. Too bad this cannot be done, I'll figure alternate way buffing dual wield characters then.