Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Overall, this is working great for me. However, it doesn't seem to work with characters that have +1 attack.  They still only have two attacks when using two weapons.

Hello there.

Turns out, that is a quirk with how I added the extra attack. It might actually even be a bug, now that I think about it. The extra dual wielding attack is just given to the actor as if he had Attacks+1 on him, but is not calculated in the same way, so giving him another attacks+1 trait does not give him a third hit. 

I think this is just a logic problem on my part. I accomplished this by changing the function where it returns the number of attacks+ the actor has, to return either 1 or their attacks+ number, instead of 0 or their attacks+ number. Meaning if the two numbers are both one, it will still only do one extra attack.


Line 891 in the latest version of the dual wield plugin is where this happens:

return Math.max(this.traitsSumAll(Game_BattlerBase.TRAIT_ATTACK_TIMES), 1)

if you change that line to read the following, it will fix the problem:

return Math.max(this.traitsSumAll(Game_BattlerBase.TRAIT_ATTACK_TIMES)+ 1, 1);

-Ramza

Very cool, thanks!

(2 edits)

Hi, everything has worked well for me for a long time, but all of a sudden I started getting a setObject undefined error.

The game was working again when I turned your plugins off.

Do you see anything wrong with my plugin order? It is easy to move something in the plugin order without noticing sometimes.

Edit: The newest plugins I added were for Victory Aftermath & Aftermath Level Up, but I don't see those mentioned in the error log. I can't remember when I added them and I don't think it was in the middle of the current save file. 

(Edit: I disabled Victory Aftermath plugins and the same error occurred.)

Here's the error message I got.

(2 edits)

 I made a new game and I ran into a slightly different error. Two possible issues: 

One, an ally has zero equippable weapon slots and I gave them dual wielding. I assumed it would just think they are bare-handed. 

Two, their weapon's unleashed default attack  was missing an action sequence that would enable it to be used as a duel wielding skill. (The regular attack is also missing that action sequence, but it works, and I don't know how all of these things are handled.)  

My current guess is that the first one is the problem and I am testing it now.

Edit (2-5-2022): I think I solved the problem. I played the old save state that was giving me a problem and it seems to work now. I am guessing the first solution worked. 

You might want to warn people that Equip Core can cause issues if you don't want to find a work-around for the issue.

Hey there.

While the problem you encountered was definitely an issue that didn't happen without my plugin, the reason it caused an error in the first place was because of the misconfiguration of EquipCore, not because of something wrong with Dual Wield. There is a note in the documentation (or I think there is anyway) that advises to make sure you've actually given the actor the dual wield equip type, and not just given them two weapon slots via equip core, otherwise you'd have problems.

By taking away all of their weapon slots, the bit of code that swaps weapons around gets confused and doesn't know what it's doing anymore, causing the crash. Technically that could be considered an issue with my plugin, but the default state would be to always have at least one weapon slot , so it'd usually be safe to assume that the actor has at least one. 

Also, it looks like the version of the menu extension you're using is a little bit older, as the line it references in the crash does not match with that function in the latest version. I'm not saying you should update it, but the latest version does fix a display issue with YEP_ExtraParamControl which you are using.

~Ramza

(1 edit)

Thanks for the update. I will look into the update.

I think I figured out what I did wrong, and what you are saying sounds correct.

Edit: I think I did see an issue with the parameters before, so I updated it with the new version.

Were there any other recent updates involving the blocking or dual wielding plugins? I think I might have an issue with the parry one now.

(2 edits)

Right now allies with shields are getting two attacks still. My version of the plugin was modified using your advice, so that I could have more attack hits beyond the dual wielding ability.

I have it set so that bare hands can also be used as weapons. 

I noticed that the plugin was not below Damage Core as the instructions specified, but that should be fixed now. 

I am using auto passive states to give characters the dual wielding trait.

Is there a way to stop shields from giving additional dual wielding attacks?

Edit: I am also using action sequences for dual wielding, such as for a double strike skill. Two attacks should become four, but when barehanded, the ally has several attacks. Not sure what is going on with that.

Alright, let's break this down and ask some more questions here.

Right now allies with shields are getting two attacks still. My version of the plugin was modified using your advice, so that I could have more attack hits beyond the dual wielding ability. 

Does this specifically happen with the default version of the plugin as well, or only with the modified version you're using? I don't expect the modification is the cause, but it's always nice to rule something like that out right away.

Secondly, are your shield equips actually shields? If you coded them as weapons, the plugin will see them as weapons, and will cause a dual wield attack with them. I suspect this is the issue, because if the shield wasn't a weapon, there'd probably be a crash when the engine goes to load weapon data from a shield item during an attack.

 I have it set so that bare hands can also be used as weapons. 

This is the default functionality of the plugin, so I don't suspect this is the problem, as a lot of my testing involved the ability to make offhand attacks with an empty hand.

I noticed that the plugin was not below Damage Core as the instructions specified, but that should be fixed now. 

Okay good.

I am using auto passive states to give characters the dual wielding trait.

This should be fine too, as long as the way they're getting the state isn't by having it on a weapon. During the attack process, weapons (and shields actually) are unequipped for an instant to show the correct weapon animation. In retrospect, there were probably better ways to do this, but this is what worked at the time. If your passive state for dual wielding is on one of their weapons, when it is unequipped, they are no longer dual wield type, and the engine stops processing my extra attack functions, because it no longer sees a dual wielder.

Is there a way to stop shields from giving additional dual wielding attacks?

The plugin doesn't do this already, or shouldn't anyway. I think this is some sort of misconfiguration, either your shields are coded in the database as weapons, which isn't necessary, as shields can be wielded by dual wielding actors using this plugin, or something with the passive state is causing the offhand to become unequipped during the action sequence, causing the extra barehanded strike to happen.

Edit: I am also using action sequences for dual wielding, such as for a double strike skill. Two attacks should become four, but when barehanded, the ally has several attacks. Not sure what is going on with that.

This is probably a whole other thing, and might also be the reason you're having problems.

The action sequence parts of the plugin are kind of specific, and if you don't craft them the exact right way, it can cause some wonky results.

First, the normal attack skill:

For a normal actor, with one attack (attacks++ is 0), it will strike once.

For a dual wield actor, or for a non dual wielding actor with attacks++ of 1, the <target action> section of the action sequence will repeat once.

With your modification, an actor who is dual wielding and has attack++ of 1 will repeat the <target action> section twice. And so on.

For skills, though, I have an entirely different thing set up, and I'd need to see your action sequence to be sure that's what the problem is, but the gist of it is that there are certain commands you put in it, and it runs them multiple times if the actor is dual wielding. This allows you to only repeat certain parts of the sequence, not the whole <target action> section, to allow a bit more fine control over other stuff that might be in that section. If you don't use those commands, the skill won't repeat at all, even if you tag it as dual wield. And if you manually make it hit multiple times, instead of using the commands, then it will hit multiple times regardless of whether or not the target is dual wielding.

Anyways, the first thing to try is to see if this happens with the unmodified plugin, and then check that your shields are configured properly, and lastly have a look at your action sequences, and maybe post one here so I can double check them.

Does this specifically happen with the default version of the plugin as well, or only with the modified version you're using?

Looks like the default one has the same problem. I think it's only a problem with action sequence skills.

Secondly, are your shield equips actually shields?

Yes. They are regular shields.

This is the skill that is attacking twice when using a shield:


I think I fixed the barehanded several attack problem, but I made the same mistake for the weapon version and never had an issue.  I had the "dual wield action" include another "dual wield action." This is the attack skill that is leading to several attacks when barehanded:


I think the problem with the second action sequence is that you've got it set to repeat 6 lines, but the 6th line is another dual wield action: 6 line.

I'm not sure how exactly that'd play out, but the way the command works is by adding the next X commands to the sequence immediately following that command, meaning that in that sequence, it's going to add five commands, and then another dual wield action. When it plays through the newly added commands, it's going to get to the dual wield action command and repeat the next 6 again, which includes another dual wield action: 6 on the very next line, causing it to repeat a loop a large number of times, where it likely shaves off one command from the end until it's only looping dual wield action: 6 commands, has nothing left to repeat, and stops (or causes a stack error, maybe).

Change the first one to 5 steps, so it doesn't repeat the dual wield action.

~Ramza