-
Notifications
You must be signed in to change notification settings - Fork 14
Home
Tracks PvP performance by keeping track of various stats. Only useful for 1v1 PvP fights that involve overhead prayers and/or gear switching, Last Man Standing being the perfect example. Multi will cause problems. Potentially inaccurate outside of LMS (but generally fine, unless you're using a very uncommon setup).
1. Tracks if you successfully hit your opponent off-pray or not. For example, if your opponent is using protect from melee, you must hit him with magic or ranged for a successful off-pray hit.
2. Tracks deserved damage. Every hit, this looks at you and your opponent's current gear, and calculates average damage based on accuracy, max hit, & prayers. This does not track your actual hits in any way, it doesn't involve hitsplats.
3. Tracks damage dealt. Looks at hitsplats on both players and keeps a count of damage dealt.
4. Tracks successful magic hits. Looks at how many magic attacks you hit (as opposed to splashing), and how many attacks you deserved to hit.
5. Tracks successful offensive prayer usage. For example, using Rigour or Eagle Eye while ranging is a successful offensive prayer, but Augury while ranging is not. This data is only available for the client player, so opponents have no data.
6. Tracks HP healed during a fight. This includes all health restored: base regen, blood barrage, food, etc.. This data is only available for the client player, so opponents have no data.
7. Tracks ghost barrages and their deserved damage during a fight. This data is only available for the client player, so opponents have no data.
More in-depth details on all of these stats below. If you are using the plugin outside LMS, be sure to check the configuration and set the stats, ring, and crossbow ammo according to what's more likely going to be used.
Massive thanks to Mazhar, @maz_rs for collaborating with me on this plugin. He's inspired many of the ideas and helped with a lot of the implementation - deserved damage was mostly done by him, and that is definitely the most informative/valuable statistic of the plugin.
This plugin is created for the official RuneLite client only, so please refrain from contacting me for issues unrelated to RuneLite.
If you have any problems or questions that don't warrant a whole issue, feel free to contact me on Discord: matsyir
(don't add, just DM).
UI Overview (from 1.5.0):
The stats are displayed as such: "successful off-pray hits / total attacks (success %)". See the gif/video or panel for example. The success percentage will be green if it is the highest one. The success percentage is not a guaranteed way of determining if a player performed the best. It is a good general idea, but it is merely saying who hit off-pray more often than on-pray. You need to take into account weapons' attack speeds, total number of attacks, and armor used while attacking to get the full picture, but nonetheless this is a helpful metric to have. Combined with the deserved damage, we can pretty much figure out who performed better.
I can't guarantee accuracy for use outside of LMS, because of the way attack styles are determined: that is by checking the Player's current animation. There are definitely a few random weapons I still haven't thought about that won't be included. But I am confident it will work in over 90% of cases, since people tend to stick to fairly common pking loadouts. Thankfully, most weapons AnimationIDs are re-used (e.g all normal scim slashes share one animation, crossbow is same with all bolts). Due to this, loads of weapons I haven't even tested are supported.
It would take forever to make a nicely formatted list of these, and on top of that many weapon animations are re-used, so more than I know are supported. Check out the variable names & comments in this file for a full breakdown of supported weapons/what I've tested. All LMS gear should be supported, as well as general popular pking gear, including some less common weapons like anchor, the 4 godsword specs, revenant weapons, dmace, etc. Basically all F2P weapons should be supported as well but I don't think this would be useful for F2P. There are surely some uncommon but relevant weapons or specs I forgot about so feel free to submit those as an issue if you notice it in a fight, or not mentioned in the file.
This directly takes all of you and your opponent's gear, calculates the total stats, and gives you an average damage value, using OSRS accuracy/damage calculations, depending on opponent's gear, pray, if you're using a special attack, among other factors. It does not involve hitsplats in any way, does not look at actual damage dealt. It only calculates average "deserved" damage, and displays the cumulative value for that fight and the difference with the opponent. For example, if you've dealt 3 attacks, granting 14, 9, and 12 damage respectively, you'd have 35 total deserved damage. If your opponent had 40 damage at the time, your deserved damage would be displayed as "35 (-5)".
Currently, it does not check for offensive prayers. It assumes that you always use the right offensive prayer, and it assumes that you are using one of the 25% prayers for defence, but not augury while getting maged, since you would more likely be trying to range/melee at that time. We could detect the player's offensive prayer, but not the opponent's. To make that fair, we use equal estimations for both players, and the inaccuracies should be handed out evenly.
This also is not 100% reliable, but it too should work in the vast majority of cases. This component is able to retrieve item stats dynamically, from cached wiki data, for the vast majority of relevant items. Some very obscure items won't have stats. One problem is bolts/ammo, we can't detect which are used, so there are configs to choose which ones are used for the estimations. Another is rings, we can't detect that either. Base spell damage also needs to be hardcoded based on animation, which is not completely possible since animations are shared between different spells. However, all other melee gear stats or general range/mage gear stats can be automatically retrieved and used for damage calculations.
The damage calculations were taken from a variety of sources, including but not limited to, the official osrs wiki, Bitterkoekje & Koekenpan's dps spreadsheet (as well as some direct knowledge from them, big thanks!), a remake of Bitterkoekje's old combat formulas thread, QFC: 317-318-461-66138854
. The damage calculations can be found all across this file. Range Ammo Data is in this file.
Stats are currently fixed for both the player and opponent, they can be changed from the config, but the default stats are currently potted max main stats: 118 Attack/Strength, 120 Defence, 112 Range, 99 Magic
All weapon & gear stats are loaded dynamically. The exceptions to this are stats for rings and ammo (bolts/arrows), and base magic spell damage. We can't detect what bolts/rings are used, and we must manually hardcode all base spell damage. Special attacks with damage or accuracy modifiers also have to be manually hardcoded.
- Dragon Claws
- Dragon Dagger (all variations)
- Armadyl Godsword
- Vesta's Longsword
- Statius' Warhammer
- Voidwaker
- Osmuten's Fang
- Dragon Warhammer (only the damage boost, not the def reduction)
Ammo is either specified in config, or assumed. In LMS, for crossbows, ammo is forced to be regular diamond bolts (e) or opal dragon bolts (e) depending on weapon used. Bolt specs assume no diary completion. Antifire potions & anti-dragon shields are never taken into account for dragonfire bolts, if chosen.
- Rune Crossbow [config ammo]
- Dragon Crossbow [config ammo]
- Armadyl Crossbow (w/ spec) [config ammo]
- Zaryte Crossbow [config ammo]
- Dragon Hunter Crossbow [config ammo]
- Blowpipe [config ammo]
- Light Ballista [Dragon Javelins assumed]
- Heavy Ballista (w/ spec) [Dragon Javelins assumed]
- Dark Bow (w/ spec) [Dragon Arrows assumed]
- Magic Shortbow [Amethyst Arrows assumed]
- Magic Shortbow (i) [Amethyst Arrows assumed]
- Craw's Bow [Ammo bonus built into weapon - fixed ammo stats]
RCB Ammo config options:
- Runite Bolts
- Diamond Bolts (e)
- Dragonfire Bolts (e)
ACB/DCB/DHCB Ammo config options (includes RCB Ammo):
- Diamond Dragon Bolts (e)
- Dragonfire Dragon Bolts (e)
- Opal Diamond Bolts (e)
Blowpipe Ammo config options:
- Adamant Darts
- Rune Darts
- Dragon Darts
Based on animations, which are re-used for many spells, so can't be fully accurate. Other sets of spells could be added but it's tedious. Submit an issue if you'd make use of more.
- Ice Barrage (Any multi-target ancient spell will use ice barrage damage - yes, even smoke burst, can't currently differentiate)
- Ice Blitz (Any single-target ancient spell will use ice blitz damage)
- Fire Surge/Wave/Blast (Any elemental variant will use fire, and fire strike will be treated as fire blast since they use the same animation)
This is very straightforward, it is actual damage dealt, looking at hitsplats. This should be completely reliable, even if the attack animation is unknown. The only thing that would cause this to fail is if the player runs far enough so that they aren't rendered at all while they get hit (and you never see the hitsplat). It is displayed with the difference compared to the opponent, similarly to deserved damage.
This tracks how many magic attacks you successfully hit, in other words, attacks where you don't splash. It also tracks your magic accuracy every magic attack, and saves "deserved" number of successful magic hits. The "deserved magic hits" number is effectively a cumulative total of your accuracy(0-1) every time you use magic. The stats are displayed as successfulHitCount / totalMagicAtkCount (luck%)
. You can find the number of "deserved hits" on the tooltip (when hovering over the statistic). The luck percentage works as such:
- 100%: expected luck/RNG
- Above 100%: lucky (more successful hits than deserved). 200% = hit 2x more than deserved.
- Under 100%: unlucky (less successful hits than deserved). 0% = every attack splashed, didn't hit once.
So for example, if you have 12/15 (133%) as this statistic, then you successfully hit 12 of 15 attacks, and you got more than you deserved meaning you were lucky. You deserved to hit 9 (this would be on the tooltip, or feel free to check the formula for it below).
The percentage is calculated as: (successfulHitCount / deservedHitCount)
. Or the deservedHitCount can be derived from (successfulHitCount / luckPercentage)
.
Bare in mind that the accuracy is calculated the same way as in the Deserved Damage statistic, this means it also suffers from the same imperfections. Namely, Augury is always assumed to be enabled while casting, and never used while getting hit. This can make your magic hit stats appear overwhelmingly unlucky, if your opponent often uses Augury defensively, or if you don't consistently use it while casting. This can be fixed by using the Fight Analysis/Merge.
This tracks how many offensive prayers you got successfully. Displayed similarly to successful off-pray attacks: successfulOffensivePrayerCount / totalAttackCount (success%). This data is only available for the client player, not opponents.
The following offensive prayers are tracked:
Melee: Piety, Ultimate Strength
Ranged: Rigour, Eagle Eye
Magic: Augury, Mystic Might
This is also straightforward to use, this feature tracks all increases in the main player's HP level during a fight and saves the total health restored during a fight, including regen from all sources.
Tracks ghost barrages and their deserved damage during a fight. This data is only available for the client player, so opponents have no data. A ghost barrage is when a player casts barrage without any animation, so it's an invisible barrage. They happen under specific pid-related conditions, so they're especially a problem in duel arena where pid doesn't change. This statistic is likely not very relevant, unless you participate in high-level fights at duel arena. This statistic assumes any magic xp without a magic attack animation to go with it is a barrage, so it isn't accurate if you aren't actually using barrage.
When you click on a fight, it will open up a new window displaying a table of all attacks dealt during the fight for both players, including as many details as possible like attack style, minimum/maximum hit, accuracy, average hit, was it a special attack, was it off-pray, etc. This should be relatively straightforward to use if you want to.
If you click on any row within this table of attack logs, it will open up a new window with detailed information about each attack, including gear, prayers, detected animation/combat style, and stats (although, unless using the fight analysis, stats will always be the config's stats, or detected LMS build stats)
This occasionally has invalid results, be wary of the results. If the total number of attacks in the merged fight is equal to the total number of attacks in the initial fight, it should be good.
This panel is used to merge two opposing fighters' fight data in order to get more accurate stats about the fight, since some data is only available client-side. Both data entries should come from the same fight, but from two different clients.
- Step 1: Select the right click option "Copy Fight Data (advanced)". This will copy the data to your clipboard. Note that for the right click options to appear, you must right click an area without text.
- Step 2: Send data to opponent via whichever messaging/file transfer platform you prefer.
- Discord message info: Unfortunately, the fight data will most likely be over 2,000 characters, so it can't directly be sent as text on Discord. However, Discord supports attachments, and pasting the data in Discord will instantly put it into a text file which can easily be downloaded and copied. This is the most convenient way. You should be safe from malicious files as long as you only open text files in text editors. If you're comfortable with that, then the following image is fine, just upload. If random text files scare you or your opponent, I would recommend using pastebin.
- Step 1: Open the fight analysis panel
- If you want to merge one of your fights, you can right click the fight and open the Fight Analysis panel with your data already filled in. If you didn't participate in the fight, you can find the same right click option on the "Total Stats Panel" at the top. You won't get right click options if your mouse is hovering over the text/stats, you need to be on empty space in between.
- Step 2: Fill in both fight data fields, and click the merge button.
Voila! The fights should be merged if the data was valid and came from the same fight, from two clients as expected.
When using this, the following stats are applied to deserved damage & deserved magic hits:
- Offensive prayers, instead of always being correct
- Boosted or drained levels (e.g from brewing down), instead of using config stats
- The magic defence buff from Augury, instead of assuming Piety/Rigour while getting maged (if you have augury enabled, you get 1.25x magedef & def, and 1.25x def otherwise)
- Occasionally, certain attacks won't be counted, since their animation will be cancelled/stalled and the attack will go undetected. Since attack styles are currently determined using animations, I don't think it's possible to fix at the moment. This is uncommonly seen with Ice Barrage, and very common when using darts on rapid. You can notice this happen if you attack, but don't see any changes to stats (except damage dealt, which does not rely on animations). It's rare enough that it's not too significant of a problem.
- Double deaths are not tracked. This can be fixed using the onPlayerDeath event - it's changing how the existing code works around deaths that is tricky.
- There is no attempt to support multi at the moment, but I would assume it works to a certain extent, on 1 opponent at a time.
- Attacks before both players attacked each-other are not saved. This is an unintended consequence of preventing unrelated interactions during a fight being interpreted as getting a new target/starting a new fight. (2021/01/19 update: This may have accidentally been fixed at some point, I haven't seen it in a while, but I'm not sure)
Not because they can't work, simply because I don't have their AnimationIDs.
- Nightmare staves: Only the Volatile Nightmare Staff is currently supported.
- If the plugin isn't working and fails to launch or create the panel, go to the config, hit "Reset", and then turn the plugin off and on again. This should resolve any data-related problems.
- If you get lag spikes upon a fight ending, it will help to reduce the limit in the config, or reset your fight history (by right-clicking the total stats panel).
This plugin is created for the official RuneLite client only, so please refrain from contacting me for issues unrelated to RuneLite.
If you're switching PCs or use multiple PCs and would like to include your fight history in both clients, you'll need to manually import it, since it is only saved on the initial PC. Here's how:
- On your initial PC where you have stats saved, right click the total stats panel, click "Copy Fight History", and that will copy the data to your clipboard.
- Paste the data into a text document and save that to the cloud where you can access it from your new PC, or transfer files however you prefer.
- On your new PC, right click the total stats panel and click "Import Fight History", paste the data, and press OK. The data should be imported from there and added to any existing stats.
The data is saved in this file: %userprofile%/.runelite/pvp-performance-tracker/FightHistoryData.json
- you may also replace this file entirely, this would be easy if you use FTP on your network.
Dates are in yyyy/mm/dd
- 1.5.11 [2025/02/22]: Fix: properly track deaths for players using alternative death animations, like the leagues ones. (Thanks to @Macweese for this fix!)
- 1.5.10 [2024/11/03]: Add common pvp rings, as well as support for varlamore weapons & venator bow (Thanks to @Macweese for these fixes!)
- 1.5.9 [2024/08/23]: Minor fix for a major bug: Plugin was unavailable due to the itemID offset changing from 512 to 2048, and we were still using hardcoded values. Old/existing fight data was not yet migrated, but should still persist so it can be updated/migrated in a future update.
- 1.5.8 [2024/01/16]: Minor fixes to adapt to new RuneLite APIs. "Flatlaf fix". Thanks to @YvesW for this fix!
- 1.5.7 [2023/04/21]: Decently major fixes: Voidwaker spec support, DWH spec support (damage boost only, not def reduction) Support opal dragon bolts(e) in LMS for stronger cbows. Viggora's chainmace & Inquisitor's mace tracking (coded awhile ago but never updated). Thanks to random LMS lobby/bank players 'DannyMaulz' & 'ELL Cucuy' for helping me test the voidwaker spec before release.
- 1.5.6 [2022/09/18]: Decently major fixes: Osmuten's fang support (attacks & spec, thanks to Mazhar for this), adjusted opal & diamond bolts (e) accuracy increases since they were using PvM values, support newly added LMS items, detect LMS stats based on build type. Data format changed and was updated/migrated.
- 1.5.5 [2022/08/03]: Minor fix: RuneLite update broke the plugin, updated HitsplatType to HitsplatID. No actual changes. Thanks to Mazhar for this PR.
- 1.5.4 [2022/04/27]: Minor fixes: Actually Fix Zaryte Crossbow this time, it had no bolts assigned to it so while the animation was detected from 1.5.3, it was being used with 0 range strength. (really gotta test these lol, but I don't own a ZCB). Thanks to Mazhar for this PR.
- 1.5.3 [2022/03/22]: Minor fixes: Fix Zaryte Crossbow animation detection, only the PvM animation was included; PvP uses different animations for crossbows.
- 1.5.2 [2022/03/18]: Track Zaryte Crossbow animation (no spec or passive, this also failed until 1.5.4), track Ancient Godsword spec (assume +25dmg from effect), fix Trouver Parchment Void detection.
- 1.5.1 [2022/01/06]: Minor fixes: Fixed a visual bug related to how AGS specs' max hits were stored, include LMS lobby in "restrict to LMS" setting
- 1.5.0 [2021/11/08]: Added client-side ghost barrage detection, improved TotalStatsPanel, and various other UI/tooltip improvements. Fixed new fights being shown in the fight history panel if they didn't respect the name filter.
- 1.4.8 [2021/09/22]: Added name filtering on the fight history panel, to only show fights with certain usernames.
- 1.4.7 [2021/08/08]: Fix dlong special attack animation detection, for the dlong=vls feature added in 1.4.6. It wasn't flagged as a spec, so VLS spec never happened either.
- 1.4.6 [2021/08/06]: Fix crystal armor max hit boost (was improperly calculated/applied in the wrong place). Track Dragon Longsword as Vesta's Longsword for DMM practice purposes (and no one really uses dlong anyways, but it can be toggled off). Also fixed void, noticed an issue with it while fixing crystal armor - it wasn't detecting the itemIDs properly so the dps calc never knew you had void on.
- 1.4.5 [2021/07/18]: Significant fixes: fix bolt detection outside of LMS - crossbows better than RCB have been mistakenly using regular diamond bolts (e) outside of LMS since the 1.4.1 update, regardless of config. Fix tome of fire detection/max hit buff for Fire spells. Added the Varrock LMS map to LMS detection.
- 1.4.4 [2021/07/10]: Minor fixes/additions: Added new "Max Rendered Fights" option to limit amount of shown fights in the Fight History panel, so that you can save more fights for Total Stats without the lag that comes with it. Also added support for crystal armor buffs on new fae bow & cbow.
- 1.4.3 [2021/03/18]: Minor fixes: fixed a UI issue where text on the TotalStatsPanel would overlap and make no sense, also clarified the "config warning" label.
- 1.4.2 [2021/02/01]: Added ability to drag & drop files into the fight data input (for fight analysis), rather than having to copy-paste. Fixed visual bug with fight merge Fight Log order, fixed/updated TotalStatsPanel.
- 1.4.1 [2021/01/25]: Minor updates regarding the previous update, mostly UI improvements. Re-formatted "Magic Hit Luck" formatting, so 100% is the expected/neutral luck, rather than 0%. Fights started in LMS will always use LMS levels/ring/bolts regardless of config, so you may freely set your config without taking LMS into consideration, and when going back to LMS it will use the proper config.
- 1.4.0 [2021/01/20]: Pretty big update, but not much for average users: added fight analysis/merge, Fight Log Detail panel, option to copy fight as Discord msg, changed "Magic Hit Luck" formatting.
- 1.3.5 [2021/01/13]: Added HP healed statistic, "config warning" to make sure users acknowledge that there is a config, and saved more data for an upcoming feature.
- 1.3.4 [2020/09/18]: Minor fix: There was a bug where if you or another player attacked anything after interacting with each other (by following, trading, teleothering, etc), the plugin would assume you started fighting them and track your attacks as a fight against them. There was a check put in place to prevent this from happening.
- 1.3.3 [2020/09/15]: New statistic: offensive prayer tracking (for the player only). Fixed a bug that triggered a modal on initial load/installation, and removed that modal entirely since even when working as expected it could have odd behavior during client load on Mac. Also added config sections to make the config more intuitive/less cluttered.
- 1.3.2 [2020/05/12]: Minor changes: Stopped using config storage to store fight history data and logs. This means the data won't automatically save across different PCs, but you can achieve that with the import/export functionality. It also means many more fights can be reliably saved, and the data should never get corrupted with normal use. Also added void, tome of fire, and smoke battlestaff buffs to deserved damage.
- 1.3.1 [2020/05/08]: Minor fix: for some users, the fight history data was corrupted and was unable to be loaded, causing the plugin to be unable to launch. This was changed so the data should automatically get reset if it fails to be loaded, allowing users to continue using the plugin.
- 1.3 [2020/05/02]: Two new stats: damage dealt, magic hits 'luck', and the fight log which displays all attacks in a table. Config additions and various other minor improvements
- 1.2 [2020/04/19]: Significant fix: special attacks outside of LMS were not detected since we were only checking for LMS-specific ItemIDs
- 1.1 [2020/03/30]: Major fix: Deserved damage was making calculations with gear from 1 tick in the past, so it was invalid. Now fixed
- 1.0 [2020/03/25]: New statistic: Deserved damage, save fights across restarts, various optimizations
- 1.0-SNAPSHOT [2020/03/13]: Basic initial release: Off-pray stats only - with overlay & panel
I am happy to see other features/stats come into this plugin in the future, feel free to submit issues/suggestions & PRs. If you find a weapon that doesn't work, let me know as well. If you have any problems or questions that don't warrant a whole issue, feel free to contact me on Discord: matsyir
(don't add, just DM - if you need a common server to DM, join the official Runelite discord).
Note that I'm not super active on RS lately myself, so this project is not among my highest priorities - but I'm happy to keep supporting it, especially for significant issues that may affect most average users with average gear setups in places like LMS.