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, 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.