Figuring out algorithm/formula for item scaling in WoW

I am trying to figure out the algorithm/formula for item stat scaling in WoW. If you play in battlegrounds or arenas, your item's stats increase to the highest possible level in that bracket. So if you're level 10 your items will be boosted to level 19 in that bracket. 20 will be 29 and so on.

I have an example here:


This item is level level 20 and has 10 armor, 7 agility, and 7 stamina. When you join the arena or battleground, it will increase to this:

I am trying to figure out this algorithm/formula, so I can enter any item's item level and stats, which will then figure out the stats when in a battleground or arena. How would I approach that? I've tried a few isolation equations, but it won't really work :( Thanks in advance!


Solution 1:

The best method I can think of to determine the scaling factor is by using a piece of heirloom gear since it scales at every level, giving you the most datapoints to use when calculating the scale factor; this is of course assuming the factor is the same for the pvp scaling as it is for the heirlooms.

The good news for this method is that for a given piece of heirloom gear you can bring it up on www.wowhead.com where there is a drop down to change the level you are viewing it at.

The hard part here will be the math involved as each level of the heirloom will be multiple iLvls apart but given all 100 points and the right formulae* a fairly accurate calculation should be possible.

*Depending on your math skill a question on mathematics should help determine how to derive the factor.

I have put together a spreadsheet with all the data points for one piece of heirloom with some simplistic formulas that look to show some patterns but not accurately enough to derive a formula, maybe this sheet will give you an idea how to proceed with the data you have.

Spreadsheet

Note: The formula for Stat Increase Per Ilvl needs improvement to be more precise, rather than only comparing at each point where often there was no increase from the previous it needs to include all iLvls where the stat didn't change. I will work on this, but if some one else beats me to it please let me know.