Players gain magic level 4 times as fast as in real Tibia, because mana required to go from magic level 0 to 1 is incorrectly set to 400:
https://github.com/otland/forgottenserver/blob/bcb86eac0655c58b8dc9a35c652f8953a0edd033/src/vocation.cpp#L207
The correct value is 1600 (source: http://www.tibia-stats.com/index.php?akcja=skillCalcMagic)
Issue can be easily reproduced by spending some amount of mana on a character with magic level 0 and comparing the progress to the values from tibia-stats.com (and of course taking rateMagic from config.lua into account).
If you really are sure that's the intended value for such constant than you could open a pull request.
I've just made sure 1600 is the correct value by making the following test in real Tibia:
1600 * (1.1)^5 = 2576.816Did you make sure you had exactly 100.00% to go by verifying your magic level percentage on Cyclopedia -> Character -> Magic? If so, it makes sense, and you should open a PR.
By the way, did you check other vocations too? to make sure their magic level multipliers are still correct with this new 1600 constant.
Actually I haven't thought about using Cyclopedia (forgot that more detailed info about skill progress is there), but my test should ensure this was exactly the case. Although I can confirm that after reaching magic level 6, it is indeed 100.00% to go according to the Cyclopedia.
Anyway, even if I were to be off (but I really don't think this is the case), it would be by 1 or 2 mana – not by 1200.
I also haven't checked other vocations, but exactly the same magic level multipliers are used on tibia-stats.com and if they calculate required mana for sorcerers properly (even rounding is correct), I think it's safe to assume they got other vocations right, too.
This test has also proven that the following way of rounding (to the nearest multiple of 20)
https://github.com/otland/forgottenserver/blob/bcb86eac0655c58b8dc9a35c652f8953a0edd033/src/vocation.cpp#L207-L216
is incorrect, so that's another thing which should be fixed. Although it's of course much less significant than the main bug. Unfortunately I don't know how _exactly_ it should be rounded (my guess is it's simply rounded down to the nearest integer?), so if I were to open a PR, it'd only fix the bug stated in the title.
Yeah, it'd be okay to open a PR to fix just the main issue so that this can be closed as soon your PR is merged. Then you can open another issue detailing the second problem so that it can be easily tracked and probably fixed by someone.
BTW, when did you test this? was it without any skill event bonus?
I tested it just before posting about the results. There weren't any skill events today (May 7).
As far as the PR goes, I'll open it soon (within 24 hours, most likely).
Most helpful comment
I tested it just before posting about the results. There weren't any skill events today (May 7).
As far as the PR goes, I'll open it soon (within 24 hours, most likely).