Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

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

Yes, I think bare handed is working now. It was an obvious mistake in retrospect.

I am using auto passive states, and I suspect it is part of the problem. I tried to give two handed weapons and shields "seal state" to seal the "dual wielding" state, and that isn't working either. I can't find any google results for how auto passive states responds to the "seal state" trait.

I wanted dual wielding to be something you can learn. How do you deal with it?

If you put a passive state ona  skill, the state will become active when the actor knows the skill.


You can make a skill belonging to a skilltype that isn't usable by anyone, so it doesn't show up in menus, and have that skill have the dual wield passive state on it. I did something similar with passive skills in my own (permanently on hiatus) project, using the YEP skill learning system plugin, and a different skill equip system (which I think was made by moogleX?). 

If you're not using that plugin, an ordinary skill learned on level up, but belonging to a skilltype the actor can't use, is still 'known', so should still confer the passive state, but the player will never see it.

~Ramza

I am using a skill tree for learning skills, and learning Dual Wielding (using an auto passive state) mostly works. However, I am getting extra attacks , even when using a shield or two handed weapon. I was hoping "state resist" on the shield or two-handed weapon would stop the extra attack, but it's still happening anyway.

I am not sure if there's some kind of plugin incompatibility. I am thinking I might have to add dual wielding to a class rather than use it with an auto passive state skill.

The only suggestion I can make that this point is to start a brand new project and slowly implement each part of your idea step by step, and see at what point the problem comes back.

In a stock project, with only Dual Wield, and it's dependencies, using only the regular attack skill:

  • Non dual wielders get no extra attacks at all
  • Dual wielders can equip shields, and don't get extra attacks with them,
  • Anyone can use a two-handed weapon, and will not have an offhand attack even if their offhand is empty, even if they're dual wield type*

*unless they also have something that's giving them monkeygrip.

Once you establish that baseline, you can test again with your action sequence dual wielding skills. Again, with only the base plugin, and its dependencies, assuming the sequence is made correctly, you should see the following:

  • Skills tagged <Dual Wield Skill> which have multiple action effect lines in their sequence, or have their repeat times set greater than 1, will alternate which weapon is shown on each swing, for dual wielding actors with two weapons only.
  • Dual wield skills (as named above), when performed by a non-dual wielding actor, or a dual wielding actor with a two handed weapon, or one with a shield in their offhand will not alternate weapon swings with a barehanded strike. The skill should appear and function the same as if the plugin were not enabled.
  • Dual wield skills that have a custom action sequence with the <dual wield action: x> will repeat x steps in their sequence only if the actor is both dual wield type, and "armed" in their offhand.
    • An actor is considered armed if they have a weapon in their offhand, both hands are empty, or they have a one handed weapon in their main hand, and their offhand is empty, but only in the last case if the plugin parameter for a barehanded attack is enabled.
  • For the above point, the sequence will not repeat x steps if the actor is not dual wield type, or has a shield in their off hand, or is using a twohanded weapon.

For the above testing, just give the actors the dual wield trait on their class, or in their actor traits. Once you've established that the issue isn't with the base plugin, the configuration of it, or the action sequences, you can start experimenting with getting the system to work more like how you want it to work.

  • Add the dual wield trait to a passive state, then put the passive state directly on the actor (either in the actor note box or on their class), Then test all of the above again.
  • Assuming everything still works the same as it did before, move the passive state onto a skill, and then have the actor learn that skill at level 1. Retest again, and confirm that it still functions the same way as before.
  • Change the level the skill is learned to a higher one. Start at level 1 and confirm no actor is dual wielding until the skill is learned at level 3 or whatever, and at that point it should work as normal again.

At this point, we've established that acquiring the passive state via level up is possible by putting it on a skill and learning that skill at a certain level. From here, you can configure your skill tree plugin to teach the same skill that already works in the above test, and then retest using it that way. Assuming the skill tree actually gives the skill to the actor, and not... some other hacky workaround, the passive state should become active on the actor when they learn the skill again, and everything should still work the way it did above.

If at any point during the above steps, you run into any of your original issues, go back a step and confirm what just caused them. If your extra barehand attacks are coming in right after you start using the dual wield action: x command, you must be configuring the action sequence incorrectly. If the extra attacks start coming in after your skill tree plugin is imported, it might be a compatibility issue between them. Keep in mind that the <dual wield skill> note tag doesn't do anything to the function of the skill on its own, it only makes it so that skills that hit multiple times do split damage, and show alternating weapons on each swing.

Like I said, do all of this testing in an empty, blank, project, to ensure that no corrupted core files, or other plugins are getting in the way. Once you establish a baseline where it works, you can slowly add to it to get the system working the way you want, and maybe figure out what you're doing which is causing the problem. 

Some other things to remember: 

  • Shields can always be equipped by dual wielding actors, as long as they have a trait that lets them wear shields.
  • A shield tagged <offhand> allows it to be wielded with a two-handed weapon.
  • Weapons tagged <twohanded> will generally remove whatever is in the off hand slot when equipped, unless it is a shield tagged as <offhand>.
  • The extra barehanded attack should not happen at all if it's disabled from the plugin parameters, unless the actor has no weapon in either hand.
  • The extra barehanded attack will not happen under any circumstances if the actor is not dual wield type.
  • The extra barehanded attack will not happen if the actor is using a two-handed weapon, unless they are also monkeygripping, because if they are monkeygrip type, the two handed weapon is considered one handed.

One other thing, passive states ignore state resist, as they are not applied in the same way normal states are. The dual wield plugin has a 'disable state' parameter, which is 0 (disabled) by default. If you change that to a state Id, when an actor has that state, the extra attack will be disabled entirely, as if they are not dual wielding at all. This information might not be needed after all of the above troubleshooting, but it's good to have all the same.

~Ramza

Deleted 2 years ago
(3 edits)

I made a new project and just using your plugins and the other plugins needed, such as auto-passive states (for the shields to have shield blocking enabled). It also is not working right with just the YEP Core Engine, Battle Core, & your Duel Wield plugin.  

I am still getting two dual wielding attacks when I used the dual wielding attack skills, whether a double strike or attack on all enemies. It works fine for regular attacks, but skills with action sequences are not working for me. I am still getting double attacks when using a two handed weapon or shield. (The problem exists for the modified plugin and the original, v2.69.)

An example of a dual wielding attack skill notebox:

<Dualwield Skill>
<Whole Action>
dualwield action: 6
motion attack: user
motion wait: user
action animation: opponents
wait for animation
action effect: opponents
death break
</Whole Action>
<target action>
</target action>

Edit: I think I found a simple solution! I noticed that the plugin has a state for disabling dual wielding. I added that to shields and two handed weapons, and that seems to be working!