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

In TFS how does one change the damage formula for the engine or a vocation? After much trial I cannot find a solution.

BlueBlimp

New Member
Joined
Oct 18, 2019
Messages
5
Reaction score
0
Hello, long time lurker... I hope this is the right place for this type of post :D


My main issue is implementation of a particular damage formula for Melee and Distance:


I'm using the forgotten server. The only place I've seen to alter the damage formula is in the .xml Vocations file where the default values are "1" but I can change the default "melee damage"/"distance damage" and default "skill 'progression'" value to any value for a vocation in effect altering the damage formula. Extraneous ways to affect damage output in the game/engine would be to change attack values of weapons or alter the defense of monsters.
But what I would like to know is if I can simply change the actual formula used by the engine:

Referencing this link Game mechanics through time. (https://otland.net/threads/game-mechanics-through-time.216072/) by user Peonso one sees that the formula pre 8.0 Tibia is:

Your max damage is:
0.06*skill*WeaponAtk*d
Where d is your damage factor:
Full Attack: 1
Balanced: 7/10
Full Defence: 1/2
Your damage is a random number between 0 and your max damage rounded down, note that it can still be reduced by defenses (if it's reduced to a value below 1 by shield = poof, by armor = sparks).


I would like to know how I can use this formula as the formula for the engine, a given vocation, or some other workable solution. Because right now when the default values are "1" in the Vocations.xml, if say I have a Giant Sword with 100 Sword Skill I'm hitting Demons for 300. That's just not accurate if the goal is pre 8.0 damage output. If on a Paladin it is the same case where shooting a Behemoth with normal bolts at Distance 90 yields hits of 200, 250, and 300 regularly; which again is not what I would want because what I'm after is that original pre 8.0 formula. Now I could try to find a sweet spot playing with vocations.xml values but I thought before doing that I'd ask here if there is anyway to reach a far better solution by simply implementing the pre 8.0 damage formula for all vocations, or the engine, or what have you because not only does it save time but I can rest in peace knowing it's an authentic pre 8.0 formula. Surely there must be a way no? Not to mention it makes trying to adjust monster combat stats a little more consistent.


Thank you so much, I hope I was able to get my point across. I appreciate any feedback or solutions!
 
Last edited:
Hello, per these rules:

3. Duplicate Content:
- Use only one thread to post about your problem. Creating more threads or posts about the same problem is seen as spam. If you don't get a reply on your thread, wait 24 hours to post again to show you still need help.


Does anyone know how to do this? I've been racking my brain for 4 days trying to figure this out. I'm convinced there's a way to alter the damage formula. Players and monsters both have combat stats of skills and attack weapon -- so there must be some formula they're input into.

I'm using TFS 0.4, then using this engine as a base: 7.4/7.6 RealMap (not ready to run) (need edits before run) Happy New 2019 (https://otland.net/threads/7-4-7-6-realmap-not-ready-to-run-need-edits-before-run-happy-new-2019.262211/)


Thank you, this really means the world to me
 
monster.cpp
you could try playing with this line and see if anything changes
C++:
damage = (int32_t)std::ceil(damage * ((float)(100 - elementMod) / 100)); // try decrease the last number 100 to something like 80, or 70 or smth

No idea if this will work, but hey worth a shot
 
Back
Top