Ramza's new and Improved Dual Wield Plugin -=UPDATED April 3 2019=-

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
@ArtemNevsky I have corrected this problem in the latest version 2.27. The problem was that item params added via note tags were not being applied to the actual params on the item itself, but are applied as a bonus parameter in a different section of the function. While I was subtracting the offhand weapons attack param from the main hand weapon's damage calculation, and vice versa, I was not doing this with the bonus parameters. This has been fixed.

Edit: I have updated the plugin to v2.27a, which corrects an issue where v2.27 would cause the engine to crash if YEP_EquipCore was not being used.
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
So after doing some testing in my own project with this plugin, it has come to my attention that YEP_DamageCore will overwrite the damage splitting functionality of this plugin. The solution to this is to load Ramza_DualWield.js after YEP_DamageCore in the load order.

With that being said, I have updated the OP with load order information. Generally speaking, this should be loaded with your other battle plugins, anytime after Damage Core, but it's most likely the best idea to load it as close to last in the battle plugins section, to prevent other plugins from interfering with damage calculations and whatnot.

Edit:
I have updated the plugin to v2.28 with the following changes:
  • Certain menu scenes will no longer show a non-dual wield actor as being able to use a weapon tagged <offhand>, if that weapon type would normally be equippable by that actor. This was most noticeable on the shop scene, as the actor's current equipment in the offhand slot would show, even though that actor wouldn't be able to equip an offhand weapon due to not being able to dual wield.
  • Fixed a bug where an action sequence would always return false for all target.result() checks (isHit(), isPhysical(), isMagical(), etc). This had been an issue since v2.10 of the plugin, but was difficult to detect until my recent play-testing with my own project. The most obvious issue that this was causing was an action sequence that checks for a hit before showing the attack animation (which is one of the basic ones in the action sequence thread), to deal damage normally but never show the attack animation.
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
I have updated the plugin to v2.29 with the following changes:
  • Weapon damage modifiers added in v2.24 for using a two-handed or offhand weapon, or dual wielding, now properly apply to bonus parameters added via event command. Previously, these bonuses were ignored in the calculation of main and offhand damage.
I have also updated the menu extension plugin to v1.04 with the following changes:
  • The extension will now detect versions of the base plugin older than v2.20 and throw an error alerting the developer that this plugin requires at least v2.24 of the base plugin to function. Previously, versions older than this were not being detected, so no error would be thrown, but the game would crash in menu scenes modified by this plugin.
  • Fixed a display issue with YEP_EquipCore, where the equip scene was showing an offhand attack value in the stat change preview window when a two-handed weapon was being replaced by a one-handed weapon, even when the actor swapping equipment was not dual wield type.
 
Last edited:

Treydon

Hobby Gamer
Member
Joined
Mar 27, 2013
Messages
18
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello again,

I updated this plug-in last night and deployed to my phone to do a test of some things and I noticed my dual-wield actor doesn't have an off-hand stat anymore. Just the one atk stat. I'm at work so I'll have to check when I get home to make sure that I didn't change anything else. But I'm pretty sure all I did was update these two plug-ins.

Thanks!
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
@Treydon I haven't done any testing in a mobile environment, so I can't guarantee that the extension plugin works there (although I don't see why it wouldn't). Which menu scene is this happening in? equip? status? both? Are you using YEP plugins as well for affected scenes? Is the blank space for the second attack value still present?
 

Treydon

Hobby Gamer
Member
Joined
Mar 27, 2013
Messages
18
Reaction score
0
First Language
English
Primarily Uses
RMMV
It was previously working on the mobile testing I was doing. Just ran a play test on the desktop and the offhand atk stat isn't present there either. I am using yep plugins but no new ones from when it was working fine before. It's happening in all screens and the blank space isn't there. I still have "main and offhand" equip slots, but there is just the one atk stat.

Sorry for the lack of details earlier.

- EDIT

So I moved the plug-ins down a few spots in my list and it brought back the offhand stat in all the scenes except for the shop menu. Can't remember if it showed up there before.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
Ah, that'd do it. the extension plugin needs to be below all yanfly menu plugins in order to overwrite the way they draw.

It wasn't previously present on the shop menu, but I have good news on that front:

I have updated the extension plugin to v1.11 with the following changes:
  • YEP_ShopMenuCore is now fully supported
    • All items are compared only against items they can replace on the current actor. This means a shield will only be compared to whatever is in the offhand of the actor (shield or weapon), a mainhand only item or two-handed item will only be compared against the item in the actor's main hand.
    • When viewing an item that can go in either hand, and the actor selected is dual wielding, the stat compare pane becomes split, and compares the selected item against both the main hand item, and the offhand item. It looks like this:DWEXShop_001.PNG
    • Because the area is smaller, the pane only shows the four largest param changes per item. If less than four params are changed, it fills the empty spots in order of the param list.
    • The secondary window pane, where it shows the param changes of all actors simultaneously has also been updated so that if the actor is dual wield type, and is looking at an item that can go in either hand, it will show the param changes of both the main hand and the off hand simultaneously again. It looks like this:DWEXShop_002.PNG
    • (note that this param window is viewed by pressing tab on the item being viewed in the shop scene)
  • Added a plugin parameter to show the item possession count at the bottom of the split param pane window. I personally think it doesn't look good in that place, but there isn't any room to put it anywhere else, so I allow you to disable it.
  • Note that this plugin doesn't change anything in the default shop scene from before. You need the YEP_ShopMenuCore plugin to see any changes. This plugin must be loaded after all YEP plugins in your load order.
Edit: Links have been updated to v1.11 which has the following bugfixes:
  • If you have an actor whose equip slots does not include an offhand slot (no second weapon, or shield slot), through equip core, this plugin will no longer rename equip slot 1 to show it as being an offhand weapon slot. This prevents actors whose second equip slot is, say, their head slot, from showing hats as able to be equipped in a slot named 'Off', for example.
  • If viewing a one handed weapon that cannot be equipped by the current dual wield actor, the shop scene will no longer show the split weapon comparison pane, and will instead show the default comparison pane. This was also causing the four largest params to change order (if moving between two weapons with different params that both couldn't be equipped), even though the param change values would always show '-'.
 
Last edited:

Treydon

Hobby Gamer
Member
Joined
Mar 27, 2013
Messages
18
Reaction score
0
First Language
English
Primarily Uses
RMMV
@ramza Awesome! You are the king! Great work and many thanks!
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
Updated the main plugin to v2.30a with the following fixes:
  • (revision a) Fixed an issue with the 'odd attacks' bug fix below, where after the first action taken in a project, all allies will have their weapon animations reversed (main hand hit will cause off hand damage animation). If an actor wasn't wielding a weapon in their offhand, they will instead have no weapon damage animation.
  • Fixed an issue where skills that used a custom damage formula via note tags on skills may not have their note tag interpreted correctly, resulting in some skills dealing zero damage. This was an issue with all skills, not just skills affected by this plugin.
  • Fixed an issue where after a dual wield type actor used a physical skill that hit an odd number of hits, his off and main hand weapons would have their damage, graphic and animation swapped permanently.
 
Last edited:

Treydon

Hobby Gamer
Member
Joined
Mar 27, 2013
Messages
18
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello again, I'm getting an error when I turn on the extension and go into a shop to buy something. It says:
"TypeError
Cannot read property 'params' of null"

I haven't added anything else. All other scenes are behaving normally.

Any ideas?
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
I am unable to reproduce this issue on my end without more info.

Does this error come up when the shop menu first opens, or after you select buy/sell, to show the list of items? What kind of item is the first item on the list in the shop, is it a weapon? Is that weapon one handed? Is the first actor in the party dual wield type?

If you could copy and paste the full contents of the console log into a post here, I might be able to narrow it down more. View the log by pressing f8 when the error comes in.

Also, please ensure you're using the latest version of the extension plugin, (v1.11) and that it is loaded as close to last on your plugin load order as possible.
 

Treydon

Hobby Gamer
Member
Joined
Mar 27, 2013
Messages
18
Reaction score
0
First Language
English
Primarily Uses
RMMV
I am unable to reproduce this issue on my end without more info.

Does this error come up when the shop menu first opens, or after you select buy/sell, to show the list of items? What kind of item is the first item on the list in the shop, is it a weapon? Is that weapon one handed? Is the first actor in the party dual wield type?

If you could copy and paste the full contents of the console log into a post here, I might be able to narrow it down more. View the log by pressing f8 when the error comes in.

Also, please ensure you're using the latest version of the extension plugin, (v1.11) and that it is loaded as close to last on your plugin load order as possible.
It is only when I actually select "buy". The sell and equip windows work perfectly fine. The first item on the list is a weapon. just a dagger. Nothing special. Tried with a shop further into the game, same problem. Doesn't happen at an item shop (with no weapons). The first actor is a dual wield actor. I tried it with a different actor and it loaded in fine but when I press left or right to preview for the dual wield I get the same error.

pixi.js:27682
PixiJS 4.5.4 - ✰ WebGL ✰ http://www.pixijs.com/ ♥♥♥


rpg_managers.js:1949 TypeError: Cannot read property 'params' of null
at Window_ShopStatus.getTopFourOHParams (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:2071)
at Window_ShopStatus.drawActorStatInfo (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:1931)
at Window_ShopStatus.drawActorData (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:1780)
at Window_ShopStatus.refresh (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:1886)
at Window_ShopStatus.setItem (rpg_windows.js:3296)
at Window_ShopStatus.setItem (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/YEP_X_MoreCurrencies.js:797)
at Window_ShopBuy.updateHelp (rpg_windows.js:3014)
at Window_ShopBuy.updateHelp (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/YEP_ShopMenuCore.js:764)
at Window_ShopBuy.updateHelp (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/YEP_X_MoreCurrencies.js:953)
at Window_ShopBuy.Window_Selectable.callUpdateHelp (rpg_windows.js:1233)

I've tried turning off the more currencies plug in as well. Still the same problem. (I only have one extra currency for colloseum prizes).
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
Good news, I found the problem. The plugin wasn't handling dual wield actors who had nothing in either of their weapon slots properly. The error you were getting was because your dual wield type actor has an empty offhand. I also noticed that this would happen if his main hand was empty too, but would show the message 'undefined' instead of 'null' in your message.

I have uploaded v1.12 to correct this issue.

edit: I also corrected an issue in v2.30 of the main plugin, where after the first action taken in the game, all allies will always have their weapon animations reversed. I have updated the drop box link, and changed the attachments on the OP and the post for v 2.30 to version 2.30a.
 
Last edited:

Treydon

Hobby Gamer
Member
Joined
Mar 27, 2013
Messages
18
Reaction score
0
First Language
English
Primarily Uses
RMMV
Thanks again for the quick action; however, I'm still getting an error. Same setup. I tried it with a <Twohanded> weapon as well with the offhand empty. Still getting the error on both. Or a similar error

PixiJS 4.5.4 - ✰ WebGL ✰ http://www.pixijs.com/ ♥♥♥


rpg_managers.js:1949 TypeError: Cannot read property 'params' of null
at Window_ShopStatus.getTopFourOHParams (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:2082)
at Window_ShopStatus.drawActorStatInfo (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:1931)
at Window_ShopStatus.drawActorData (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:1780)
at Window_ShopStatus.refresh (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:1886)
at Window_ShopStatus.setItem (rpg_windows.js:3296)
at Window_ShopStatus.setItem (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/YEP_X_MoreCurrencies.js:797)
at Window_ShopBuy.updateHelp (rpg_windows.js:3014)
at Window_ShopBuy.updateHelp (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/YEP_ShopMenuCore.js:764)
at Window_ShopBuy.updateHelp (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/YEP_X_MoreCurrencies.js:953)
at Window_ShopBuy.Window_Selectable.callUpdateHelp (rpg_windows.js:1233)rpg_managers.js:1949 SceneManager.catchException
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
Thanks again for the quick action; however, I'm still getting an error. Same setup. I tried it with a <Twohanded> weapon as well with the offhand empty. Still getting the error on both. Or a similar error

PixiJS 4.5.4 - ✰ WebGL ✰ http://www.pixijs.com/ ♥♥♥


rpg_managers.js:1949 TypeError: Cannot read property 'params' of null
at Window_ShopStatus.getTopFourOHParams (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:2082)
at Window_ShopStatus.drawActorStatInfo (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:1931)
at Window_ShopStatus.drawActorData (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:1780)
at Window_ShopStatus.refresh (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/Ramza_X_DW_MenuExtension.js:1886)
at Window_ShopStatus.setItem (rpg_windows.js:3296)
at Window_ShopStatus.setItem (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/YEP_X_MoreCurrencies.js:797)
at Window_ShopBuy.updateHelp (rpg_windows.js:3014)
at Window_ShopBuy.updateHelp (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/YEP_ShopMenuCore.js:764)
at Window_ShopBuy.updateHelp (/C:/Users/David/Documents/Games/Heroes%20Within%20Us/js/plugins/YEP_X_MoreCurrencies.js:953)
at Window_ShopBuy.Window_Selectable.callUpdateHelp (rpg_windows.js:1233)rpg_managers.js:1949 SceneManager.catchException
Errhm. Alright, that's fixed in revision a. Turns out that the fix I thought I applied for both hands only worked on the main hand, due to a typo. I had tested the fix, but it happened that the test scenario I used (no weapons) was actually fixed by the typo, as the offhand slot was checking to see if the main hand weapon existed. In the case of a two-handed weapon, it was confirming that a weapon did exist, then trying to pull params from the offhand, which didn't.

The dropbox links are updated. Thanks for your patience.
 

Treydon

Hobby Gamer
Member
Joined
Mar 27, 2013
Messages
18
Reaction score
0
First Language
English
Primarily Uses
RMMV
Awesome! Works perfectly now. Thanks a million.
 

ArtemNevsky

Villager
Member
Joined
Nov 21, 2015
Messages
23
Reaction score
0
Hey. I have a question. Perhaps this is a bug, or a plug-in feature. When an actor equips a one-handed weapon, the OffAtk counter changes to 0 and causes two Dagger attacks and a fist (Pictures 1, 2, 3, 4 and 5).

Whether it is possible to make so that it yet does not equip the second weapon or shield. Can not make a second strike with a fist. Only one blow(Main)
upload_2017-10-1_19-16-29.pngupload_2017-10-1_19-17-2.pngupload_2017-10-1_19-17-54.pngupload_2017-10-1_19-24-40.pngupload_2017-10-1_19-26-1.png
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
659
Reaction score
373
First Language
English
Primarily Uses
RMMV
I'm not sure about the three hits, but it is by design that an empty offhand causes a barehanded attack. I suspect you might have the actor with an "attacks +1" trait on him, causing the second dagger attack, as this plugin automatically gives a second attack to anyone who is dual wielding.

There is one way you can disable this functionality on your own, using the YEP_AutoPassiveStates plugin together with the disable state plugin parameter. You can have the disable state be on all actors, but only become active if the offhand slot is empty using the following note tag:
Code:
<Custom Passive Condition>
if (!user.equips()[1]){
condition = true
} else {
condition = false
}
</Custom Passive Condition>
 

ArtemNevsky

Villager
Member
Joined
Nov 21, 2015
Messages
23
Reaction score
0
The fact is that when you have a dual possession of weapons. That is when in slot "Mine" the weapon that slot "Off" becomes equal to the Atk. It seems to him that you have two weapons, even if there is nothing left in the "Off" slot. And I would like him to leave "Off" empty (---), even if dual possession of weapons, and only weapons in the main hand.

I also think to do so that when there is no "ATK" in the weapon's meter, the slot "Off" remains empty (---). This will be useful to those who want to make a "shield" or "Magic Staff" as a weapon. In the "Off" slot.

Sorry if I ask very much, But I think it will be useful to many and diversify the system.
Thank you in advance))

Sorry for my English)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

*Violent ball of 80's TV electricity* "Oww!! Stupid @ImaginaryVillain and his plugin, he didn't say time travel hurts! And why am I naked??"
It was at 3am Pacific May 25 that Skynet was created. And it came in the form of a messenger plugin so powerful it now runs my randomizer and does it better than the randomizer itself did. What have I created? :kaoback:
Found out someone took one of my artist's commissions, edited it and claimed it as their own. Called them out on Twitter, got blocked. Not sure whether to feel irritated or honored.
Im so glad that im into 16/32bit games because i'd never be able to create any assets for something more complex :p
I was thinking of MAYBE (a big maybe) starting an soundtrack resource thread where I would post one track per week.

Forum statistics

Threads
97,750
Messages
946,689
Members
128,956
Latest member
allisnone
Top