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

Solved SkillsTries and cap Level Skill Fist

alejandro762

Well-Known Member
Joined
Sep 6, 2021
Messages
225
Reaction score
64
I Was trying to find the best Rate Stages on my server,
As i leave my paladin on trainers with spears , then i go to job.

When i come back i forget spears can break, then i see it was starting leveling up the Skill Fist Fighting on character, but something pay my attention that it was capped on level 3x, i start going Fishing, sword, axe, club.. It seems everything is ok but the Fist it looks like it's caped on certain level, but also the skillTries are lower than others skills.

After 2 hours looking the code i found that:

Lua:
uint32_t Vocation::skillBase[SKILL_LAST + 1] = { 50, 50, 50, 50, 30, 100, 20 };

uint64_t Vocation::getReqSkillTries(uint8_t skill, uint16_t level) {
    if (skill > SKILL_LAST || level <= 10) {
        return 0;
    }

    auto it = cacheSkill[skill].find(level);
    if (it != cacheSkill[skill].end()) {
        return it->second;
    }

    uint64_t tries = static_cast<uint64_t>(skillBase[skill] * std::pow(static_cast<double>(skillMultipliers[skill]), level - 11));
    cacheSkill[skill][level] = tries;
    return tries;
}

If im good:
Code:
skillBase[0] is Fist Fighting.
skillBase[1] is Club Fighting.
skillBase[2] is Sword Fighting.
skillBase[3] is Axe Fighting.
skillBase[4] is Distance Fighting.
skillBase[5] is Shielding.
skillBase[6] is Fishing.

Looking that i start editing something and compiling to check if skill can be separated from others and get more faster growing up, but with no result, something like this,

Lua:
if (skill == skillBase[0]) {
        // Trying very high multiplier...........
        tries = static_cast<uint64_t>(skillBase[0] * std::pow(static_cast<double>(50 * 2.5), level * 95));
    }
    else {
        // Existing on code..
        tries = static_cast<uint64_t>(skillBase[skill] * std::pow(static_cast<double>(skillMultipliers[skill]), level - 11));
    }

also replacing to skill == SKILL_FIST, but none of this have changed anything on the Skill Fist.

On Vocations.xml this seems to be not influencing on the skill,
Code:
<skill id="0" multiplier="1.3" /> // Tested 0.5 - 1.5 - 2.5 - 10.5 .............
        <skill id="1" multiplier="1.1" />
        <skill id="2" multiplier="1.1" />
        <skill id="3" multiplier="1.1" />
        <skill id="4" multiplier="1.1" />
        <skill id="5" multiplier="1.1" />
        <skill id="6" multiplier="1.1" />

Then finally, stages, that yes increase the speed of skillTries for every skill, including Skill Fist, but reaching the 30 - 31 it starts to growing like 0.2% each attack.
(Tested x3000 on stages).
But this is not the solution as Fist Fighting is more faster, but sword, axe, club and distance are even better faster than fist.

Looks like capped this skill, there is a way to do something and use it like a sword, axe, club, distance, etc skill ? Growing up same faster and getting more skill level ?

Thanks in advance


----

PS: Fixed, multiplier = "1.1" , if is higher or lower, doesnt work for fist i will start to be very hard.
 
Last edited:
Try this i use events/scripts/player.lua
need

rateSkill = 0 in config.lua


Lua:
local SkillsTable = {
  [0] = { --[[ SKILL_FIST ]]
    stage = {
      [{0, 15}] = 8,
      [{16, 20}] = 5,
      [{21, 30}] = 4,
      [{31, 40}] = 3,
      [{41, 50}] = 2,
      [{51, 110}] = 2,
      [{111, 300}] = 1
    },
    rate = configKeys.RATE_SKILL
  },
  [1] = { --[[ SKILL_CLUB ]]
    stage = {
      [{0, 15}] = 8,
      [{16, 20}] = 5,
      [{21, 30}] = 4,
      [{31, 40}] = 3,
      [{41, 50}] = 2,
      [{51, 110}] = 2,
      [{111, 300}] = 1
    },
    rate = configKeys.RATE_SKILL
  },
  [2] = { --[[ SKILL_SWORD ]]
    stage = {
      [{0, 15}] = 8,
      [{16, 20}] = 5,
      [{21, 30}] = 4,
      [{31, 40}] = 3,
      [{41, 50}] = 2,
      [{51, 110}] = 2,
      [{111, 300}] = 1
    },
    rate = configKeys.RATE_SKILL
  },
  [3] = { --[[ SKILL_AXE ]]
    stage = {
      [{0, 15}] = 8,
      [{16, 20}] = 5,
      [{21, 30}] = 4,
      [{31, 40}] = 3,
      [{41, 50}] = 2,
      [{51, 110}] = 2,
      [{111, 300}] = 1
    },
    rate = configKeys.RATE_SKILL
  },
  [4] = { --[[ SKILL_DISTANCE ]]
    stage = {
      [{0, 15}] = 9,
      [{16, 20}] = 6,
      [{21, 30}] = 5,
      [{31, 40}] = 4,
      [{41, 50}] = 3,
      [{51, 110}] = 2,
      [{111, 300}] = 1
    },
    rate = configKeys.RATE_SKILL
  },
  [5] = { --[[ SKILL_SHIELD ]]
    stage = {
      [{0, 15}] = 5,
      [{16, 20}] = 4,
      [{21, 30}] = 3,
      [{31, 40}] = 2,
      [{41, 50}] = 2,
      [{51, 110}] = 2,
      [{111, 300}] = 1
    },
    rate = configKeys.RATE_SKILL
  },
  [6] = { --[[ SKILL_FISHING ]]
    stage = {
      [{0, 15}] = 10,
      [{16, 20}] = 5,
      [{21, 30}] = 4,
      [{31, 40}] = 3,
      [{41, 50}] = 2,
      [{51, 110}] = 2,
      [{111, 300}] = 1
    },
    rate = configKeys.RATE_SKILL
  }
}


function getSkillsRate(level, skill)
  local skillRange = SkillsTable[skill]
  if skillRange and next(skillRange.stage) then
    for sLevel, multiplier in pairs(skillRange.stage) do
      if level >= sLevel[1] and level <= sLevel[2] then
        return multiplier
      end
    end
  end
  return 1
end

function Player:onGainSkillTries(skill, tries)
    if APPLY_SKILL_MULTIPLIER == false then
        return tries
    end

    if skill == SKILL_MAGLEVEL then
        return tries * configManager.getNumber(configKeys.RATE_MAGIC)  --use magic rate from config.lua
    end
    return tries * getSkillsRate(self:getEffectiveSkillLevel(skill), skill)
end
 
Back
Top