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

Ameer

Veteran
Veteran
Joined
Oct 13, 2018
Messages
85
Reaction score
13
First Language
English
Primarily Uses
RMMV
Err. I had a sort of test demo I was using to test the plugin as I was adding things to it. But I accidentally deleted it before the last update, and I had no backup copy of it. I can probably reverse engineer something usable from one of my other demo projects, but it's not likely to touch on all of the functions of this plugin.

Maybe at some point I'll make a big demo to show off this in conjunction with block chance. I can't guarantee a time frame for that though.
Can you give some sort of text tutorial
 

Dcraft

Veteran
Veteran
Joined
Sep 21, 2015
Messages
36
Reaction score
0
First Language
Spanish
Primarily Uses
Everything was fine with the previous version but with version 2.5 dual wield actors attack 2 times with the main hand weapon and the other turns they only attack with they main hand 1 time, this happens when the barehanded attack = false. Also the normal dual wield attack with barehanded = true hits 2 times with the combine stats of both weapons, it is intended? is there any way to make the attack from each weapon hits individuably?

Edit: It was a problem with yanfly damage core, it works normally when I put if off
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
Everything was fine with the previous version but with version 2.5 dual wield actors attack 2 times with the main hand weapon and the other turns they only attack with they main hand 1 time, this happens when the barehanded attack = false. Also the normal dual wield attack with barehanded = true hits 2 times with the combine stats of both weapons, it is intended? is there any way to make the attack from each weapon hits individuably?

Edit: It was a problem with yanfly damage core, it works normally when I put if off
My plugin overwrites a function from the damagecore plugin, and needs to be loaded after it in your load order for it to be compatible. There's a possibility that an update to the damagecore plugin might have made this incompatible again, but as you're the only one who's reported this problem, I'm not sure that's the case.
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
520
Reaction score
137
First Language
English
Love this plugin and have been slowly updating my project's compatibility with it since purchasing this and Ramza's Block plugin.

Have two questions if anyone can help resolve:

(1) Auto Battle \ Special Flag - I have been using this in my berserk state. Sadly, it removes +X Attack Traits and stops this plugin from Dual wielding. Does anyone know of a workaround?

(2) I moved all of my shields into my Weapons tab, so that I can make certain skills reliant on "Shield" being equipped. It appears that the Block chance works fine. However, the Actor does swing with the shield. I was hoping that someone has a more elegant suggestion for implementing this.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
Heya.
For step 1, I was unaware that the auto-battle flag seems to remove attack+ traits. However, the only time attack+ shoudl be used with my plugin is during normal attacks, so if your auto-battler is only normal attacking 1-ish time, you might better off setting the berserk state to 'only attack' instead of auto-battling. To fix auto-battling, you'd need to see where the auto-battling effect is disabling attack+ and write it out via a plugin or something. That might not be too difficult if you know where to look, though.

For your second thing, I wouldn't recommend making shields weapons. For starters, that'd allow someone to put the shield in their main hand, which would cause blocking to not work at all. Secondly, the dual wield plugin is going to consider you dual wield type all the time, because you'll have a weapon in the offhand.

Instead, you should use YEP_SkillCore to require a shield be equipped on the offhand. The easiest way is to have the skill require the block state (which should be passive on your shield).
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
520
Reaction score
137
First Language
English
Finally formatted all of my Skills to conform with this plugin.

It eliminated so much of the clunkiness. My combat system feels so streamlined now.

Thank you again, Ramza. You really killed it with this and the Block Plugin.


If anyone encounters the issues I faced a couple posts up, here is a quick resolution:

Skillcore worked beautifully for shield restrictions. Here is the code, if anyone needs it in the future(just replace 12 with the State you assign as the Block state within Ramza's block plugin:


<Custom Requirement>

if (user.isStateAffected(12)) {

value = true;

} else {

value = false;

}

</Custom Requirement>

Using the "Attack an Enemy" Restriction under the state submenu, I was able to create a Berserk State without Using AutoBattle Special Flag.

However, dualwielding would not trigger. I resolved this with YEP's Weapon Unleash, replacing Berserker's default attack with a special attack that has "dualwield action: x" within the Action Sequence.
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
520
Reaction score
137
First Language
English
Noticed that my equipment that gives + Attack adds to both main&off hand.

I think this works mathematically for my project due to my dam formula, but in case it proves to not:

Is there a note tag I can put into an item/equip that will affect solely main or solely off?
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
Noticed that my equipment that gives + Attack adds to both main&off hand.

I think this works mathematically for my project due to my dam formula, but in case it proves to not:

Is there a note tag I can put into an item/equip that will affect solely main or solely off?
I personally feel like non-weapons that increase atk should universally increase the main and off hand attack values, as they're buffing the actor, not his weapons.
The latest version of the plugin also has the ability to add to or subtract from the effective attack value of a weapon based on whether or not it's being wielded in the off hand or main hand, which I feel covers the other end of the spectrum.

I don't currently have a way to add to or subtract from the mainhand or offhand atk values directly via note tag right now. Perhaps I can add that in a future update.
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
520
Reaction score
137
First Language
English
Created a skill with this damage equation:

((a.atk * 2 - b.def) * (1 - a.hp/a.mhp)) + a.atk * 2 - b.def

It functions properly with two-handed weapons, and one-handed weapons when no 2nd weapon was equipped.

However, when a weapon is equipped in both hands, the damage per weapon is about 75 % higher than the equation's projected damage.

I suspect there is something in the Dual Wield code that is affecting this.

Anyone have any suggestions?
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
Created a skill with this damage equation:

((a.atk * 2 - b.def) * (1 - a.hp/a.mhp)) + a.atk * 2 - b.def

It functions properly with two-handed weapons, and one-handed weapons when no 2nd weapon was equipped.

However, when a weapon is equipped in both hands, the damage per weapon is about 75 % higher than the equation's projected damage.

I suspect there is something in the Dual Wield code that is affecting this.

Anyone have any suggestions?
I suspect this isn't your default attack skill, so the damage calculation is actually using the combined attack values for both of your weapons.
Tag the skill with <Dualwield Skill> and it will properly split damage. If it only hits once, it will only use the parameters of your main hand weapon, if it hits multiple times, it will alternate.
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
520
Reaction score
137
First Language
English
Sorry, should have mentioned:

I have tested the formula to determine if it is the culprit and at this juncture I believe is it.

I placed it into my base attack and my base attack is reacting the same way as the skill I mentioned above.

Additionally, I placed my base attack formula [a.atk * 2 - b.def] into the skill and it triggers all dual wield function as expected.

The Skill and Equation function as expected when the plugin is disabled.

PS: <Dualwield Skill> is included in the skill's notes
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
Sorry, should have mentioned:

I have tested the formula to determine if it is the culprit and at this juncture I believe is it.

I placed it into my base attack and my base attack is reacting the same way as the skill I mentioned above.

Additionally, I placed my base attack formula [a.atk * 2 - b.def] into the skill and it triggers all dual wield function as expected.

The Skill and Equation function as expected when the plugin is disabled.

PS: <Dualwield Skill> is included in the skill's notes
Hmm, sounds like maybe the function that replaces 'a.atk' with the correct hand calculation only does it for the first occurrence. I'll take a look and see if I can confirm that, and correct it if so.

Edit:
That is what was happening. The function I was using to replace a.atk in damage formulas was only replacing the first instance of it, not all instances of it. For two-handing, and one -handing weapons, this didn't cause an issue because the a.atk value only has one weapon to look at, but while dual wielding, that value takes into account both main and off hand weapons, resulting in higher than expected damage. I swapped out the check I was using for a global regex statement instead. It now replaces all instances of a.atk (or user.atk) with the correct calculations.

The updated file is available at this devlog, right here.

It's worth mentioning that this bug has been present since version 2 of this plugin was created. It just took someone with super keen eyes to notice. Thanks, @Grunwave !
 
Last edited:

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
520
Reaction score
137
First Language
English
Just want to confirm that this did resolve the issue:XP1:

Thank you for updating this plugin so much. I can remember almost 3 years ago when you made the first iteration.

I have always been a hack and slash guy, so my combat system is very important to me. I feel like my combat is 50 percent smoother and more precise with this and your block plugin.

PS: you see the gameplay footage of the Dark Crystal tactics game yet? Looks so much like FFT and its release date is feb 2020.
 

Vinvin

Villager
Member
Joined
Apr 1, 2020
Messages
11
Reaction score
2
First Language
French
Primarily Uses
RMMV
@ramza
Hello, great work with this plugin, it is very complete, amazing!
I would like to mention that i found an bug using it with YEP_ExtraParamFormula, The value of Maincrit Mainhit Offcrit Offhit are not visualy true when using two weapons or a weapon and a barehanded or two barehanded, this bugs are only affecting dual wielding chars, but in battle the correct hit and crit chance are applied.
I retested it in the DW+SB demo by puting YepEPF plugin Inside and bugs occured too.
Thx again for all that work and all that fun :)
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,564
Reaction score
379
First Language
Portuguese
Primarily Uses
RMMV
@Vinvin could you explain better? I use that plugin too and never noticed anything wrong, and your explanation... well, I didn't get it, sorry.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
663
Reaction score
373
First Language
English
Primarily Uses
RMMV
@ramza
Hello, great work with this plugin, it is very complete, amazing!
I would like to mention that i found an bug using it with YEP_ExtraParamFormula, The value of Maincrit Mainhit Offcrit Offhit are not visualy true when using two weapons or a weapon and a barehanded or two barehanded, this bugs are only affecting dual wielding chars, but in battle the correct hit and crit chance are applied.
I retested it in the DW+SB demo by puting YepEPF plugin Inside and bugs occured too.
Thx again for all that work and all that fun :)
Hey there.
I don't use the extraparamformula plugin myself, but I suspect the display issue might be related to plugin load order. Alternatively, it might be that in the menu I've managed to entirely ignore the way that the extraparamformula plugin gets its crit/hit/etc and just went with the default method, while in battle it by some miracle uses the correct function to pull your modified crit/hit formula.

In any case, a more concrete example will help me track down the issue a bit easier. What is your crit formula normally? What should you expect the crit chance to be? What does it display instead?
 

Vinvin

Villager
Member
Joined
Apr 1, 2020
Messages
11
Reaction score
2
First Language
French
Primarily Uses
RMMV
@ramza @YoraeRasante
For my test i put extraparamformula in your DW+SB demo, that is my plugin order:

1587165273784.png

Well i use the extraparamformula plugin for setup the crit chance to be actor.luk/2 %, next i give a hero 500luck so his crit is near 250%, next i give him 4%crit chance because of his classe like this:

1587165658843.png

So his new crit value is 254 for each hand. I give him a weapon in each hand, the basique sword and flail of the demo. Next i go in the "attributes" command of statue menu. I can see that it is written that he has 4% of crit with each hand instead of 254.

1587165744832.png

I start a battle, do a normal atak and that crit normaly (all time). That visual bug only occurs on dual wielding heroes when wearing one weapon in each hand or a weapon and nothing in the other hand. That works fine for dualwielding heroes who have a two handed weapon or bare-handed and for non dual wielding heroes too. Here the hero has no weapons and we can see the normal crit rate :

1587166109820.png

This visual bug occurs with hit too.

Hope that i was clear this time, sorry for my 08/20 English ^^ and thx for your attention
 

Attachments

Last edited:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,564
Reaction score
379
First Language
Portuguese
Primarily Uses
RMMV
Ah I see, the problem is in this menu...
I don't put this screen, consider most of the data there not useful for the players, so I would never see this problem.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I'm getting close to releasing a demo. Working on formatting my Games in Development post.
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...

Forum statistics

Threads
98,216
Messages
950,410
Members
129,510
Latest member
TheRoXaS29
Top