Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

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!

Alright, we got there.

So there were a couple of things going on here, and I suspect the issue you're having came up after the v2.68 update, as a result of what I found and fixed just now.

That update reverted a change I'd made the the battler.isDualWield() function, namely, that prior to v2.68 it returned false in battle, if the actor that was being checked was not actively wielding two weapons. When I reverted this function, I made a different function battler.isCurrentlyDualWielding(), which was meant to essentially do the same thing as the function above did. The problem is, when I made that, I missed a couple of places in the plugin where I'd used the isDualWield function, namely the action sequence code, which is why the skills with the dualwield action: x command in them weren't working right. 

Basically the plugin thought the actor was actively dual wielding, so the skills which used a check to see if the actor was dual wielding would continue as if he was. There were also other issues with it. Skills that hit multiple times would only actually swing the weapon one time, as the action sequence would try to pull the motion attack type from a weapon that didn't have a wtype (the shield), causing the actor to do nothing instead. And every skill used by a dual wield type actor who had a shield in their off hand would also always deal damage as if it were the offhand weapon being used, which, because they had a shield, would be a lot lower than it should be.

I have corrected the problems you've been experiencing in the latest version 2.73, which should be uploaded in a couple of minutes. It also includes an attack times+ fix that should mean you won't need to modify the plugin anymore either.

I apologize this took so long to track down.

~Ramza

Thanks for being very responsive. I downloaded the update!

(1 edit)

I am using your plugins (especially for dual wielding) in my game, the Lady of the Lake RPG. The full game was officially released.

Your shield block and parry plugins are also being used.

I greatly appreciate these plugins!