Enable the display of split combat levels, fix combat level colors
An October 15 2008 game update introduced PvP worlds, which are worlds where players can attack other players across much of the map. Included in this update was a change to the way combat levels are calculated and displayed:
We've changed the way your Combat level is calculated, so that PKers aren't discouraged from levelling Summoning. It seemed a bit unfair that Summoning increased your Combat level everywhere but couldn't actually be used everywhere. Therefore, your Summoning is now only counted into your Combat level if you have recently summoned a creature or held a Summoning pouch. When you log in, you will see that your Combat level has been split into two numbers (e.g. '75+6'). The first number is your base Combat level, and the second is the potential extra available from Summoning. If you're holding a Summoning pouch or have a familiar, this potential will be added on taking you to your full level.
For example, if you are level 55, this might be shown as follows:
- Without a familiar, a Summoning pouch, or having dropped a pouch recently: level 50+5
- With a familiar, a Summoning pouch, or having dropped a pouch recently: level 55
Similar information was added to a knowledge base article:
Why does my Combat level change sometimes?
Because Summoning is a Combat skill that cannot be used on free worlds, it will not show as part of your Combat level there. Equally, if you do not have a familiar out or a Summoning pouch in your inventory, your Combat level will show your additional Summoning levels separately (e.g. 50+5). If you have a familiar out, or have a Summoning pouch in your inventory, your Combat level will be displayed with the Summoning level included (using the same example, 55)
What have you done in this MR?
A split combat level (e.g. "50+5") will be displayed for a player when:
- The player is on a PvP world, and does not have a summoning pouch or a familiar summoned
- The player is on a world with wilderness PvP enabled, the player is in the wilderness, and does not have a summoning pouch or a familiar summoned
Players see their effective combat level in their combat style tab; in this case, a player would see "50" in their combat style tab.
A combined combat level (e.g. "55") will be displayed for a player in all other scenarios. Players see their effective combat level in their combat style tab; in this case, a player would see "55" in their combat style tab.
Additionally:
-
If the world is a PvP world:
- Display other players' combat levels in white if they are outside of combat range, or shades of green/yellow/orange/red if they are within combat range. Note that only the client-side code that determines the combat level colors used for a player would be affected by this change, meaning the colors will not align with which players can actually be attacked on PvP worlds. This also requires rt4-client!7 (merged)
-
If the world is not a PvP world:
- Always display other players' combat levels in shades of green/yellow/orange/red
-
Sync player appearance whenever a Summoning familiar is summoned or dismissed, or a summoning pouch is received or dropped, so the player's combat level is updated appropriately
Not implemented:
- The delay in combat level change if a summoning pouch has been dropped recently
- The use of split combat levels for Bounty Hunter
- Player appearance updates whenever their wilderness level/combat range changes. Currently, a player's combat level would not switch from white to green/yellow/red or vice versa as they move between wilderness levels without something else triggering a player appearance update
Player with a Summoning familiar (or a summoning pouch in their inventory) as seen by another player, and the player's own combat style tab:
Player without a Summoning familiar, and without a summoning pouch in their inventory as seen by another player, and the player's own combat style tab:
Are there any tricky things testers should keep an eye out for?
-
No -
Yes, as follows: -
I have tested these changes thoroughly. -
This requires extra testing due to changes to architecture or other similarly risky changes. -
I used the Thanos Tool for any JSON edits where possible, and have attached screenshots of any changes. -
I acknowledge that this contribution will be released under the AGPL license.
*** NOTE: If Gitlab complains about pipelines stating that you need to "Validate your Gitlab account" there is no need to worry. You do not have to do this and it is only occurring because OUR pipeline tried to run on your fork. While it's preferred that you do validate your account, you can safely ignore/dismiss this message from Gitlab. ***