TheStonedTurtle / banked-experience

A RuneLite plugin used to calculate the experience you have banked
BSD 2-Clause "Simplified" License
15 stars 44 forks source link

Incorrect average xp/plank values for Mahogany Homes #119

Closed FrogTheSpy closed 1 year ago

FrogTheSpy commented 1 year ago

Was noticing that I was consistently losing xp potential over hundreds of Mahogany Homes runs, and by comparing the wiki values to the plugin, I noticed that the average XP per plank calculated in the plugin is flat out incorrect. If I'm not gravely mistaken, average XP per plank should be calculated as "Avg. planks per contract/Avg. xp per contract".

Using this, the average XP per: Normal plank = 87.40xp (879.3/10.06), NOT 93.65xp. Oak plank = 187.72xp (1894.1/10.09), NOT 200xp. Teak plank = 280.32xp (3260.2 / 11.63), NOT 287.85xp. Mahogany plank = 340.76xp (4378.8/12.85), NOT 346.12xp.

Errors like this makes you miscalculate how many planks you need for a specific level.

_As per values on, without the construction outfit: https://oldschool.runescape.wiki/w/Mahogany_Homes#Sawmill_only_

TheStonedTurtle commented 1 year ago

I went with the table at the top of https://oldschool.runescape.wiki/w/Mahogany_Homes#Experience_costs which has it specified as (roughly) these values (it must have changed since I originally added the activities)

image

I think the issue here may be that Steel Bars give an amount of experience that would affect the calculations in that bottom chart, but I'm not actually sure. As for which values are actually right (or at least more accurate) I'm not actually sure. I'd prefer if the wiki team could rectify this discrepancy on the page, but that's the main issue with things that don't have a set exp rate per resource (like SGM).

I believe that the way it is currently where the xp values I'm using match what the wiki says is the average per plank is the "right" way to do it. I do not want to explain to people how I got this 87.40 value when the wiki states 93.7 as the average per plank.

TL;DR: I'm not against changing this but as it is now it's based off what the wiki has defined as the Average XP/Plank. If this value is inaccurate that is something the wiki team should fix and I will follow suit.

I'd say join the OSRS Wiki Discord and have them look into why you can get different values for each method.

TheStonedTurtle commented 1 year ago

Based off your experience I would assume that your method of calculating is more accurate (if it matches what you experience in game) but the wiki should have way more data than just you so hopefully they can come to a real answer here.

SeaifanAladdin commented 1 year ago

I was pretty involved 6 months ago with the calculation of the average exp before I stopped playing. I made contributions here and on the wiki. I may be able to provide some background.

The calculations of the average exp per plank is based on crowd sourcing data collected early 2022. I have used the crowd sourcing data to calculate the average xp per plank, and average exp per completion. https://docs.google.com/spreadsheets/d/1573_E5suKS7OY2E3utGpBkuaReiF86hTh0p8PLqi2II/edit#gid=985761700

If you want to do a deeper dive, feel free to review the spreadsheet. The wiki conversation on the mechanics of mahogany homes can be found here.

In your calculations, you took the average exp per completion and divided it by the average number of planks. However, the average exp per completion includes the bonus completion xp.

What we need is to get the average completion xp per plank. The average completion xp per plank is not completion xp divided by average number of planks. To calculate the average completion xp per plank, we need for each layout, the completion xp per plank. and then we take the average.

for example, lets say there are 2 layouts. layout 1: 9 planks, 500 completion xp layout 2: 11 planks, 500 completion xp.

Because the average plank is 10, you would think the average completion xp per plank is 50.

However, we need to go through each layout to calculate the average completion xp per plank . layout 1 : 55.55 xp layout 2: 45.45 xp

average completion xp per plank = (55.55 + 45.45) / 2 = 101/2 = 50.5xp

Edit: For each layout, you can also calculate the total xp divided by the number of planks. We could then take the average per layout.

It is a simpler calculation method, but I decided to not go through this approach as the equation i used allowed calculating with the any pieces of carpenter outfit. Either way, the math is the same, and I have cross verified both calculation methods.

FrogTheSpy commented 1 year ago

SeaifanAladdin, thanks for the insight and correction. I've been smashing my two remaining braincells together for a few hours trying to figure out what could be wrong, but it seems like the current data and calculations are correct. Even though I experience a slight and consistent drop in potential XP, I can't prove it via math.

Closing issue.