visua0 / Melvor-Idle-Combat-Simulator-Reloaded

A browser extension for the game Melvor Idle
GNU General Public License v3.0
54 stars 23 forks source link

Add metric for drop or kill rate accounting for rune/ammo crafting #60

Closed giewev closed 2 years ago

giewev commented 2 years ago

Sometimes when comparing which enemy is the best to farm, or which spell is best to use, I have two options: A: Use a large amount of runes per hour, and get a large amount of drops B: Use a smaller amount of runes per hour, and get a smaller amount of drops

e.g. A: use ancient spell and 25k runes/hour, and get 100 kills/hour B: use an elemental spell and 10k runes/hour, and get 80 kills/hour

It's hard to compare these situations without pulling the numbers out and doing some manual math If we had the option to provide an approximate time cost for rune crafting, these values could be calculated right in the plugin.

e.g. if we say we can craft 40k runes/hour, then we get adjusted rates of A: 100 / (1 + (25 / 40)) = 61.5 kills/hour B: 80 / (1+ (10 / 40)) = 64 kills/hour

And we get a more clear answer about which is more efficient. This should be applicable in the same way for bolt/food/prayer usage as well

If you can point me in the right direction I can try to implement a pull request myself.

gmiclotte commented 2 years ago

Hello

I'll look into adding this soon, it's been requested many times now.

Regarding the right direction, I'm thinking along these lines:

But I'm probably missing some things, and not all the code is as well structured as it should be, so these directions might not make much sense on their own :stuck_out_tongue: but no worries, I'll look into adding it.

gmiclotte commented 2 years ago

Implemented this in v1.5.8, let me know if you think it needs some polishing. Thanks !

giewev commented 2 years ago

I think that there are some missing input fields for me or something? This is in chrome.

ResourceRate_Missing_UI

gmiclotte commented 2 years ago

By default it only shows the input fields that are relevant for your current setup, so if you enable prayer it should show an input field for prayer points, if you select a spell it should show input fields for runes, etc.

However, with the "Show All Consumables" toggle, you can show all the input fields at once.

giewev commented 2 years ago

Oh I see now. I haven't tried to verify the math or anything, but I think it's calculated backwards or something. When I turn on apply rates the kill time goes down and kills/hr goes up

Applied_Rates No_Rates

gmiclotte commented 2 years ago

Oh yeah nice catch, looks like kph and kill time were indeed scaling the wrong way, xp/gp/drop rates should be fine though. Should be fixed in 1.5.10, thanks !