Another Contribution to My Favourite Project

Another week, …the same project! I contributed another improvement to Runelite earlier today, and this time, I actually got a response! Last week I contributed a feature that would allow players with poor eyesight to quickly identify items in their inventory. This time however, instead of adding a feature I fixed a bug in the client.

The bug issued was one of the tool tips in the client not showing the requirements a player needed in order to level up to the maximum level. In RuneScape players have a variety of skills that can be leveled from 1-99, once you hit 99 you can no longer level up and are capped out essentially. A player’s total combat level which could reach a maximum of 126 (126.1 for precision) with a series of calculations of based off the players skill levels which can be found here.

This player who happened be level 125 had already maxed out certain skills and the only ones that remained under 99 were his “Defence” at 97 and “Prayer” at 94. The tool tip showed the player how many levels they needed of a certain level in order to level up, for example: 2 Strength levels OR 3 Defence levels OR 4 Prayer levels to level up. The issue however was that in order to reach a level of 126 the user would need to achieve these levels:

Attack/Strength needed: 3
Defence needed: 4
Ranged needed: 35
Mage needed: 35
Prayer needed: 8

All of these values would have put the player over 99 levels in any skill which is impossible, therefore, the tool tip would refuse to render any value and would stay blank.

I initially fixed this by swapping the tooltip to work from an OR system to an AND system in the commit found here, which would display all the needed levels to level up. Adam-, the maintainer of the project, though, said he would prefer to see values that went over the 99 limit detailing what the player had to achieve as when they leveled the skills ups the values would both adjust accordingly. I agreed with his proposal and changed the logic of the tool tip once more in the commit found here. I’m happy Adam reached out because I like his solution a lot more and its much cleaner than my initial switch to an AND system for a single level. So far, there hasn’t been any more communication but the fix is operational and should hopefully be merged soon.

This contribution was a little interesting to wrap my head around when playing with the different outcomes of a player’s skills to see what becomes of their combat level to fix this bug but luckily I didn’t have to do too deep of a dive into their API to figure it out.

Also I would have liked to shown some screenshots of my bug fix but I don’t have a character at that level so it would be meaningless, you just have to trust my math 😉

Thanks for reading!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: