Modern MMORPG Locomotion System

Dual Wield System Overview

Kinda complex, made 100% from scratch. Please tell us if you find anything that is not working correctly. The system can be even better than what we have currently, it is possible to include Switch Hand montages to switch the weapon from the main hand to the offhand and vice-versa for realism.  The general steps to do this would be to play a montage after the two Switch On Holdable Type, and attach the actor to the other hand with a Notify Window instead of unequipping the item like we currently do in our blueprint logic. That would be a good improvement that we may actually add in the future.

How it works:
 
We spawn a new “Dummy” weapon actor (hidden) holding all the settings, logic and animations. This Dummy actor is called instead of the usual weapon actors. In theory this should allow for an infinite number of dual wield variations.

Weapon Blueprints

The most important : BP_MasterWeapon

This is the main weapon blueprint. If you have a two-handed weapon, a main hand only(no dual wield) or offhand only weapon(no dual wield), make a child of this blueprint.

We do not have any two-handed weapon at the moment(that you can duplicate), so the child blueprint will be blank. You can copy paste the variables from the weapons already set up (like the pistol or shield) to speed up the process. For instance you can copy paste the whole animation set from one weapon to the other.

BP_MasterOffHandWeapon

This is the blueprint for all the off-hand weapons. It is a child of BP_MasterWeapon and includes 2 specific variables (details below). If your offhand is not a shield, make a child of this blueprint or duplicate the pistol to save a huge amount of time. All the animations, logic and settings here are for the weapon equipped in the main hand.

BP_MasterOffHandShield

Essentially the same thing as BP_MasterOffHandWeapon but with a different collision on the mesh. It is also used for specific hit effects for example to play a recoil montage when the shield is hit. We cast to BP_MasterOffHandShield to determine if it is a shield or not. See how it is done in the Pistol Bullet BP.

You can duplicate the BP_GoldenBuckler to save time instead of making a child blueprint of this.

*The settings here are for when your shield is equipped in the main hand. If you do not want to be able to equip it in the main hand select Off Hand Only & Can Dual Wield in the Holdable Type variable.

*Make sure the collision settings are exactly the same as in BP_GoldenBuckler. Also set the collision box on the actual static mesh of your shield.

All the settings are pretty straight forward. We always give the things By Mesh for complete control and also because most people will have a female and male character and it is way harder to add this than to delete it.

If you do not want the settings by mesh(to optimize if you only have one character mesh in your game), you can go in the Masters and delete the map (create a unique variable of the structure instead of a map). This might wipe everything in the blueprints. If it does happen just open a fresh project and copy paste back the settings like the animation set. Some logic everywhere will need to be changed also but it should not be that hard. You just have to delete the Find mesh and plug it straight. Might need to change some variable types in the interfaces and structures too. If you need help don’t be shy.

BP_MasterDummyWeapon

This is where the fun is at. Here you can place everything you want for your specific weapon setup. You can either make an off-hand only weapon (meaning you will equip your weapon in the offhand with nothing else) like we have done for BP_DummyBucklerOffhandOnly, or one for a duel wield like BP_BucklerWithBuckler.

The equip/unequip montages placed here should match all the equip slots of the main weapon BP. Every dummy weapon needs a main weapon actor.

Then you map the Dummy to Main Hand in the OffHandWeapon BP. To the left of the Dual Wield Dummy Weapon Map variable is the MainWeapon Blueprint. To the right the Dummy actor to spawn

Example :

If the main weapon BP(the one with OffHand Settings) is a shield and I want the shield in the offhand with the pistol(BP_SpartanPistol) in the main hand, I would put BP_SpartanPistol there and a DummyPistolWithShield. The pistol has to already be equipped in the main hand. The equip/unequip montages placed in DummyPistolWithShield would need to have a pistol in the main hand to be realistic. The animation would be you holding a pistol and taking the shield with your offhand in the relevant equip slot.

So yeah, huge possibilities with this system but also a massive amount of animations to create to get to that level of realism that would go well with UE5…

Also set the DummyOffHandOnly if you want to be able to equip it in the offhand with no main hand.