• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Feature True dual wielding for TFS 1.x

ok, i dont know why dont each hit dont work here.

Ex. left hand fire sword and right hand ice sword. here only get hit the of ice sword.
 
The image is sooo tiny, can you reupload, please?

Probably was because I already made changes in my .src, but I'll look at it.
 
There is something wrong in your player.h
Pretty sure that is some "{" or "}" that you forgot to close.
Also, what is "SpecialSkill"? Is something that you add? If you want something like that, you have to declare like this:

C++:
specialSKill_t lastspecialskill =VALUE;

You can change the name "lasspecialskill" for something better, if you want.
 
Piquenoelmal, thanks for your files they were very helpful.
well, i have only one problem now.
Sem título6.png

weapon in the ammo slot.
 
Piquenoelmal, thanks for your files they were very helpful.
well, i have only one problem now.
View attachment 32972

weapon in the ammo slot.

Heym that's great. Happy that worked for you! :)
This weapon in ammo slot is because the classicEquipmentSlots = true. It's normal to be in that way.

I think you have to make some "ifs" inside the code to limit this feature. I'll look into it later and give you an answer.
 
Heym that's great. Happy that worked for you! :)
This weapon in ammo slot is because the classicEquipmentSlots = true. It's normal to be in that way.

I think you have to make some "ifs" inside the code to limit this feature. I'll look into it later and give you an answer.
Hey bro, can you teach me to compile your sistem in OTX servers ? I need so much this dual wielding system! :(
 
Guys, I used this system on my TFS 1.3.

I found one little issue that I'm not being able to fix. When I use a Spear and I equip any weapon on the second hand, the first spear attack will launch, but the second (with a sword for example) won't, until I get near to the monster, attack it, and only then the spear will attack again.

I think It's because the attackHand is waiting for the next weapon. Does anyone know how to deal with this issue?

Thank you all in advance!
 
Great work. Thank you.

Hey folks,

Having an issue with the Vocation class call.

View attachment 48927

Any thoughts?
1623039753153.png
Make sure these parts are correctly added. And when using
C++:
canDualWield
make sure to add parentheses. as in
C++:
canDualWield()
. Also, make sure dualWield is added to Vocation class properly.
 
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: TFS 1.1 dual wielding (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
Otherwise if you run Windows, download patch from here and run:
Code:
patch.exe -p1 --binary -i the-name-of-the-patch-file.patch
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 :D

Thanks and please report any issues you might find!

With a sword it works perfect for me but with an item distance does not let me

<item id="2399" article="a" name="very stronge throwing ki" plural="throwing ki">
<attribute key="weight" value="2000"/>
<attribute key="attack" value="19"/>
<attribute key="hitChance" value="100" />
<attribute key="weaponType" value="distance"/>
<attribute key="shootType" value="THROWINGSTAR" />
<attribute key="range" value="8"/>
 
There is a very odd bug with this system.
Dual Wielding while training will eventually stop at like skill 80.
You will no longer gain any skills after that.
 
I manage to compile without errors, but my weapon hit isn't alternating
 
Last edited:
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: TFS 1.1 dual wielding (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
Otherwise if you run Windows, download patch from here and run:
Code:
patch.exe -p1 --binary -i the-name-of-the-patch-file.patch
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 :D

Thanks and please report any issues you might find!
i am go to the sleep and how i can get this project in the school i want to sleep
 
Back
Top