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

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
613
Reaction score
346
First Language
English
Primarily Uses
RMMV
Announcement:
This plugin, as well as my shield block plugin have been moved over to my itch.io page as paid plugins from this point on. Anyone who was previously using these plugins can continue to do so, but no further updates will be posted tho this thread. The most up to date version will be available on my itch.io page at all times, and I'd recommend paying for the plugin to ensure you continue to get updates and bugfixes in the future.

This thread will remain here, as a place for users to discuss the plugin, and bring up any errors or problems they find with it, but download links to the plugin and it's extension have been removed. If there is a ToS problem with this thread, I will do what I can to correct it.

Greetings and welcome to the thread announcing my new and improved Dual Wield Plugin (v2.50)!

Edit:
I have created a written tutorial for using this plugin and the menu extension. It should make it a little less daunting to try to use it. Good luck RPGMakers.

I have uploaded an extension to this plugin which affects how certain menu scenes are drawn for dual wield actors. You can get more info from this post right here. Check it out.

Also note:
This plugin should be in your load order with the rest of your battle plugins. You should be following the yanfly plugins load order. This plugin needs to load after YEP_DamageCore if you are using it. For best compatibility, you should load this plugin at the end of the battle plugins section (before the item plugins section).

The menu extension plugin needs to load after any YEP menu plugins that it modifies the scene for. For maximum compatibility, load this extension as close to the end of your plugin list as possible.

Key features:

  • Version 2.50:
    • Added a plugin parameter to disable the added barehanded offhand attack if an actor is wielding a weapon in his mainhand but nothing in his offhand.
    • Actors who are dualwield type, and have no weapons in either hand will now correctly strike twice.
  • Menu Extension updated to v1.25:
    • Requires v2.50 of the base plugin.
    • Support in menus for the blanking offhand attack values when the offhand barehanded attack is disabled via the new plugin parameter in v2.50.
    • In the YEP_StatusMenuCore attributes scene, 'blk' will now no longer show a blank box if the 'Show Block Chance plugin parameter is set to false.
    • Corrected a visual issue where a dualwield actor's offhand attack value would show '---' on the equip scene if 'Show Block Chance' was set to false.
    • Fixed a display issue on the YEP_StatusMenuCore general scene, where the mainhand and offhand attack parameter boxes did not include the text for the 'attack' parameter in the box.
    • Fixed a display issue on the YEP_StatusMenuCore parameter gauge scene where a dual wielding actor who had no weapon in his mainhand would only show the one gauge for his main hand attack value, and not both main and off attack gauges as intended.
  • Menu Extension updated to v1.23:
    • Fixed compatibility with YEP_ExtraParamFormula where the display on the status scene was showing an incorrect value for the ohcri, and ohhit values, but was otherwise functioning normally behind the scenes.
    • Fixed an additional display issue with the fix below in v1.22 where those param change values were showing weird numbers when swapping between a weapon and a shield in the offhand or a one or two handed weapon in the main hand. It will now show no change on the offhand slot unless the item being equipped is changing the param being shown there directly.
  • Menu Extension Updated to v1.22:
    • Fixed an issue where the parameter change text in YEP_EquipCore wasn't in the correct place when changing the offhand equipment, causing it to show attack changes on the mainhand weapon instead. This text only shows when the menu scene is wide enough to display it, which is not the case on the default RMMV resolution, so this bug went unseen for a long time. See screenshot below:
    • upload_2018-4-24_9-3-9.png
  • Version 2.40:
    • Revision a: Corrected an issue where a missed attack would cause all weapons to lose all traits permanently.
    • Modified the plugin parameters for damage modifiers to allow them to be javascript evaluations. This will allow you to change the bonus/penalty of two-handing, dualwielding, or using a weapon in the offhand at runtime, by using eval codes that make use of states, variables, switches, skills known, and anything else you can think up.
    • The offhand weapon's traits will no longer have an effect on the main hand weapon swings anymore, and vice versa. If one weapon has a large boost to crit or hit, or a different element than the other, the weapon being used will not be treated as if it also had that trait.
  • Menu Extension Updated to v1.21:
    • Fixed an issue in v1.20 where offhand hit and crit % would show a NaN value if the mainhand weapon slot was empty
    • Note that the documentation previously incorrectly referred to the main and offhand crit short code as mhcrit and ohcrit, when it should have been mhcri and ohcri.
    • Added compatibility with variable damage modifiers for Ramza_DualWIeld v 2.40.
    • Added ability to show split hit and crit % on the YEP_StatusMenuCore attributes scene. Use mhhit, ohhit, mhcri, ohcri on the plugin parameters in that plugin to show them.
    • Added plugin parameters to change the long names of the above exparams on that scene.
  • Menu Extension updated to v1.12:
    • (revision a) fixed a typo in the fix below that was causing the fix to not correctly apply when only the offhand was empty.
    • Fixed a crash error when viewing a one-handed weapon in the shop menu, with a dual wield type actor selected who wasn't wielding an item in either his main or offhand to compare the shop item with.
  • Version 2.30:
    • (revision a) Corrected an issue with the second fix from v2.30, as it actually caused all attacks made by allies, with the exception of the very first action sequence taken in the game, will have reversed weapon battle animations. Actors that did not have an offhand weapon, or non-dual wield type actors, would instead have no weapon battle animation.
    • Fixed an issue where custom damage formulas from YEP_DamageCore were not being handled correctly, and would sometimes result in a working formula erroring out and dealing zero damage
    • Fixed an issue where a skill that when a dual wield type actor used a skill that hit an odd number of hits, their main and off hands would have their animations, sprites, and damage values permanently reversed.
  • Menu Extension updated to v1.11:
    • See this post for screenshots of the way the new scene looks
    • This extension now fully supports the YEP_ShopMenuCore shop scene.
    • When viewing a weapon that can be wielded in either hand, and an actor who can dual wield, the param preview pane on the shop scene is split to show the param changes for both the main hand and offhand item.
    • Because the window pane doesn't have enough space for 16 params, the window has been changed to only show the four largest parameter changes per item. If there are less than four changes, the remaining spaces are filled with the normal param list, starting at Max Hp
    • The secondary param window that shows all actors simultaneously has also been changed to show the param changes of a previewed weapon that can be equipped in either hand for both held items of a dual wield actor.
    • All other weapons (two handed, main handed, off hand, shield) will only compare with the respective held item, leaving the shop scene looking normal.
    • All other armors have the normal shop scene.
    • Added a plugin parameter to show or hide the 'Possession: x' text at the bottom of the split param pane. I personally don't like where I had to put it, but there was no more room in that window, so I left the ability to turn it off.
    • v1.11 Fixed a display issue with actors who do not have an actual shield or second weapon slot having their next available equipslot renamed to suggest it is their offhand slot.
    • v1.11 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 '-'.
  • v2.29:
    • Weapon damage modifiers added in v2.24 now also apply to parameters added by event command to the actors. Originally, the bonus modifiers only applied to the base parameters on the actor (give by their class).
  • Menu Extension updated to v1.04:
    • The version check on launch will now detect and error out when it finds a version of the base dual wield plugin older than v2.20. Originally the plugin extension would run, but cause errors at runtime, now it properly throws an error message at startup.
    • Fixed a bug on the YEP_EquipCore equip scene where swapping a two-handed weapon for a one-handed weapon would preview an offhand attack value, even if the actor wasn't capable of dual wielding.
  • v2.28:
    • Shop menu scenes will no longer incorrectly show that a non-dual wield actor can equip a weapon tagged with <offhand>, even if that actor could normally equip weapons of this wtypeId.
    • Fixed an action sequence related issue where if checks to target.result() would always return false, such as target.result().isHit()
  • v2.27 bugfix:
    • Attack parameters added to weapons via note tag in YEP_EquipCore are now correctly supported.
    • (revision a) Corrected an issue where this version caused a crash if YEP_EquipCore was not being used.
  • v2.26 bugfix:
    • Enemies will now do more than zero damage, as an error in the damage calculation formula was corrected.
  • Added in v2.25
    • Fixed a bug where the correct attack value was being shown on the menus (with the menu plugin extension), but the actual values used during attack skills would not properly make use of the modifiers for dual wielding, offhanding or using a two-handed weapon unless the skill being used was a normal attack, a dual wield skill, or a main or offhand only skill.
    • If you are using the YEP_BaseParamControl plugin, this dual wield plugin will need to be loaded after it. This plugin should always be loaded in your battle plugins for maximum compatibility, and the base param control plugin should always be loaded near the top of the list, so this shouldn't be an issue if you follow yanfly's suggested load order.
    • All non-dual wield (or mainhand/offhand tagged) skills will now only benefit from the attack value of the weapon in the actor's main hand. Previously, these skills would deal damage based on the attack values of both weapons and the actor's base attack value (with no dual wield/offhand/two-handed modifiers)
    • Removed confusing help text that implied that Monkeygripping was a thing (maybe next update? ;))
  • Added in v2.24
    • New plugin parameters to adjust attack values on certain kinds of weapons. All of these modifiers are applied to the actor's base attack value before attack values on weapons are taken into account.
      • Can set a modifier for a two-handed weapon
      • Can set a modifier for dual wielding (which is applied to both the main and off hands)
      • Can set a modifier for using a weapon in the offhand
    • The above values should be an integer above 0
    • Ex: if your actor has 100 attack when unarmed, and the default values of 1.5, 1.0 and 0.75, the following will happen:
      • Using a two handed weapon with attack value of 10 will give a real attack value of 160 total
      • If dual wielding two weapons with 10 attack each, the main hand will have 110 attack, while the offhand will have 85.
    • A weapon tagged with <twohanded> will now always prevent an offhand barehanded attack if the offhand is empty, previously, the two-handed weapon needed to also have the disable state on it for this to be true.
  • Menu Extension updated to v1.03:
    • Added support for v2.24 of the main plugin
    • Streamlined the equip scene to more consistently show the names for the mainhand and offhand slots when various different types of equipment are being exchanged, on default menu scenes and YEP menu scenes.
  • Added in v2.23
    • Updated help documentation to more easily list all note tags and their effects
    • Added a <Mainhand> note tag for weapons, which will prevent them from being equipped in the offhand.
      Made the <Offhand> note tag also support weapons. This makes a weapon tagged with this unable to be equipped in the mainhand. Note that equipping a two-handed weapon will still unequip a weapon in the offhand, and prevent one from being equipped.
    • Fixed a bug which prevented the player from manually equipping a shield into the offhand slot of a dualwield actor. Equipment optimization was previously the only way to get a shield into that slot.
  • Menu Extension updated to v1.02:
    • (new in v1.02) Default shop scene will now only compare the item in the correct hand when looking at an item tagged <Mainhand> or <Offhand>. This means that for a mainhand weapon, the stat compare will only show the mainhand weapon on the actor, even if the offhand weapon is worse, and vice versa. (v1.01 changes below)
    • Code optimization
    • The default shop scene will now use the offhand weapon as a comparison item if the player is viewing a shield
    • The shop scene will also only compare the mainhand weapon against a two-handed weapon, even if the offhand weapon is worse
    • YEP_ShopMenuCore shop scene now recognizes that an offhand weapon will be unequipped for a shield and will show the correct stat changes as a result.
    • Added compatibility for the <Mainhand> and <Offhand> weapon note tags added in v2.23 of the main plugin.
  • Added in v 2.22
    • Shields can now be equipped in the offhand weapon slot of a dual wielding actor
    • Equipment optimization will now no longer leave the offhand weapon slot of a dual wield actor blank if there is an equippable shield in the inventory. Optimization will equip a shield or a weapon in the offhand, preferring whichever provides the highest parameter buff.
  • Added in v2.21
    • Equipment optimization will now correctly place an offhand type shield into the offhand of a non-dual wielding actor who is using a two-handed weapon in their main hand. Previously, equipment optimization could determine that a non-offhand shield was better than an available offhand one, attempt to equip it with the two handed weapon, fail and end up with no item in the offhand.
  • Added in v2.20
    • Two new notetags. <twohanded> makes the given weapon force unequip the item in the offhand slot, such weapons cannot be equipped in the offhand slot of a dual wield actor. <offhand> makes a shield equippable in the offhand even when a twohanded weapon is equipped (think like a buckler shield)
  • Added in v2.12
    • Notetags for <mainhand skill> and <offhand skill> have been added. If a skill has either of these tags, it will only strike with the designated weapon, showing the correct animation and weapon sprite, as well as dealing damage that ignores the opposite weapon's atk parameters. Note that if both of these tags are put on the same skill, it won't work. This isn't a bug, just don't do that.
    • Skills with one of the above tags will strike with the given weapon each time the skill hits, so if the skill hits three times, all three hits will be with the offhand weapon if an <offhand skill> tag is present.
  • v2.12a:
    • Fixed a bug where following a multi-hit offhand or mainhand skill, all dual wield attacks were reversed (mainhand was hitting as offhand, vice versa).
  • v2.12b:
    • Made a slight compatibility change in the background for action sequences that use the <mainhand skill> or <offhand skill> tags.
  • Added in v2.11
    • Added a plugin parameter to disable the added attack #, and damage splitting to the attack skill and skills tagged with the <dualwield skill>note tag, if a certain state is present on the actor. This allows you to more easily have dual wield actors able to use twohanded weapons, or sword and shield style, without disabling their dualwield type.
  • New in version 2.1:
    • Added notetag support to skills. <dualwield skill> denotes a skill as being a dualwield skill, which will split damage as normal attacks do.
    • Added an action sequence command to facilitate the above change: DUALWIELD ACTION: X - repeats the X action sequence commands that follow this command with the offhand weapon. (this is required for damage splitting dual wield skills)
    • Added two separate functions to track second weapon swings which can be eval'd into action sequences:
      • user.isSecondAttack() returns true if the user is making his second weapon swing during a regular attack
      • user.isSecondSkillHit() returns true if the user is making his offhand attack during a dual wielding skill (that is not attack).
(previous version info below)
  • Plug and play, no setup required
  • Actors that are dual wielding will deal two individual hits instead of one hit with two animations
  • The two individual hits show the weapon sprite of each weapon equipped, and the proper animation
  • The two individual hits deal damage without taking into account the attack power of the opposite weapon.
Coming up:
  • Showing individual attack values per hand on the status menu (added in extension)
  • Possibility to make it affect more skills. (added in v2.1)
This plugin only affects the default attack skill for now. In a future update, skills tagged with a notetag may also be affected. This has been completed as of version 2.1. YEP_BattleEngineCore is a required dependency. for now. If you disable it, the mechanics of the plugin still work, but the visuals are a little screwy. (this is a 100% required dependency now).

What does this have over the old plugin?
  • The original dual wield plugin was unwieldy (see what I did there?). It required many dependency plugins, and took hours to set up correctly in a project. This one is plug and play.
  • The original plugin had major issues with missed attacks, and required a number of function calls during action sequences to prevent data from being lost. This one doesn't.
  • This plugin doesn't even require action sequences (although you should still use them because they're cool).
  • The original plugin had issues with barehanded attacks. This plugin can properly show a barehanded main or offhand attack, while the other hand still has a weapon equipped.
Why remake this plugin now?
This was my first plugin, and man, it was a bit out of my league at the time. While the concept was sound, the implementation was terrible. TBH I was embarrassed how bad the original was, and sorta hoped it would go away, but I kept meeting people who were still using it, and couldn't figure out why. In the original thread for the first plugin, I discovered Victor Sants VE - Dual Wield plugin, which was everything my plugin was supposed to be, and more, and happily redirected folks to use his plugin instead. Then a few months after that, he pushed an update that broke compatibility with the YEP action sequences plugin, which apparently caused a lot of people to come back to my plugin, I guess.

Anyways, since it was so bad, and I'm a little bit better now, I figured I'd help those people out, and fix this thing up so that it isn't such a pain in the butt to set up. I think I succeeded.

Edit: v2.1 is up. Added support for dual wielding skills with the note tag <Dualwield Skill>. The setup for this is slightly more complex than the regular attacks.

A skill with the <Dualwield SKill> tag by itself will not work correctly without modifying your action sequence. I have added a new action sequence action via this plugin to allow dual wielding skills to split damage and show different weapon animations as the normal attack skill does.

You need to add the action sequence action 'dualwield action: x' to your action sequence before your 'motion attack' command. What this does, is repeats the next x actions from your action sequence after the first time, after switching weaponsprites and changing damage values.

Example:
Code:
<dualwield skill>
<target action>
dualwield action: 6
motion attack: user
wait: 12
attack animation: target
wait: 4
action effect: target
wait for animation
</target action>
Will cause all six actions following the command to repeat with the offhand weapon, making the skill hit once with each weapon (and changing damage values as well). Without this tag, the skill will only hit once, but will ignore the damage of the offhand weapon as if he were only wielding his mainhand weapon.

Edit2: let's talk about how this effect looks!
Here's before this plugin:


And here's after:
 

Attachments

Last edited:

OmniStorm

Villager
Member
Joined
Mar 14, 2013
Messages
22
Reaction score
11
First Language
English
Primarily Uses
WOW! Thank you for this! I spent an entire day two days ago trying to make your old plugin or Victor's plug-in work. I finally gave up after being unsuccessful. I just finished testing this. It's amazing!!!

THANK YOU!!
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
613
Reaction score
346
First Language
English
Primarily Uses
RMMV
I absolutely wasn't sure that this would be able to happen so quickly, but version 2.1 is now live. I added the following functionality:

  • Now has note tag support using the <dualwield skill> note tag to allow more than just normal attacks to be dual wield enabled.
  • Added two new functions to track when a battler is making his second weapon attack. user.isSecondAttack() tracks it for normal attacks, and user.isSecondSkillHit() tracks it for dual wielding skills. These functions can be eval'd into action sequences to cause varying effects based on which attack swing the current action is, like for example, dual wielding a ranged and melee weapon could move the battler in or out before an attack.
  • Added an important change to the action sequence command list, 'dualwield action: x' is used in tandem with the skill note tag above to cause skills to repeat certain parts of their action sequence a second time - with the offhand weapon. I felt this was a better idea than just fully repeating the entire target action sequence. Now you can specify what to repeat and what not to.
New version is available in the OP, attached to this post, or here.
 
Last edited:

Ashfell

Veteran
Veteran
Joined
May 31, 2017
Messages
82
Reaction score
28
First Language
english
Primarily Uses
RMMV
i think im missing somthing i installed it and i have the yanfly plugins but it never shows the second weapons animation but does the damage am i missing somthing?

Never mind i fixed it only problem is somtimes when ate attack animation happens the character turns around and attacks in the opposite direction i will figure it out but thanks for the plugin its awesome
 
Last edited:

Ashfell

Veteran
Veteran
Joined
May 31, 2017
Messages
82
Reaction score
28
First Language
english
Primarily Uses
RMMV
Ok i guess i cant figure it out with ranged attacks it works fine. But when my actor attacks with a physical attack his first hit will face the enemy the second attack he for some reason flips around and faces the party then swings. here is my code been at it all day and cant figure it out.

<setup action>
display action
immortal: targets, true
</setup action>
<dualwield skill>
<target action>
if user.attackMotion() !== 'missile'
move user: targets, front, 20
else
perform start
end
zoom: 120%, 20
camera screen: target, front center, 20
camera focus: target, front center, 20
wait for movement
dualwield action:1
motion attack: user
wait: 12
attack animation: target
wait: 4
action effect: target
wait for animation
</target action>
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
613
Reaction score
346
First Language
English
Primarily Uses
RMMV
I think the problem is that once the enemy is hit once, it flinches, which moves it back slightly, which causes the position for 'target, front' to be slightly different. If you add a 'face user, target' immediately after the move, it should clear that up. The way the battle system checks facing direction is weird when the movement is only a few pixels, I found this to be an issue with any action that quickly moved to the same target in between hits, not just the dual wield plugin.
 

Ashfell

Veteran
Veteran
Joined
May 31, 2017
Messages
82
Reaction score
28
First Language
english
Primarily Uses
RMMV
I think the problem is that once the enemy is hit once, it flinches, which moves it back slightly, which causes the position for 'target, front' to be slightly different. If you add a 'face user, target' immediately after the move, it should clear that up. The way the battle system checks facing direction is weird when the movement is only a few pixels, I found this to be an issue with any action that quickly moved to the same target in between hits, not just the dual wield plugin.
thank you!! been at this most of the day. that was all i was missing:biggrin:
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,453
Reaction score
336
First Language
Portuguese
Primarily Uses
RMMV
Hey there, I'm having a problem...
The problem is, if I use your plugin and set the dual-wield trait, the actor ends up attacking four times instead of twice, once with each weapon... even when without weapons...
If I don't set the dual-wield trait, he once attacks as if only had one weapon.
That includes if I set a weapon that seals the other slot...

My code:
<dualwield skill>

<setup action>
clear battle log
display action
immortal: targets, true
</setup action>

<whole action>
if user.attackMotion() !== 'missile'
move user: targets, front, 20
else
perform start
end
motion standby: user
wait for movement
</whole action>

<target action>
dualwield action: 6
face user: target
motion attack: user
wait: 10
attack animation: target
wait for animation
action effect
</target action>

<finish action>
FACE user: HOME
perform finish
IMMORTAL: target, false
wait for new line
clear battle log
</finish action>
What could I be doing wrong?
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
613
Reaction score
346
First Language
English
Primarily Uses
RMMV
Hey there, I'm having a problem...
The problem is, if I use your plugin and set the dual-wield trait, the actor ends up attacking four times instead of twice, once with each weapon... even when without weapons...
If I don't set the dual-wield trait, he once attacks as if only had one weapon.
That includes if I set a weapon that seals the other slot...

My code:


What could I be doing wrong?
Is this your regular attack skill? The plugin is set up that it will make the attack action hit twice automatically, so the <dualwield skill> tag, and the dualwield action: x aren't needed in a normal attack sequence. That'd also make it so that you'd be attacking twice as much, since the attack skill is already set to do it's action twice, and you're also adding a repeat, so it'd do it once, then again from the dualwield action: x, then repeat the entire target sequence again, making the actor hit four times.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,453
Reaction score
336
First Language
Portuguese
Primarily Uses
RMMV
It is. Thank you, that removed the second repeat.

Now, the only think I need is to find out how to make it not attack twice when the actor is using a two-handed weapon...
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
613
Reaction score
346
First Language
English
Primarily Uses
RMMV
Because of the way the plugin works, if your actor is dual wield type, he will always hit twice. You'll have to find a way to make him not dual wield type if he has a two handed weapon equipped. The on equip eval plugin by Waynee95 might be a good way to do this, by running an eval when you equip a twohanded weapon that disables your dual wield on that actor.

edit: Actually I can add a plugin parameter to disable the added attack stuff if a state is present, that should make this problem a little bit easier to deal with.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
613
Reaction score
346
First Language
English
Primarily Uses
RMMV
@Waterguy Just uploaded v2.11 which addresses this problem.

Added a new plugin parameter that allows the developer to set a state as the 'disable state'. If this state is present on the actor, his attack damage will not be split, and he will only attack once. This allows actors who are dual wield type to use non-dual wield weapon setups (sword and shield, two handed weapons, etc.). This will work best if you use the YEP_AutoPassiveStates plugin to make your two handed weapons (and/or shields) put the disable state on the wearer state automatically. Leave this plugin parameter at the default value of 0 to not have this effect active at all.
 
Last edited:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,453
Reaction score
336
First Language
Portuguese
Primarily Uses
RMMV
Wow, that was fast! O_O
Thank you!
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
282
First Language
English, German
Primarily Uses
N/A
Can this be used to create skills that are main hand only/off hand only? For example if I have an actor who's dual-wielding a sword and a gun, and I want a skill to only attack with the gun?
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
613
Reaction score
346
First Language
English
Primarily Uses
RMMV
Good news! I have updated the plugin to v2.12, which adds support for the above request.
  • Added two new skill notetags
    • <MAINHAND SKILL> makes the skill only swing with the mainhand weapon. If your skill hits more than once, it will show the correct sprite, and deal the correct damage of the mainhand weapon for all of the hits.
    • <OFFHAND SKILL> makes the skill only swing using the offhand weapon sprite/motion, and deal damage as the offhand weapon only. Skills that hit multiple times will all strike with the offhand weapon.
Edit:
Updated to v2.12a, which corrected an issue where mainhand and offhand skills that hit multiple times caused all following dual wield actions to have reversed weapons, meaning all mainhand attacks were offhand attacks, and vice versa.
 
Last edited:

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
282
First Language
English, German
Primarily Uses
N/A
I'm going to stick a quick guide in here, Ramza, if you don't mind! I have accomplished what @Waterguy wanted, basically I have a functioning system that will allow dual wielding actors to use 2H weapons without actually needing to toggle the "dual wield" ability! All thanks to waynee95, who helped me get this working, and built a custom plugin for me!

How to enable Dual Wield actors to use 2h weapons without disabling dual wield:

FOR THIS, you will need: Waynee's CustomOnEquipEval, RestictEquipSlots, and SealEquipSlots add-ons installed. If course, if you want your dual wielding skills to work properly, you'll ALSO need Ramza's plugin, but I'm assuming if you're here you're already looking at that.

My requirements were:
- Have dual wield actors able to equip 2H weapons
- Never have a functionally empty hand (this is due to how my skills' custom show evals work, an empty hand crashes the game)
- Prevent actors from changing the off hand slot while a 2H weapon is equipped
- Prevent actors being able to equip 2h weapons in the offhand slot

Create a weapon named <Empty> and a weapon type named <Empty> as well. Enable your actors to equip <Empty>-type weapons, obviously also make the <Empty> weapon the <Empty> type. For me, the <empty> weapon is ID 99.

Then, my notetags in my 2h sword are:
<Restrict Slot: 0>
<Custom On Equip Eval>
user.forceChangeEquip(1, $dataWeapons[99]);
user.sealEquipSlot(1);
user.refresh();
</Custom On Equip Eval>
<Custom Remove Equip Eval> user.unsealEquipSlot(1);
user.refresh();
</Custom Remove Equip Eval>


(in Yanfly's Equip Core, I also have it set so that you can't remove weapons from slots 0 and 1, only exchange, but that's particular to my project)

What this is doing is, when the 2H weapon is applied, it is forcing the <Empty> item into the off hand slot and sealing that slot. When you swap the 2H weapon for a 1H weapon, it unseals the offhand slot. Throughout all this, the <Empty> item is never actually added to your inventory, either - when you change the <Empty> weapon for one of your 1h items, it's gone. Poof.

Now - remember to tag your 2H weapons' skills as <mainhand skill>! :D
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
613
Reaction score
346
First Language
English
Primarily Uses
RMMV
That's great @Dirge glad to see it's working out for you. :)

I have updated this plugin to version 2.20, which makes the following changes:
  • Two new notetags.
    • <twohanded> makes the given weapon force unequip the item in the offhand slot, such weapons cannot be equipped in the offhand slot of a dual wield actor. Please note that if your two-handed weapon isn't making use of the disable state, your actor will still punch with his offhand after swinging with his two-handed weapon.
    • <offhand> makes a shield equipped by a non-dualwielding actor when a two-handed weapon is equipped.
Also added a slight compatibility fix with skills that were using the <mainhand skill> or <offhand skill> tags, where it wouldn't strike correctly if the 'motion attack'part of an action sequence was not in the target action section.
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
613
Reaction score
346
First Language
English
Primarily Uses
RMMV
Alright, bear with me, as this is going to be a large post, but I feel it wasn't worthy of a new topic by itself. Plus, that might make it harder to find later.

Over the last few days, I've been slaving over a hot notepad++ to bring to you, the next evolution of the dual wield plugin, in the form of the greatest plugin extension evar!!1*

*The only plugin extension it currently has!

I present to you all, the Ramza Dual Wield Menu Extension plugin!

(pause for dramatic effect)

What does it do? Glad you asked.

v1.25 update:
  • Requires v2.50 of the base plugin.
  • Support in menus for the blanking offhand attack values when the offhand barehanded attack is disabled via the new plugin parameter in v2.50.
  • In the YEP_StatusMenuCore attributes scene, 'blk' will now no longer show a blank box if the 'Show Block Chance plugin parameter is set to false.
  • Corrected a visual issue where a dualwield actor's offhand attack value would show '---' on the equip scene if 'Show Block Chance' was set to false.
  • Fixed a display issue on the YEP_StatusMenuCore general scene, where the mainhand and offhand attack parameter boxes did not include the text for the 'attack' parameter in the box.
  • Fixed a display issue on the YEP_StatusMenuCore parameter gauge scene where a dual wielding actor who had no weapon in his mainhand would only show the one gauge for his main hand attack value, and not both main and off attack gauges as intended.
v1.23 update:
  • Fixed compatibility with YEP_ExtraParamFormula where the display on the status scene was showing an incorrect value for the ohcri, and ohhit values, but was otherwise functioning normally behind the scenes.
  • Fixed an additional display issue with the fix below in v1.22 where those param change values were showing weird numbers when swapping between a weapon and a shield in the offhand or a one or two handed weapon in the main hand. It will now show no change on the offhand slot unless the item being equipped is changing the param being shown there directly.


v1.22 update:
  • Corrected a problem with YEP_EquipCore where the extra parameter change text on the stat compare window was incorrectly showing off-hand weapon attack changes on the mainhand weapon section of the stat compare window. This extra text only shows up when there is enough space in the window for it to be shown, and there isn't enough space in that window on the default RMMV resolution. (see screenshot)
  • upload_2018-4-24_8-59-41.png

v1.21 update:
  • Corrected an issue in v1.20 where the offhand crit and hit values would display as NaN if the mainhand weapon slot is empty.
  • Corrected documentation to reference the correct shortcodes for the main hand and offhand crit exparams (previously mhcrit and ohcrit, corrected to mhcri and ohcri
v1.20 update:
  • This plugin now requires v2.40 of the main dual wield plugin to function
  • Added extra plugin parameters to show split hit % and crit % values on the attributes scene in YEP_StatusMenuCore. Use mhhit, ohhit, mhcri, or ohcri in the plugin parameters of that plugin to show them on the scene.
  • Added plugin parameters to set the long names of the above exparams in that scene.
v1.12 bugfix:
  • (revision a) Fixed an issue with the below fix where a typo was causing it to not apply correctly when the offhand weapon slot was empty, causing the crash to still happen.
  • Fixed an issue where viewing a one-handed weapon on the shop scene, while having a dual wield actor with nothing in his main or off hand weapon slot selected, would cause the game to crash due to trying to compare the viewed item with the parameters of an undefined item (or null in the offhand).
v1.11 bugfixes:
  • Actors who do not have an offhand slot type (they have no second weapon slot, and no shield slot), as set using YEP_EquipCore will no longer have their second equipment slot renamed to indicate it is an offhand slot. If your actor has slot types <1, 3, 4, 5> his hat slot will no longer be named 'Off' (by default).
  • 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 '-'.
v1.10 Update:
  • This extension now fully supports the YEP_ShopMenuCore shop scene. See this post for screenshots of the effect.
  • When viewing a weapon that can be wielded in either hand, and an actor who can dual wield, the param preview pane on the shop scene is split to show the param changes for both the main hand and offhand item.
  • Because the window pane doesn't have enough space for 16 params, the window has been changed to only show the four largest parameter changes per item. If there are less than four changes, the remaining spaces are filled with the normal param list, starting at Max Hp
  • The secondary param window that shows all actors simultaneously has also been changed to show the param changes of a previewed weapon that can be equipped in either hand for both held items of a dual wield actor.
  • All other weapons (two handed, main handed, off hand, shield) will only compare with the respective held item, leaving the shop scene looking normal.
  • All other armors have the normal shop scene.
  • Added a plugin parameter to show or hide the 'Possession: x' text at the bottom of the split param pane. I personally don't like where I had to put it, but there was no more room in that window, so I left the ability to turn it off.
v1.04 Update:
  • Extension will now detect versions of the base plugin below v2.20 and throw an error message stating the minimum version of the base plugin. Previously, versions older than 2.20 were not being detected, so the error would not be seen, so the game would launch, but the plugin would crash the engine when used with an incorrect base plugin version.
  • Fixed an issue where YEP_EquipCore equip scene was incorrectly showing an offhand attack value on the stat change preview window when a non-dual wield actor swapped a two-handed weapon for a one-handed one.
v1.03 Update:
  • Requires v2.24 of the main plugin.
  • Streamlined the menu scenes to more consistently show the correct name for main hand attack parameter. Whenever a two-handed weapon is equipped, or is being previewed, it will always show 'Attack' (or whatever your project's name for that param is). Likewise, it will always show 'main attack', or the equivalent when the actor is or will be using a weapon in his offhand.
  • Streamlined the menu scenes to show the correct name for the offhand param slot.
    • When the player is looking at swapping the item in the offhand to something else, the scene will now always show the new stat, rather than the old one. Example: the player swaps a shield out for an offhand weapon. On the stat change section of the screen, the offhand slot will change from showing current block % to showing the new offhand attack value. If the actor isn't dual wield type, unequipping the shield for a barehand will correctly show that the block % will no longer apply (---). If a dualwield actor swaps his offhand weapon for a shield, the opposite will happen.
v1.02 Update:
  • The shop scene will only compare the item in the mainhand slot with a potential item tagged <mainhand>. It will also only compare the item in the offhand slot when the potential item is tagged <Offhand>. In the previous version, these note tags had no effect on the shop scene.
v1.01 Update:
  • Code optimization
  • The default shop scene will now use the offhand weapon as a comparison item if the player is viewing a shield
  • The shop scene will also only compare the mainhand weapon against a two-handed weapon, even if the offhand weapon is worse
  • YEP_ShopMenuCore shop scene now recognizes that an offhand weapon will be unequipped for a shield and will show the correct stat changes as a result.
  • Added compatibility for the <Mainhand> and <Offhand> weapon note tags added in v2.24 of the main plugin.
Overview:
  • Modifies the default equip and status scenes to change the way dual wield actors look.
    • The dual weapon slots now have a configurable name.
    • Menus that show actor parameters have been changed slightly to fit the main and offhand attack values where appropriate.
  • Dual Wielding actors can now equip shields or weapons in their off hand.
  • If you have my Block Chance plugin installed, the offhand slot will show block chance if you have a shield equipped.
How to use it:
  • Import this plugin into your plugin manager below the dual wield plugin. For best compatibility, load it as close to last on the list as you can without causing problems. This plugin modifies some yanfly menu plugins that it loads after.
  • Set the plugin parameters to your liking.
  • Make sure you have my block plugin if you have the 'Show Block Chance' parameter turned on

How about some screenshots?
(since I have so many screenshots, I'll link this imgur album)

Equip Scene Before:
before equip.PNG
Equip Scene After with dual wield:
after equip with split.PNG
shield block:
after equip show block.PNG
Old status scene:
before status.PNG
New Status scene:
after status with split.PNG
and with block showing:
after status show block.PNG
But that's not all, no sir. As I briefly touched upon up there a bit, this plugin makes some slight changes to yanfly's menu plugins as well, it is specifically compatible with YEP_StatusMenuCore, YEP_ClassChangeCore, YEP_EquipCore, and YEP_PartySystem, but it might be compatible with others too! The worst case scenario is that the incompatible plugins show no change. Note: load this extension AFTER any menu yanfly plugins.

I visually tried to change the yanfly menu plugins as little as possible:
(note had to switch to imgur reached upload limit on the forum somehow)
Equip Core:

This addon also removes the need for that dirty StatusMenuCore edit I made for the shield block plugin. If you have both this and shield block, you can now simply put the short code for block chance (blk) into one of the columns in the StatusMenuCore's plugin parameters. This plugin has a parameter to set the long name for block chance on that scene, as well.
 
Last edited:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,453
Reaction score
336
First Language
Portuguese
Primarily Uses
RMMV
Sorry if I sound too needy, but could you put a way that some two-handed weapons don't let you use even an offhand shield? I was thinking about two-handed swords and crossbows being able to, but not normal bows, for example.

Either way, this plugin is going great!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Is it okay to hug a tree? :/
The new intro Logo for my videos.

I speed it up, the one I use to use was to long.
The workweek is now over. Now I can work on my GamZzzzzZzzzzZzzzZzzZz....
Just watched Onward with the family. One of the best movies I've ever seen. <3

Forum statistics

Threads
95,826
Messages
932,217
Members
126,259
Latest member
Illuminachos
Top