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

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
666
Reaction score
382
First Language
English
Primarily Uses
RMMV
@ramza @YoraeRasante
For my test i put extraparamformula in your DW+SB demo, that is my plugin order:

View attachment 140127

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:

View attachment 140129

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.

View attachment 140130

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 :

View attachment 140131

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
Loud and clear. Thanks to your detailed report, I was able to easily find the issue and correct it. I have uploaded version 1.39 of the menu extension here.

If anyone is interested in what the problem turned out to be I will explain:

In menus, when I was drawing the values for mainhand and offhand hit or crit rating, I did so by removing all traits from the opposite hand temporarily, then re-calculating hit or crit with the traits removed, then re-adding those traits again. In some specific scenarios, instead of going through that, the function simply returned actor.cri or actor.hit, mainly when the opposite hand was empty, meaning it displayed the correct value when there was nothing to take away from the other hand.
However, when there was an item in the opposite hand, I was getting the actors total crit (or hit) value via adding up traits on them, rather than calling actor.crit (or actor.hit), meaning it was ignoring any other method used of gaining crit or hit rate.
By simply changing those lines from a function that summed all traits for crit or hit, to the function that just returns their crit or hit rate entirely, I was able to keep the exact same functionality in the menu, while also taking into account any changes made to the ExParams formula via plugin.

As mentioned by Vinvin, this was a display issue only, as during battle, crit rate and hit rate are determined via the actor.cri and actor.hit functions (are these technically functions?), rather than by summing all crit and hit traits on them manually.
 

Vinvin

Villager
Member
Joined
Apr 1, 2020
Messages
11
Reaction score
2
First Language
French
Primarily Uses
RMMV
You are too strong man, you fix this problem in one night, sometimes others coders take two weaks for answer a question XD
gg wp, continue the good work you're the best :D:thumbsup-right:
 

Vinvin

Villager
Member
Joined
Apr 1, 2020
Messages
11
Reaction score
2
First Language
French
Primarily Uses
RMMV
@ramza
Hello there! I played so much with this cool plugin and found new bugs!

Always in the same test conditions : I put on the sword of the demo "attack state : poison 100%" and on the demo's flair "attack state : blind 100%", i hit the bat with normal attak, that blind and poison it, good! But if i twinstrike it that doesn't apply poison state, if i double sting that doesn't apply blind state. i tried to put "state: normal attack 100%" in the skill like that :

1587397905027.png

But that do weird things like giving poison and blind on a twinstrike or on a double sting.
This bugs occur on "impossible speed" and "wombo combo" too.
Critical and elements are working well, i didn't test hit.

Have found a graphical bug with DX_menu that only occurs with the use of extraparamformula : that is the main hand hit and crit that are drawn for the two hands. i think i have seen commentaries for a similar issue in the pages of this thread.

Thx for your attention,
Hope that will serve! :smile:
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
666
Reaction score
382
First Language
English
Primarily Uses
RMMV
I understand what you're saying about states being added by skills, and I have to admit, I didn't consider skills being able to apply states from weapons when I made those skills that lock hands. I'll look into getting that working for you. I suspect I'll need to rewrite how the "state: normal attack" determines what states to apply. Shouldn't be too hard.

Unfortunately, I'm not sure what you mean by the second part of your post. If there is a further display issue with the menu extension, please post an accompanying screenshot and I'll see what I can do to fix it.
 

Vinvin

Villager
Member
Joined
Apr 1, 2020
Messages
11
Reaction score
2
First Language
French
Primarily Uses
RMMV
I understand what you're saying about states being added by skills, and I have to admit, I didn't consider skills being able to apply states from weapons when I made those skills that lock hands. I'll look into getting that working for you. I suspect I'll need to rewrite how the "state: normal attack" determines what states to apply. Shouldn't be too hard.
Skills that being able to apply states from weapons can be usefull for many things like : do an assassin skill that put poison on his blades, or making a bloody blade that have 10% of making ennemy bleeding or a solar blade that can burn, this is interesting because without that using only the offhand multiple times (like double sting) got a limited interest because offhand attacks are often less powerfull than mainhand attacks. I think that if you take this into account you're dual wielding plugin will be 100% perfect instead of 95% perfect ^^

Unfortunately, I'm not sure what you mean by the second part of your post. If there is a further display issue with the menu extension, please post an accompanying screenshot and I'll see what I can do to fix it.
Well in your DW+SB demo always with the same plugins order :

1587745746488.png

I make the axe of demo to give +10%crit and +10%hit, the hero normaly have 95% hit and 20%crit.
I equip the axe in mainhand and flail with offhand and..:

1587746191018.png
Only the main hand hit and crit a drawn for the two hands

So if i equip the flail in mainhand and the axe in offhand :

1587746333246.png

i read in one of the pages of this thread that a similar issue was fixed with an old update of your DX_Menu

Thx again for your attention @ramza! i really appreciate your work, your support and the constant upgrades of all your amazing plugins!
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
666
Reaction score
382
First Language
English
Primarily Uses
RMMV
Skills that being able to apply states from weapons can be usefull for many things like : do an assassin skill that put poison on his blades, or making a bloody blade that have 10% of making ennemy bleeding or a solar blade that can burn, this is interesting because without that using only the offhand multiple times (like double sting) got a limited interest because offhand attacks are often less powerfull than mainhand attacks. I think that if you take this into account you're dual wielding plugin will be 100% perfect instead of 95% perfect ^^



Well in your DW+SB demo always with the same plugins order :

View attachment 140790

I make the axe of demo to give +10%crit and +10%hit, the hero normaly have 95% hit and 20%crit.
I equip the axe in mainhand and flail with offhand and..:

View attachment 140796
Only the main hand hit and crit a drawn for the two hands

So if i equip the flail in mainhand and the axe in offhand :

View attachment 140797

i read in one of the pages of this thread that a similar issue was fixed with an old update of your DX_Menu

Thx again for your attention @ramza! i really appreciate your work, your support and the constant upgrades of all your amazing plugins!
Hey there.
I have corrected your second issue with the menu extension plugin. You can get the updated plugin file here.
As always, anyone curious what the actual problem was can read the devlog. The gist of it is that I was expecting actor.cri to update immediately when I removed crit traits from weapons the actor was wearing, and in the base engine, it does, but Yanfly's ExtraParamFormula plugin adds a check where if the exparam has already been defined, it simply returns the stored value, instead of re-calculating a new one. This resulted in my fix in v1.39 causing both MH and OH crit and hit to just show the default actor.cri and actor.hit values, with no modifications at all.
2020-04-26.png
From this screenshot, you can see that hit rate and critical hit rate on the left side are the sum of all weapons (as expected), while mainhand and offhand hit and crit % are the correct split values. (I added 20% the default crit formula in extraparamformulas, just like you did). 20 + 4% from class, + 12% from the sword = 36%, the offhand weapon only has 3% crit, so it adds up to 27%.

I'll admit that when I applied the first fix, I didn't test it with the extraparamformulas plugin, I just assumed it worked as the numbers were fine in the test project without it.

Also, @Vinvin the exparamfix.js file isn't meant to be ON at the same time as the Ramza_X_DW_MenuExtension plugin. That's why some of those params listed show really long 'CHANGE THESE NAMES PLS' types names in those screenshots. I'm not sure why it's on in the demo project, tbh.
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
666
Reaction score
382
First Language
English
Primarily Uses
RMMV
@Vinvin I just uploaded a new version of the dual wield plugin which corrects the states issue you reported. You can download it here.

There was an issue where skills that locked to the main or offhand weapons were incorrectly locking to the opposite weapon after the first hit. In the demo project, Twinstrike and Double Sting would hit the first time with the correct weapon, and then the second strike would use the traits of the wrong weapon. Skills that hit more than twice would actually use the wrong traits for all hits after the first one.

This means that the crit rate and hit rate of those skills was also incorrect. The first hit would use the correct crit/hit of the locked weapon, but the second hit would use the crit/hit rate of the opposite weapon as well.

Because the 'Attack State Poison X%' is a weapon trait, a skill that had the effect 'Add State: Normal Attack XX%' would add the correct attack state only for the first hit, and then any attack states from the opposite weapon for the second hit, resulting in both attack states from both weapons being added.
 

Vinvin

Villager
Member
Joined
Apr 1, 2020
Messages
11
Reaction score
2
First Language
French
Primarily Uses
RMMV
You're the best @ramza ! Your dual wield plugin is 105% complete now ^^
Keep the good work! ;):thumbsup-right:
 

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

Latest Threads

Latest Profile Posts

Inspired by @fluffymonster 's Cute Ghost
His name is POKO!
I made a giant tree + treehouse for the next country woods pack \o\
Calculated my tax refund - CHEERS
Looked at my student debt - cries
Still, might be just enough left over to pay for my new computer, which would be awesome!
And my student debt will be fully paid, which is also pretty nice.
They say nice guys finish last. But mean guys don't finish at all!
I keep forgetting how much I hate how VX-MV implements fences and autotile tables.

Forum statistics

Threads
99,415
Messages
965,047
Members
131,035
Latest member
KeziaG96
Top