• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Community effort to improve spell forumlas!

Bahaha

New Member
Joined
Jul 11, 2007
Messages
58
Reaction score
1
I think in an effort to better OT servers and OTland as a whole we should make an effort to accurately copy tibia spells and make an official release. The spells included with the foficial source are somewhat accurate, but I want to make them better.

Posts such as this:"perfect tibia spells 97%" are what inspired me to make this post. I looked through all the spells there and they were off by large amounts at all levels, and the poster lied about having any information whatsoever about the spells.

As it turns out, after testing a few more values from tibia-stats they have accurate formulas for what I tested. I will just spend time now translating that information into spell LUA files where our current info is wrong.

I will include a spell folder in a day or two from now.
 
Last edited:
If level <81 l=2(level-20) else l=120+(level-80)
if magiclevel <81 m=3(magiclevel-20) else m=180+4(magiclevel-80)
power = (m+l)/100
if power<1 power =1 afaik
that formula was belived to be true since some update(weakening knights uh was caused by lowering levels power, before that update it was just 2*(level-20)+3*(magiclevel-20))
spells have minimum and maximum values multiplied by power and constants. Number randomized between that two constants is added to value randomized between mina*power and maxa*power. And that sum is damage/healing output. That makes research much harder
 
If level <81 l=2(level-20) else l=120+(level-80)
if magiclevel <81 m=3(magiclevel-20) else m=180+4(magiclevel-80)
power = (m+l)/100
if power<1 power =1 afaik
that formula was belived to be true since some update(weakening knights uh was caused by lowering levels power, before that update it was just 2*(level-20)+3*(magiclevel-20))
r

Aha! While it may be believed to be true, I can offer my alternative opinion. I suspect the truth is somewhere inbetween. I personally dont like listening to what is "believed" to be true, but to rather find the truth itself, whether that is simple a waste of time finding what is found or finds something nobody else has is another issue.

You have quite a complex formula, however, I know for a fact that the old UH formula was exactly level * 5 + mlvl * 7.5. Exactly this, every single time, and for every level I tested it at and on every vocation I tested it (this was at 2005). The formula worked in a way that it would have a minimum that it could heal (around 200, I never actually found this value) but once you surpassed this value you would heal exactly as the above says you would. Every time. Not even a variable range.
Now, I bring this up because why would we use the quoted formula in such a case when the results can be replicated with a much simpler formula?

spells have minimum and maximum values multiplied by power and constants. Number randomized between that two constants is added to value randomized between mina*power and maxa*power. And that sum is damage/healing output. That makes research much harder

I am willing and fully expect that the formula will have to change, but it will only change when there is a need for it. The only reason you think it looks so complicated is because you are over-thinking the problem. We have 3, possibly 4 variables at work.

Because in the end we only havea few variables which change on the player. Those are level and magic level on the player, and then absolute minimum damage and how far away the maximum damage is from it. If we can understand the effects of all 4 of these variables, we can write a simple script based on them. If you view the problem this way until there is need to change, it will help simplify the issue.

As you hopefully noticed, my spells output within 1 of the real tibia outputs, and you should know that tibia doesnt output every integer but is limited to maybe 1 in every 2 or 3. I suspect this is due to rounding, but nonetheless my point is that my formula can mimic the damage closely so far while being much more simple. There is never one way to the answer. You need to remember that when CIP made the formula for spells they were not looking to make some cryptic, unfindable values which complicate things and take hours of programming to balance. They thought of simplistic values in most cases until they needed more complex.
 
Actually yes. The power formula is good to estimating how your power grows but doesn't have to be exact. But it's close enough in most cases.
Anyway, new attack formula in tfs have 6 variables iirc. Sth like minimal level multiplier, maximal level multiplier, the same for magic and the same for constants. So we can create quite complex ones when needed.
And we have to remember that it is possible that the 80 change occurs. We can quite easy check how magiclevel change changes output by using equipment. And on higher levels it is possible to get quite much tests to get nice data before leveling up. But still healing formulas will be probably much easier to get. You can even start with magical equipment and while training just take it off to leave magiclevel constant.
Well, actually it is possible to check damage in party for example, you just have to multiple it by 2(but it won't be exact because of rounding that possible 0.5 when dividing)
and we have to check if value is just randomized or there is some distribution formula(like some values appear more often than others, probably gaussian distribution would be used in that case)
 
Last edited:
Actually yes. The power formula is good to estimating how your power grows but doesn't have to be exact. But it's close enough in most cases.
Anyway, new attack formula in tfs have 6 variables iirc. Sth like minimal level multiplier, maximal level multiplier, the same for magic and the same for constants. So we can create quite complex ones when needed.
And we have to remember that it is possible that the 80 change occurs. We can quite easy check how magiclevel change changes output by using equipment. And on higher levels it is possible to get quite much tests to get nice data before leveling up. But still healing formulas will be probably much easier to get. You can even start with magical equipment and while training just take it off to leave magiclevel constant.
Well, actually it is possible to check damage in party for example, you just have to multiple it by 2(but it won't be exact because of rounding that possible 0.5 when dividing)
and we have to check if value is just randomized or there is some distribution formula(like some values appear more often than others, probably gaussian distribution would be used in that case)

So, lets take baby steps, no?
Find the base ranges at multiple levels and magic levels, replicate them. (clearly I have too few data points, but it is to be expected with only just starting. Easy to fix ;))
Then look for other factors which affect damage like the distribution.
Then look at why the values only appear on some numbers.

I am not fond of using TFS system (which has more than 6 iirc) because they do not have proper spell damages in their source. If they made spells based off of the formulas in the source, based on what you say to be true, it is either to cut corners by not inputting proper values or based on false information.
 
Last edited:
Anyway to make multiplier from vocations and things like increasemagicpercent work we have to edit hardcoded formula and just put in spells some values. But editing it after finding proper formulas shouldn't be hard. I just need pc to do it :)
after fixing my pc I can start checking free pal and sorc spells on my chars.
 
I will stick to healing and cheap runes.
Anyway, I'm wondering he we have proper weapon damage formula. But researching that would be harder, only 0 defence monster known to me have pretty low health
 
Well I'm thinking we can find this through other means. I dont know exactly how the armor system works in tibia, but I have seen that an exori hitting a tarantula does 12 more damage than one hitting a giant spider. Using information of this sort we can trace back armor and defense values. And I can not comment on weapon damage itself yet, but my assumption is that the formulas are wrong.
 
Probably they are just close enough to not care about them while there are stability/performance/memory usage problems. But killing some slimes by sword wont hurt.
But first I need new pc unfortunately. It's only 30h since it's failure and I'm already going crazy
 
I am off to school now, but I tried playing around with some formulas and found something which may be helpful. Ill play more after school.
a=level
b=magic
min = (4 + (2*a/Math.sqrt(a)) + (b)) * 1.4;
max = (5 + (2*a/Math.sqrt(a)) + (b)) * 2;

This formula outputs within 2 damage for exori frigo lvl 310 mg 87 and outputs +5 to each value for level 91 mlvl 59. What do you think?
 
You can try using ceil that sqrt, that would reduce output a bit. But the formula is probably more complex. How you got idea of using square root?
 
Because CIP wanted to reduce the effect of levels, I assumed that they needed a higher gain at low levels and to greatly limit the extreme high level cases. I thought a square root would solve that problem to an extent, and it appears to follow quite closely what the actual formula is.
 
hm another idea to test it on players, look while pvp damage is reduced by X % so my question is to put 2x high lvls wear out any armor, try to hit best, note it, now try it with spells and then find the missing % and add it to what you noted and viola ull have the exact damage on monster with no def :d
 
Well, Ive solved part of the issue for strike spells:
at 37/38, 91/59, 310/87
max:+1
max:+1
max:+1
Total error on the max formula:3 over 3 attempts
using the formula ((4*level/Math.sqrt(level)) + (magic)) * 1.7)-level/20;

I cant find the minimum formula yet though..
 
Last edited:
otfans.net/threads/120497-Code-for-generating-random-numbers-in-normal-distribution can be used to make distribution closer to real one but isn't perfect. Without strict it can generate numbers out of range and with strict minimal and maximal values will appear bit more often than min+1 and max-1 probably. But I guess its quite good
 
We want to get exact ones. The ones used in calculator also are just researched and probably not 100% accurate. And if they are we could just ask for them instead of researching
And take in count that we want to get also proper distribution, not only min and max values. And that needs ingame research(after getting formulas it can be probably done using one char and one spell only)
 
Why whouldnt you use Spell Damage Calculator to create formulas?

Because that "damage calculator" has made up numbers and all of its formulas are wrong. Does nobody understand? All somebody has to do is pretend they've done something and everyone is content. Im not content with their half-assed efforts.

--edit > tibia stats has decent formulas for strike spells! all others checked have been off.
@zak
Ill keep it in mind. Im not sure what kind of distribution tibia uses but I dont think it is a normal distribution. Well Im picturing a min at the left and max at the right edge when I say normal distribution, I assume we could limit it to one or two deviations.

I havent taken stats in a few years, I dont even know what im saying any more! xD

Ill spend time one day copying every value and its frequency to see, but today is not that day.
 
Last edited:
Well, after getting correct lmm formula we just have to waste at least 1k(someonoe wasting 100k of them to shoot at dummy would be great) of them on single lvl/mlvl set and them just loop formula to produce numbers and count it(it also can be scripted), them we can check if that code helps and try to find perfect parameter by plain bruteforce. If that would fail them we can try some another distribution(note that I'm not sure he this code generates exact normal distribution, if not we can try improving it)
 
Back
Top