Saturday 9 February 2013

Affix Rolls Explained (with very large implications for 1.0.7 crafting and the unidentified market).



Ok, so I've gotten further in my project to predict how affixes roll on items, and I'm pretty sure I know the answer. Here's how it works, with a spreadsheet attached at the end to show a few examples of some tests I've run.

Some basic principles:
  • There is a set list of affixes in the game that are common across magic, rare, legendary, and set items. Legendary and set items sometimes contain exceptions in their predetermined affixes, but their random affixes obey the same roll statistics that magic and rare items do.
  • ilvl 63 items have access to an assortment of affixes depending on the item type. You can view these affixes and sort by item type on this website: www.d3own.com
  • Most ilvl 63 affixes can roll any affix listed on that website that has a required level in the 50s or 60s (for example, click on the "gloves" to sort by gloves, then click on the first affix type, strength. ilvl 63 gloves can roll any of the "of Assault" affixes with equal probability. Now click dexterity. Any of the "of Pain" affixes can be rolled. Notice that there are twice as many because gloves have two affix "tiers" for dexterity). There are some exceptions. For example, Ignored Durability Loss is a level 30 affix, but it rolls on ilvl 63 gear.
  • There are a few extraneous rules, like how only 1 affix can be rolled from each category except primary stat. For example, only one double-stat roll can exist on a single item, but any amount of the four single-stat (i.e. Int, Dex, Str, Vit) can roll.
  • Legendary items contain some stats that are predetermined. This counts as if it has already rolled as a random affix and therefore that roll is off-limits as a random affix. They can also break some of the rules in ways that rares cannot, but again only in their pre-determined rolls.

Now, if you add up all possible affix rolls, where each entry in the list is given equal weight, you come up with varying probabilities of rolling particular affixes. For example, on boots there are 128 possible affixes (I think this is actually a little off, but close enough for now). 5 of those are Strength. 5 are Vitality. 10 are Dexterity. 7 are Armor. 1 is Ingores Durability Loss. Each double stat has 6, etc. I listed all of them on the spreadsheet. Each of those 128 affixes has equal probability of rolling, and each value in the range that is rolled has equal probability of rolling as well. Once an affix is rolled from a particular category, all of the other affixes become off-limits for the remaining rolls.

Here's the spreadsheet with a little bit of testing. It's not perfect, but it's pretty close. I think there are still a few nuances that I've yet to discover, but it's definitely a palette that can be expanded upon to get very close to the exact right answer:

https://docs.google.com/spreadsheet/pub?key=0ArooAQ_ASbpjdGtKYXZ5UUR2bDhnSjhNX0tMZDRnNVE&output=html

In order to test this theory, I used DiabloProgress's item database and sorted by the stat I was interested in. I used high-value legendary/set items on the hardcore servers. I did this because there's very little chance people will be salvaging bad rolls, and I used hardcore to get the sample size down to a reasonable amount (there are only about 500-700 of most top-tier legendaries per server).