H4waiianPunch / Pearl-Luck-Tracker

Tracks the number of fish caught while Aerial fishing since your last Molch Pearl drop.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Show custom Molch Pearl chance #7

Open Koslas1 opened 1 week ago

Koslas1 commented 1 week ago

Maybe have a config option to show the droprate you have for a molch pearl? Which the current equation is to work that out is 1 / (100 - ((X - 40) 25 / 59)) Where X = (FishingLevel 2 + HunterLevel) / 3

This would be something like how the maths works for it, I'm unsure how to do some things, such as pulling fishing levels and hunter levels from RuneLite

`public class DropRateCalculator {

public static void main(String[] args) {
    int fishingLevel = // Get Fishing level from RuneLite
    int hunterLevel = // Get Hunter level from RuneLite

    double X = (fishingLevel * 2 + hunterLevel) / 3.0;
    double dropRate = 100 - (((X - 40) / 59) * 25);
    int roundedDropRate = (int) Math.ceil(dropRate);
}

} `

And now make a setting in the config if you want to show the droprate or not, and update the fishingLevel and hunterLevel if possible when leveling up. Then if the setting is enabled show something in the overlay like Pearl Droprate: 1/ roundedDropRate

H4waiianPunch commented 6 days ago

Hmm, looks like you did a good bit of the heavy lifting there for me which is great!

I'll look to do try this over the weekend and see if I can't get it working. I like it as being a config option to show or not as well.

Koslas1 commented 6 days ago

Another suggestion which you could add as config options aswell, since you're obviously keeping track of the amount caught, because of the tench chance, since you have the worst dry streak (Mine was 329 when I was using it earlier and I worked out my drop rate to be 1/79 😥) you could maybe even have a best streak (Which mine was 2) and then fish caught / pearlsGained for your average rate so if I caught 2,200 fish and gained 32 pearls with that bad dry streak and also the good streaks I was getting a pearl on average of 1/68.75 catches, therefore I was actually a bit luckier than the 1/79 droprate, and preferably having these options to be enabled/disabled in the settings. Aswell as maybe even making the last caught, and worst dry streak as options so if I wanted I could just see my best and worst streaks, or just my average rate etc. But so far with me using it, I do love the plugin already, thanks for making it, I wouldn't know where to start with it.

And I mainly gave you the example before so you had the correct maths (Which is from the wiki, quoted from a Mod Ash Tweet)