Comments

Log in with itch.io to leave a comment.

(1 edit)

I would still like to use your plugin for the equipment part (weapons on shield slot) but unfortunately i recognized problems with the VS Equipmentmenu/Equipment Sets:

- The changing stat values are not displayed
- The Armor Set Bonuses do not change when (un)equip parts

If I use $gameActors.actor(1).refreshEquipSetBonuses()
and $gameActors.actor(1).refresh() I get the updated values (but still you will nothing see in the stat change window.

Would be great if you could fix this

Thank you

Good day.

This incompatibility stems from the way I coded it to auto-remove an offhand item if you equip a two-handed weapon. Because I overwrote a function, it ignores any other changes made to that function before my plugin loads. After looking at my own code, there is probably a much better way to do this same thing, but I was pretty inexperienced when I initially made the menu things for this plugin, so I wasn't able to come up with anything better at the time.

I should be able to patch it, and possibly get the thing you're having issue with working again. However, you might also try adjusting the plugin load order so that the VS plugins load after mine instead. It'd pretty unlikely that they overwrote such an important function, so they would've ended up building off the original, meaning my changes should still be left intact.

Give that a try and see if it works, and if not I'll see if I can cook something up to fix it.

~Ramza

(1 edit)

Thanks for your reply! No problem - I'm aware there can be issues with other plugins (a lot of VS-Plugins themselves change the menu layout/display...)

(1 edit)

Hello, I just bought this plugin, and I am using action sequences with my game. The second attack never seems to happen at all, no matter what I do. Mainhand weapon is tagged as mainhand, off-hand is tagged as offhand, and both are equipped, and my char has Dual Wield slot active, but my character only does one attack.

Oddly enough, other skills from my mage characters are showing their "weapon multiplier" numbers as 0 now.

Alas, I didn't get much testing in for custom action sequences on MZ, because the thing is so different than MV.

The default attack sequence as used by the VS sample project properly repeats the target section as it's supposed to, so it might be an issue with your custom sequence, or it might be that something updated and broke compatibility. Additionally, I can only really guarantee compatibility with the Default Battle System, as the other VS battle system plugins are paid. I'm not sure if you're using one of the other ones, but that could also be an issue.

I am not familiar with this 'weapon multiplier' value. If that's something in my plugin it goes by a different name, for sure.

We can do some tests to see if the plugin is functioning correctly (aside from the action sequence thing), though. You can open the console and type in $gameParty.leader().isArmedOffhand() , and if the party leader is dual wield type, and isn't using a shield in his offhand, it should come back true. It should come back false on a non-dual wield actor, or one who is using a shield, so anyone who can't dual wield shouldn't be modified at all.

If the actor is armed in his offhand, doing $gameParty.leader().MHCalc() should return their modified main hand attack value, which, assuming the plugin parameters are still mostly defaults, is more or less going to just be their atk param from their class + their mainhand weapon + anything on their armor slots. Likewise, $gameParty.leader().OHCalc() should return the offhand attack value, which would be their base atk, modified by the offhand penalty (which IIRC is 75%) + the offhand weapon's atk value.

The next thing to check is to make sure that nothing has changed how this plugin adds the extra attack. $gameParty.leader().attackTimesAdd() should return 1 if the leader is dual wielding, and 0 if not (or more if you have traits that add extra attacks, but lets assume that isn't the case yet). If we're getting a 1 here, that means all the ducks are in a row for the extra attack to happen, and the problem is with your action sequence. 

Are you trying with a specific skill, or just the attack command? Does the actor have something in place where the attack skill is replaced with something else? Does the skill being used use a custom action sequence? How is the actor given the dual wield trait? Is it on one of his weapons?

-Ramza

(2 edits)

Thank you for your reply mate. I was at work the whole day so I had to wait forever just to reply.  I just did a whole bunch of tests so I'll put my findings here.


1. Character has dual wield set to the basic attack Skill 1 (Slot 1), with no action sequence. She attacks twice, playing both animations, deals mainhand and off-hand damage as they are supposed to be. Everything is fine.

2. Character has dual wield set to a different Skill that is an exact copy of the basic Attack command of Skill 1. Both with and without action sequence yielded the same result. One animation plays, she deals mainhand damage only.

3. Character has dual wield set to the basic attack Skill 1 with an action sequence.  Her slash animation plays only once, but she deals two sets of damage numbers, however, both are roughly half of her main-hand damage. She should be dealing 10ish and 6ish, but both numbers are never higher than 6s unless she crits.

4. Character has dual wield set to a different Skill that is an exact copy of the basic Attack command of Skill 1, but with the <Dualwield Skill> tag in note field. Both with and without action sequence yielded the same result. One animation plays, she deals one instance of mainhand damage only, damage is correct.

5. Character has dual wield set to a different Skill that is an exact copy of the basic Attack command of Skill 1, but with the <Dual wield Skill> tag in note field. Both with and without action sequence yielded the same result. One animation plays, she deals one instance of damage only, damage is half of what it should be (off-hand damage maybe?).

----

In all tests, the Actor (Actress?) has the dual wield tag given to her by her class.

$gameParty.leader().isArmedOffhand() yields True

$gameParty.leader().MHCalc() yields 10, which is most likely right Mainhand is (base 7 + weapon 5) x .9 = 10.8, so the game rounds down.

$gameParty.leader().OHCalc() yields 5.  (7 + 1) x .75 = an exact 6, so it's a wee bit lower than it should be.

$gameParty.leader().attackTimesAdd() does yield 1.

The skill is using a custom action sequence. If there is anything else I can do to help, please let me know. I'm happy to help.

Okay, using the given information, it appears we might have two separate issues here.

  1. In some of your tests, it would appear that the actor is only dealing offhand damage, despite hitting twice.
  2. Dual Wielding with action sequences doesn't seem to be working for (most?) skills.

First, for issue #1, the calculation is probably correct for the offhand damage, as you mentioned that the mainhand hit has a modifier of 0.9, which could only have been applied if you were using the Dual Wield modifier, which applies to both the main and off hands, meaning the offhand calculation is ((atk * 0.9) * 0.75 + offhand atk).

So, the next thing to do is to check that the swing counter is properly being reset after each hit. Were each of these tests done successively, from the same instances of the game? Did you have one actor who had all of these skills set, and just used them one after eachother in the same battle test without resetting in between? The current swing is stored as a value on the battler, so $gameParty.leader()._numAttacks should show a number in the console when you call it. it should return one of three values, undefined or 0, or 1. If it shows undefined, that means the actor has not yet attacked in this battle, and so, the next hit should be a main hand one. If it is 0, that means they have attacked before, but the next hit is still going to be a main hand hit, and if it is 1, the next hit will be an off hand hit. 

I think maybe it's getting stuck with the swing counter at 1, somehow, and just keeps doing the offhand attack, but only after one actual dual wield attack has already been performed. If the above console command shows a number higher than 1, then the counter is never being reset, so it just defaults to doing an offhand swing because the value isn't 0 or undefined. We can fix that, if that turns out to be the case.

For the second thing, the problem is going to be a bit trickier to work around. Dual Wield only affects the default attack skill, but it also has a function that checks if the action being used is the 'attack skill', which in RMMV was used by the YEP Weapon Unleash plugin to 'replace' the attack command with other skills. Because this plugin specifically uses the AttackTimes+ trait, which only affects the default attack skill, any skill that the engine doesn't consider the default attack will remain unaffected. 

It sounds like you're using an Equip Skills plugin to set the attack skill, but I'm not entirely sure that is all that needs to be done here, as I don't have that plugin myself so I cannot verify if it correctly sets your equipped attack skill as the attack skill, you know? It doesn't seem like it is, and this is why your second test didn't seem to work at all. In RMMZ, there is a trait to set the 'attack skill', instead of equipping a different skill as the basic attack, try setting a trait on the class to change the attack skill to the same exact copy of the default attack skill with no action sequence, and see what happens.

In your third test case, it would appear that the dual wielding 'works' but isn't working as intended. The reason for this working over the second test case would appear to be because you reverted to using the basic attack skill again. With that being said though, I think the problem here is not that it doesn't work, but that it is working as intended, I won't be able to tell myself unless you show me the entire action sequence of the attack skill to confirm, but I will explain what is happening anyway.

When a normal actor uses the normal attack it goes through the following steps:

  • Setup Actions
  • Whole Actions
  • Target Actions
  • Follow Actions
  • Finish Actions

Even without setting one up, the default attack skill still has an action sequence, as the VS team has made it so that they follow a default action sequence if one isn't specified. With the attack skill specifically, the action sequence changes slightly if the user has an Attack Times+ trait on them. 

  • Setup Actions
  • Whole Actions
  • Target Actions
  • Target Actions (repeat until Attack Times+ is reached)
  • Follow Actions
  • Finish Actions

As you may have guessed from this, dual wield functions by adding a hidden Attack Times+ to the actor, and causes their second swing to be an offhand swing instead of the main hand one. The problem here would appear to be that your custom sequence only deals damage in the target action section, and nothing else. Since I suspect all movement and animations are done during the setup (or whole, but probably setup) action, the only thing that repeats is the action effect in the target section. Again, I'd have the see the sequence to be sure, but the default sequences they use generally put attack motions and animations in the target section too, and that's why the default attack sequence works fine.

Your other note about <dual wield skill> not doing what you'd expect it to is also a bit of a misunderstanding. That tag makes it so that a multi hit skill will do split damage, and nothing else. It does not inherently make the skill hit more times. If my assumption in the first bit up top there is correct, at the time you tested this, the actor was probably already locked to the offhand some how, so that's why it only did offhand damage, again though, that's likely a bug I can fix.

To make a skill that only strikes twice if the user is dual wielding, you'd have to add in a section in your action sequence locked behind an if check that checks to see if the actor is currently dual wielding. In MV version of this plugin I had included special action sequence commands that repeated sections of the sequence if the user was dual wielding, but I could not do that in MZ because the VS BattleCore is obfuscated, and they moved action sequences to common events so I'm not sure how they're parsed. Something like 

if (user.isCurrentlyDualWielding())
//repeat target action plugin calls
end

should work for you there.

So in conclusion, 

  • See if you set the attack skill by adding an 'Attack Skill' trait to the actor's class if it works like the default attack, rather than equipping a different skill using the equip skills thing you're using.
  • Show me what your custom action sequence looks like, and if it's only got an 'action effect - target' in the target section, that's probably why it doesn't work.
  • Check those numAttacks variables and see if it's maybe not being reset correctly after an attack, and that's likely why it seems like all your split attacks are only doing offhand damage.

-Ramza

Were each of these tests done successively, from the same instances of the game? 

Yes

Did you have one actor who had all of these skills set, and just used them one after eachother in the same battle test without resetting in between?

Yes

$gameParty.leader()._numAttacks while choosing her attack does say Undefined. Oddly enough after she attacks, and tabbing over, replacing the formula, it still says undefined. Changing back to the Skill 1 attack with no AS (Gonna use that for action sequence from now on) the number does change to 0 after she attacks.

It possibly means that the MECH: Action Effect command in the AS does not actually trigger the dual wield attack mechanic.

Dual Wield only affects the default attack skill, but it also has a function that checks if the action being used is the 'attack skill', which in RMMV was used by the YEP Weapon Unleash plugin to 'replace' the attack command with other skills. Because this plugin specifically uses the AttackTimes+ trait, which only affects the default attack skill, any skill that the engine doesn't consider the default attack will remain unaffected. 

This definitely seems to be true, since my character's skill is not the default attack skill. But even so, the default attack skill with AS doesn't seem to proc correctly, hence 2 instances of off-hand damage.


It sounds like you're using an Equip Skills plugin to set the attack skill,...

Definitely. using Battle commands replacement from Visustella.

In RMMZ, there is a trait to set the 'attack skill', instead of equipping a different skill as the basic attack, try setting a trait on the class to change the attack skill to the same exact copy of the default attack skill with no action sequence, and see what happens.

After doing so, she does indeed attack twice, but both damage appear to be mainhand damage. I even set off-hand multiplier to 0.1 and she is still doing the same as her mainhand attack. This is a bit of progress though, since she does attack twice with a skill that isn't the basic attack command.

To make a skill that only strikes twice if the user is dual wielding, you'd have to add in a section in your action sequence locked behind an if check that checks to see if the actor is currently dual wielding.

Makes a lot of sense.

I could have a conditional in the AS that checks for a state given by all off-hand weapons that can trigger it (something that gives "is dual wielding" or something like that), so there's something. But how to trigger the off-hand attack eludes me.

This is my AS.

In RMMZ, there is a trait to set the 'attack skill', instead of equipping a different skill as the basic attack, try setting a trait on the class to change the attack skill to the same exact copy of the default attack skill with no action sequence, and see what happens.
After doing so, she does indeed attack twice, but both damage appear to be mainhand damage. I even set off-hand multiplier to 0.1 and she is still doing the same as her mainhand attack. This is a bit of progress though, since she does attack twice with a skill that isn't the basic attack command.

Let's work with this first. With this specific case, set the new skill as <dual wield skill> and see if the damage is correct. This shouldn't be the case here, as the engine should treat it as the normal attack at this point, but perhaps it's not.

It appears that the default action sequence command (ACSET: Target action?) would be duplicated normally, but since your action sequence doesn't have that, and uses a custom bunch of stuff in the middle there instead, it's not being repeated properly, while the MECH: Action Effect is being duplicated correctly. 

Since you tested all of the original test cases sequentially without resetting the playtest in between, it is most likely that the swing counter is never being reset, even though that might be difficult to see using that one console command I gave you. You can try putting a script call at the end of your action sequence with the following text in it, and it should reset the swing counter completely after the attack:

delete BattleManager._subject._numAttacks

From this I can see that there is definitely something I need to fix about the custom action sequence, I'll need to try to figure out how the duplication of the target action section works in the VS Battle Engine before I can come up with a real solution. As I said above, the YEP BattleCore plugin that it was based on simply repeated the entire target action section, but it doesn't seem like they have sections anymore, at least, based on your sequence there.

(1 edit)


Hi there! I'm getting this error when I try to implement the plugin in MZ. I've tried turning off all of my other plugins, and even starting a new project and testing it out. Same error. It may be something I've done, but I wondered if you might have any idea. 

Good morning. I'm sorry you've run into this problem, but I was able to identify and fix the issue very quickly this morning.

The problem was that I'd aliased a window that only exists if you're using the VisuStella ElementsStatusCore plugin. Since I'd aliased the window without checking if that plugin was imported first, if you're not using that plugin, this error comes up on load. I wrapped the alias in an if check to make sure the plugin was imported before it aliases the function from it, so that won't happen anymore.

Redownload the plugin from your library to get the new version.

Also, keep in mind this plugin requires the VisuStella BattleCore plugin to work. So if you're not using it either, you're going to get other problems that I won't be able to fix until I release a version of the plugin that doesn't need it. I only bring this up because most people who are using the VS_BattleCore plugin are also using the ElementsStatusCore plugin as well, and that wasn't the case for you.

-Ramza

(+1)

Works like a charm! Thank you for the speedy response.

Hey Ramza. Excited for the new MZ updates. I am testing the new Visustella plugins with only DualWield and I am getting a Maximum call stack size randomly on attacks.


This actually doesn't appear to be related to the dualwield plugin

Hmm. That is interesting. I'll see if I can help narrow down what's causing that, though, like you said, it doesn't look like my plugin is causing it, based on that error stack.