TheStonedTurtle / Loot-Logger

A RuneLite plugin that stores Loot Tracker data locally
BSD 2-Clause "Simplified" License
6 stars 9 forks source link

Suggestion: add ability to manually set the current KC for entries with unknown total KC #21

Open delps1001 opened 4 years ago

delps1001 commented 4 years ago

For example, a player is able to determine their total KC for lizardman shamans via the in game NPC. It would be nice to be able to manually update the current KC for any NPC entry via the UI.

TheStonedTurtle commented 4 years ago

This plugin appends each kill to the log file, doing your request would require me to read the file to grab the last kill count and increment it. All other NPCs that have a KC label display the count via a chat message before the loot event is received and thus doesn't have this issue. I don't think this feature is worth all the potential bugs it could cause.

delps1001 commented 4 years ago

I’m not sure how this would cause a bunch of bugs... Basically you’d just have to keep track of a “base kc” for each NPC (default to 0 if a config entry doesn’t exist). Just add that base KC to whatever you previously were displaying and it’s all good. Also this has feature applications beyond lizardman shamans, it could be used basically for any other NPC that a player has had a prior KC for. For example, players that might have been hunting for champions cape NPCs, slayer monsters for drops, etc... basically it’s a catch all for players that might have discovered this plungin well into their grind on a given NPC.

TheStonedTurtle commented 4 years ago

I’m not sure how this would cause a bunch of bugs...

Maybe "bugs" wasn't the right word, there's just a lot of things I can see complicating this feature. People putting in KCs that are less than their kills logged. Increase in I/O operations potentially causing entries not to be written because of file locks or causing performance issues (already a concern for files with tens of thousands of kills). The value becoming desycned/incorrect for NPCs like Nechs, or Dest Devils due to the kills logged being inaccurate when barraging. (If you kill 3x dust devils you get 1x entry with the loot from all 3, this is a RuneLite Loot Tracker thing I can't change)

Basically you’d just have to keep track of a “base kc” for each NPC (default to 0 if a config entry doesn’t exist)

The problem is knowing what this "base kc" is each session for a given NPC. I'd have to read from the log file(s) to determine the base kc or use some other data storage like the RL config system. Creating this system to track KC for npcs between client sessions doesn't seem worth it for something that's ultimately just basic addition between 2 numbers.

I can see why having a KC offset that combines with Kills logged could be useful for these scenarios; I just think it's such a small feature that the energy spent ensuring it works correctly isn't worth the benefit it'd provide.

If you, or someone else reading this, wants to spend the time creating and testing this feature feel free to do so and create a PR so it can be merged into the plugin.

delps1001 commented 4 years ago

Fair enough, I’ll look into implementing it and put up a PR. I did look through initially and yeh I agree it’s a decent amount of work