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

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
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!
While it's definitely possible for this to be added, I think there's so little value in it that it probably isn't needed. On the other hand, you can certainly accomplish this same thing by having your certain two-handed weapons apply a passive state, and having the offhand shield items have a custom equip requirement to not have that state. This is using Yanfly's equip core and auto passive states plugins, of course. This should tide you over until such time that I decide to include this, if I do.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
@ramza I'm having a bit of a puzzling problem. Using your plugin and Yanfly's Weapon Unleash plugins, for reference.

I am using Weapon Unleash to replace my slot 0 weapon's attack to one that is tagged <mainhand skill>, because I want the normal "attack" command to be a single strike with slot 0 weapon. However, my actor is striking twice.

I don't have a Dualwield Action: x in there (if I do that, it actually attacks four times!). So I think it's something in how dual wielding itself is being handled. This isn't happening with other skills I have tagged with <mainhand skill> or <offhand skill>, though, only the one that's being triggered through the menu "Attack" command.

Any idea why this is/how I can fix it?

EDIT: I cloned the skill and triggered it from the Skills menu instead and it works as expected, so it must be something with how the engine itself is handling stuff triggered by the "Attack" command in the menu. Drat.

EDIT 2: Fixed the problem using some fancy state work :D
 
Last edited:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,564
Reaction score
379
First Language
Portuguese
Primarily Uses
RMMV
While it's definitely possible for this to be added, I think there's so little value in it that it probably isn't needed. On the other hand, you can certainly accomplish this same thing by having your certain two-handed weapons apply a passive state, and having the offhand shield items have a custom equip requirement to not have that state. This is using Yanfly's equip core and auto passive states plugins, of course. This should tide you over until such time that I decide to include this, if I do.
I see. Yeah, most people wouldn't need it...
Thanks for your time, and your plugins!
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
@ramza I'm having a bit of a puzzling problem. Using your plugin and Yanfly's Weapon Unleash plugins, for reference.

I am using Weapon Unleash to replace my slot 0 weapon's attack to one that is tagged <mainhand skill>, because I want the normal "attack" command to be a single strike with slot 0 weapon. However, my actor is striking twice.

I don't have a Dualwield Action: x in there (if I do that, it actually attacks four times!). So I think it's something in how dual wielding itself is being handled. This isn't happening with other skills I have tagged with <mainhand skill> or <offhand skill>, though, only the one that's being triggered through the menu "Attack" command.

Any idea why this is/how I can fix it?

EDIT: I cloned the skill and triggered it from the Skills menu instead and it works as expected, so it must be something with how the engine itself is handling stuff triggered by the "Attack" command in the menu. Drat.

EDIT 2: Fixed the problem using some fancy state work :D
Nice. Do me a favor and explain what you did with states to fix it, this might be a problem with my plugin that needs to be resolved. XD I suspect the way attack replace works for weapon unleash makes the engine think the skill being used is actually the attack command, and my plugin was designed such that the main and offhand skill tag was never expected to be on the attack skill, so that's probably what's happening.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,564
Reaction score
379
First Language
Portuguese
Primarily Uses
RMMV
The main reason it was happening is that his game doesn't use empty weapon slots, but weapons that say it is "empty", so as far as the plugin was concerned the actor was dual-wielding "empty"s.

So I suggested him using an auto passive state with the "not dual-wielding" state as a trait, on the actor, under the condition of activation of the actor being equipped with "empty" on both slots.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
Okay. There probably isn't anything I can do on my end to fully resolve that, as part of the reason I made this updated version of the plugin in the first place was to treat an empty hand as a full weapon entirely. The engine was kind of random in what it did if one hand was empty while the other was not.

Like for example, the engine always trying to show a weapon sprite, as long as one hand had an actual weapon in it, it would never show a barehanded weapon sprite in the other hand. Took some wrangling to get that to work properly, let me tell you. XD
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
@ramza Yep that's pretty much it!

Your plugin kicks ass, and has really done a lot to make my game work how I wanted it to. :D
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
I have updated the base plugin to v2.22.

Change log:
  • Dualwield type actors can now use a shield in their offhand weapon slot, without the menu extension.
  • Equipment optimization will no longer leave the offhand weapon slot empty if there is an equippable shield in the inventory. It will equip either a shield or an offhand weapon in available, and will prefer the item with the highest parameter increase.
 

scottso06

Warper
Member
Joined
Mar 1, 2017
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
Really looking forward to trying out this plugin, since it has such good compatibility with Yanfly's plugins. Super nice work, dude.

Would there be any way to mark a weapon to be either main hand only, or to disable dual wielding? Changing "slot type" to normal on the weapon traits or on a passive state don't seem to overwrite the ability to DW.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
Really looking forward to trying out this plugin, since it has such good compatibility with Yanfly's plugins. Super nice work, dude.

Would there be any way to mark a weapon to be either main hand only, or to disable dual wielding? Changing "slot type" to normal on the weapon traits or on a passive state don't seem to overwrite the ability to DW.
Sort of. If you use the <twohanded> tag it would prevent that item from being in the offhand, and disable dual wielding, as long as the item also put the disable state on the actor wearing it. The only weird effect of this will be that the actor would then be unable to equip a shield in his offhand unless it had the <offhand> tag on it.
I might add in a new tag later that does what you ask, but honestly, rewriting all of my auto-unequipping item nonsense isn't something I'm looking forward to having to change any time soon XD
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
@scottso06 I have updated the plugin to v2.23 which includes the following:
  • 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.
I also updated the menu extension plugin to v1.02 with the following changes:
  • (v1.02) The shop scene will now correctly only compare an item tagged <Mainhand> with the weapon currently equipped in the mainhand slot. It will also only compare an item tagged <Offhand> with the item in the offhand slot. Prior to this update, these tags had no effect on the behavior of the shop scene. (v1.01 updates 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.
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
I have updated the plugin to v2.24 with the following changes:
  • Added three new plugin parameters to adjust attack values on a weapon type basis. All three modifiers should be an integer above 0. Each modifier is applied to the actor's base attack value before the weapon attack value is added to get the final attack value.
    • Dualwield Damage Modifier is applied to both the main hand, and offhand attack values. You can use this to add a penalty or bonus to the main and off hand weapons at the same time.
    • Offhand Damage Modifier is applied only to the offhand weapon when dual wielding. Use this value to add an extra penalty to the offhand weapon swings.
    • Twohanded Damage Modifier only applies the bonus to the main hand if the actor is using a two-handed weapon. Use this to apply a bonus to actors who are using a two-handed weapon
  • Having a two-handed weapon equipped will now always prevent an offhand weapon swing from happening. In previous versions, if the offhand was empty, a second attack could happen, unless the disable state was present on the actor (or most likely, as a passive state on the weapon).
The above changes will help streamline using two-handed weapons. The modifiers are multiplicative, but only change the value of the actor's base attack parameter. In a future update, it might be possible to wield a two-handed weapon in one hand, in which case, the two-handed bonus will not apply.

Also updated the menu extension plugin to v1.03 with the following changes:
  • Requires v2.24 of the main plugin to work
  • Streamlined the display for the names of the main and offhand param slots.
    • If the player has equipped, or is looking at equipping, a two-handed weapon, the mainhand slot will always be named 'attack' (or the equivalent in your project).
    • If the player is swapping an offhand item to the opposite type of item (ie a weapon to a shield or a shield to a weapon) the offhand slot will always show the values for the item that is being swapped to. If the player swaps a weapon to a shield, the state change preview will always show block % (assuming that's turned on) going from --- to the new value. If he swaps a shield to a weapon, it will preview the resulting offhand attack value (and change the mainhand attack name to show main attack instead of just attack).
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
I have updated the base plugin to v2.25 with the following changes:
  • 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? ;))
 
Last edited:

Treydon

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

First off. THANK YOU for making this dual wield script that is so compatible with yanfly. I seem to be having a very strange problem however. For some reason if I enable this plugin it causes ALL enemy attacks/skills/actions to do zero damage? All my actors still do damage to the enemies though. I'm not sure why it's happening? Any thoughts?

Thanks.

- edit: I think I solved it. But I had to place this plugin above all other plugins. Not sure if it's going to cause more problems. Will have to test.
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
@Treydon

Sorry about that, we'll talk that up to poor quality control. XD

Updated to version 2.26 which fixes the above issue. Due to an OR condition in an if statement, enemies were being checked for a function that doesn't exist, and because this was in the damage calculation, it simply returns zero instead of actually crashing the game.
 
Last edited:

ArtemNevsky

Villager
Member
Joined
Nov 21, 2015
Messages
23
Reaction score
0
BUG!!!
(Sorry for my English)

In short the plugin does not work with Yanfly Equip Core. Or rather to the team.
<Custom Parameters>
atk = 8
</Custom-Parameters>
The problem is that if you drive in window ATK then everything is fine (Picture 1 and 2). But if you drive these data with <Custom Parameters> the values are summarized and displayed in (MAIN and OFF) wrong. (Picture 3, 4 and 5)
 

Attachments

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
Hmm, I'm not sure why that wouldn't be working. I'll have to look into how these note tags are handled when I get home in several hours.
 

ArtemNevsky

Villager
Member
Joined
Nov 21, 2015
Messages
23
Reaction score
0
Thanks for answering. Your plugin is very wonderful. I hope you cope with the problem. Good luck.

------

Just in case checked in the battle. There's also a problem.
 

Treydon

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

Sorry about that, we'll talk that up to poor quality control. XD

Updated to version 2.26 which fixes the above issue. Due to an OR condition in an if statement, enemies were being checked for a function that doesn't exist, and because this was in the damage calculation, it simply returns zero instead of actually crashing the game.
That is awesome! Thank you very much for the quick fix! It is very much appreciated.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I always see a few people asking for C# in next engine and I always thought: Do I not know enough about that language to tell it will affect extensibility and customizability to the negative? Watching a video from SumRndmDde today I feel confirmed.
If you had some musical requests in line with me.. feel free to re post! Corona has killed me and have recently got my internet back <3
I'm now working on procedural generated World Maps for my own project.
Is there anyone who's interested in having this Plugin for his own game?
I have a dream where RMer are not blinded and too dependant on published script / plugins...
RM MV ACE? 2020? Super? Legends? Sword and Shield? 2.5D? RM Pixel? RM 2: Revenge of Squared RTP tiles? Don't mind me, I'm just wondering about what will be the name of the next engine.

Forum statistics

Threads
98,213
Messages
950,394
Members
129,507
Latest member
EDaelie
Top