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

C++ Limit skills 254 -> how change uint?

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,188
Solutions
34
Reaction score
200
Hello, I use oldclient cip and nekiro source 1.3.
I'm using the fabians dll that removes the skills limit of 254 (of client), but I need to remove the sources limit as well (because when I enter the game, I get debugged).

where should i modify the sources to remove the skills / magic limit 254?
 
Solution
debug solved, but client only show "magic level" 255 (although the skill passes him).
Code:
17:18 You advanced to magic level 255.
17:18 You advanced to magic level 256.
17:18 You advanced to magic level 257.
but in skills show:
View attachment 53389

and another bug is skills (fist, club, sword, axe...) they are no more X value, even adding by '/addskill sword,....'
look one knight clubman, (is a new voc of my game, that he use club as best option) he cant get more ever skills:
View attachment 53388
There is a limit that you can't bypass until128-bit systems are available. It's not the skill level that is limited, it's the "exp" (skill tries) that is reaching 64-bit unsigned integer limit.
Since you didn't provide a link to the client modification, I'm just guessing the data type it uses.


Change msg.addByte to msg.add<uint16_t>
debug solved, but client only show "magic level" 255 (although the skill passes him).
Code:
17:18 You advanced to magic level 255.
17:18 You advanced to magic level 256.
17:18 You advanced to magic level 257.
but in skills show:
1609878245539.png

and another bug is skills (fist, club, sword, axe...) they are no more X value, even adding by '/addskill sword,....'
look one knight clubman, (is a new voc of my game, that he use club as best option) he cant get more ever skills:
1609878221200.png
 
debug solved, but client only show "magic level" 255 (although the skill passes him).
Code:
17:18 You advanced to magic level 255.
17:18 You advanced to magic level 256.
17:18 You advanced to magic level 257.
but in skills show:
View attachment 53389

and another bug is skills (fist, club, sword, axe...) they are no more X value, even adding by '/addskill sword,....'
look one knight clubman, (is a new voc of my game, that he use club as best option) he cant get more ever skills:
View attachment 53388
There is a limit that you can't bypass until128-bit systems are available. It's not the skill level that is limited, it's the "exp" (skill tries) that is reaching 64-bit unsigned integer limit.
 
Solution
There is a limit that you can't bypass until128-bit systems are available. It's not the skill level that is limited, it's the "exp" (skill tries) that is reaching 64-bit unsigned integer limit.
so the biggest skills he can achieve are those in the picture above?
what about the magic level that goes from 255, but only shows 255? where I need to change to show the real value.
Lua:
17:18 You advanced to magic level 255.
17:18 You advanced to magic level 256.
17:18 You advanced to magic level 257.
17:18 You advanced to magic level 258.
17:18 You advanced to magic level 259.
17:18 You advanced to magic level 260.
17:18 You advanced to magic level 261.
1609879963298.png
 
so the biggest skills he can achieve are those in the picture above?
what about the magic level that goes from 255, but only shows 255? where I need to change to show the real value.
Lua:
17:18 You advanced to magic level 255.
17:18 You advanced to magic level 256.
17:18 You advanced to magic level 257.
17:18 You advanced to magic level 258.
17:18 You advanced to magic level 259.
17:18 You advanced to magic level 260.
17:18 You advanced to magic level 261.
View attachment 53390
Skill tries are based on vocation skill multiplier (higher multiplier = more skill tries = reaching limit faster).
 
Hello, I use oldclient cip and nekiro source 1.3.
I'm using the fabians dll that removes the skills limit of 254 (of client), but I need to remove the sources limit as well (because when I enter the game, I get debugged).

where should i modify the sources to remove the skills / magic limit 254?
In vocation.cpp

This line define required mana for advance, in high levels they return sick numbers cuz of this std::pow thats mean "power"
uint64_t reqMana = std::floor<uint64_t>(1600 * std::pow<double>(manaMultiplier, static_cast<int32_t>(magLevel) - 1));
You can change it for exmaple:
uint64_t reqMana = static_cast<uint64_t>((100 * (magLevel * 2)) * (static_cast<int32_t>(manaMultiplier)));
And you will get soft advance in magic level, anyway u can try and combine other formulas...

And same for Skills
uint64_t tries = static_cast<uint64_t>(skillBase[skill] * std::pow(static_cast<double>(skillMultipliers[skill]), level - 11));
Change for example:
uint64_t tries = static_cast<uint64_t>(((skillBase[skill] - 100) + (level * 100)) * (static_cast<double>(skillMultipliers[skill])));
 
Edit protocolgame.cpp and protocolgame.h
msg.addByte(std::min<uint32_t>(player->getMagicLevel(), std::numeric_limits<uint8_t>::max()));

msg.addByte(std::min<uint64_t>(player->getMagicLevel(), std::numeric_limits<uint64_t>::max()));
etc for all skills
 
What does this " 11 " means?

std::pow(static_cast<double>(skillMultipliers[skill]), level - 11));
It's because skills start at 10, so the first advance is to 11. The formula goes as following: number_of_tries_for_first_advance * multiplier^(skill - 11). So it starts with power 0, then 1, 2, etc.

There is a limit that you can't bypass until128-bit systems are available. It's not the skill level that is limited, it's the "exp" (skill tries) that is reaching 64-bit unsigned integer limit.
It has nothing to do with the system. Do you think 64-bit integers were not a thing in 32-bit systems? It only depends on the compiler, and one could as well implement any n-bit integer type, just may be slower in processing.
 
It has nothing to do with the system. Do you think 64-bit integers were not a thing in 32-bit systems? It only depends on the compiler, and one could as well implement any n-bit integer type, just may be slower in processing.
Yeah, I was wrong, I recall that I actually googled about 128-bit integers and they do exist. Probably couldn't be bothered to even edit my post, meh.
 
Thanks, Kay.
Now, can I simply get rid of stageSkill and let just the overall rate in config.lua operate? And if so, would there be a problem since its a CreatureScript with Login functions? Will player not be able to join I mean...?
 
Back
Top