• 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!

damage hit

douglas321

New Member
Joined
Oct 17, 2015
Messages
21
Reaction score
0
I need help, where did I get to change the variation of knight hit hits? It is very unbalanced. is missing hit all the time and hitting little but I have no idea where I should change ... version 7.72 TFS 1.2
 
data\XML\vocations.xml You should find this if you are using TFS 1.2
XML:
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
Just change the meleeDamage="1.0" to suit your needs.
 
data\XML\vocations.xml You should find this if you are using TFS 1.2
XML:
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
Just change the meleeDamage="1.0" to suit your needs.
Assuming this question also applies to Nostalrius distribution, not clean TFS, these multipliers seem to have been removed: TwistedScorpio/Nostalrius (https://github.com/TwistedScorpio/Nostalrius/blob/master/data/XML/vocations.xml)
You may need to change the formula in combat.cpp at Combat::getTotalDamage and recompile the server.
However, it looks like this function is used for both melee and distance fighting here (that's how it was in Tibia, by the way).
If you'd want to separate it somehow, you may write another one, and then change it either inside Combat::closeAttack at this line:
Code:
int32_t totalDamage = Combat::getTotalDamage(skillValue, attackValue, fightMode);
or inside Combat::RangeAttack at:
Code:
combatDamage.value = Combat::getTotalDamage(skillValue, attackValue, fightMode);
Unless you only want to add a multiplier as M0ustafa proposed, and not completly rework the whole formula, then it should be fine to do something like this:
Code:
= Combat::getTotalDamage(skillValue, attackValue, fightMode) * 1.5;
Keep in mind it's written under integer variable, if you care about rounding.
Hope this helps.
 
Last edited:
Assuming this question also applies to Nostalrius distribution, not clean TFS, these multipliers seem to have been removed: TwistedScorpio/Nostalrius (https://github.com/TwistedScorpio/Nostalrius/blob/master/data/XML/vocations.xml)
You may need to change the formula in combat.cpp at Combat::getTotalDamage and recompile the server.
However, it looks like this function is used for both melee and distance fighting here (that's how it was in Tibia, by the way).
If you'd want to separate it somehow, you may write another one, and then change it either inside Combat::closeAttack at this line:
Code:
int32_t totalDamage = Combat::getTotalDamage(skillValue, attackValue, fightMode);
or inside Combat::RangeAttack at:
Code:
combatDamage.value = Combat::getTotalDamage(skillValue, attackValue, fightMode);
Unless you only want to add a multiplier as M0ustafa proposed, and not completly rework the whole formula, then it should be fine to do something like this:
Code:
= Combat::getTotalDamage(skillValue, attackValue, fightMode) * 1.5;
Keep in mind it's written under integer variable, if you care about rounding.
Hope this helps.
thanks!
 
Back
Top