I have seen a few dual wielding systems in the past but none of them was complete and simple to use. I started one from scratch that intends to be both simple, work out of the box and be easy to configure.
As I am developing my own server, I want to share some of my patches with the community. This is just the first one
Link to the patch: https://gist.github.com/ranisalt/8aad87afcca2905f6e89
How to apply: if you are on Linux, put the patch on the root folder of your server (the folder that contains src/ and config.lua) and run:
Otherwise if you run Windows, download patch from here and run:
If there is no error, you are good to go! Recompile your server and check the new flags in config.lua.
How to configure
All one-handed melee weapons are enable, as I didn't want to provide a way to restrict weapons from being dual wielded. Dual wielding provides a modified attack speed and damage.
Change allowDualWielding on config.lua to enable dual weapon wielding. Remember you need to set classicEquipmentSlots to true too to wield weapon on the right hand slot.
Change dualWieldingSpeedRate to the percentage of speed bonus, e.g. set it to 200 if you want dual wielding attack to be twice as fast.
Change dualWieldingDamageRate to the percentage of damage, e.g. set it to 60 if you want every dual wielding hit, that is one from each hand, to be 60% of the damage it would be single-wielded.
You can enable or disable the system globally with allowDualWielding, or you can disable it for vocations by setting dualwield="no" on them at vocations.xml. It defaults to enabled.
The player will train both skills (if weapons are from different classes) at half the rate (1 try every 2 hits) while dual wielding. Single wielding is unaffected. The weapons will be switched at every attack, one being from the left hand, the next from the right hand. The defending weapon will be the free one, that is, the one that is not attacking.
Liked it? Don't forget to drop a star by my Forgotten fork, it has more interesting stuff
Thanks and please report any issues you might find!
As I am developing my own server, I want to share some of my patches with the community. This is just the first one
Link to the patch: https://gist.github.com/ranisalt/8aad87afcca2905f6e89
How to apply: if you are on Linux, put the patch on the root folder of your server (the folder that contains src/ and config.lua) and run:
Code:
patch -p1 -i the-name-of-the-patch-file.patch
Code:
patch.exe -p1 --binary -i the-name-of-the-patch-file.patch
How to configure
All one-handed melee weapons are enable, as I didn't want to provide a way to restrict weapons from being dual wielded. Dual wielding provides a modified attack speed and damage.
Change allowDualWielding on config.lua to enable dual weapon wielding. Remember you need to set classicEquipmentSlots to true too to wield weapon on the right hand slot.
Change dualWieldingSpeedRate to the percentage of speed bonus, e.g. set it to 200 if you want dual wielding attack to be twice as fast.
Change dualWieldingDamageRate to the percentage of damage, e.g. set it to 60 if you want every dual wielding hit, that is one from each hand, to be 60% of the damage it would be single-wielded.
You can enable or disable the system globally with allowDualWielding, or you can disable it for vocations by setting dualwield="no" on them at vocations.xml. It defaults to enabled.
The player will train both skills (if weapons are from different classes) at half the rate (1 try every 2 hits) while dual wielding. Single wielding is unaffected. The weapons will be switched at every attack, one being from the left hand, the next from the right hand. The defending weapon will be the free one, that is, the one that is not attacking.
Liked it? Don't forget to drop a star by my Forgotten fork, it has more interesting stuff
Thanks and please report any issues you might find!
Last edited: