Talk:Chest loot/Archive 1

Method?
Hello, I was wondering how these values were calculated. I got somewhat different ones. For instance for Village chest:


 * Iron Ingot, Bread, Apple, Obsidian, Sapling: 1.813
 * Gold Ingot: 0.604
 * Diamond: 0.363
 * any single Iron gear: 0.302
 * any single Horse armor: 0.060

My method was as follows:
 * Note that each chest has a number of rounds to fill itself, random from x to y.
 * Note that each chest defines a pool of items, each with a weight, and a number of stack sizes, random from m to n.
 * So for a given item,
 * the chance of that item being picked to be filled is governed by its relative weight among all the items in the pool.
 * the number in a given chest will range across a matrix from xm to yn: number of rounds times stack sizes.
 * simple case: rounds is 1-3, stack sizes is 1-4
 * there are 12 ways to form products in this example,
 * and keep in mind the sum from 1 to n = ( n^2 - n )/2
 * [ ( n^2 - n )/2 * ( y^2 - y )/2 ] / 12 represents the average number of items once rounds are complete.
 * complicated case: rounds is 4-8, stack size is 2-4
 * there are 15 ways to form products in this example,
 * the sum of products of all numbers from x to y and from m to n involves (I believe) taking the entire sum of products across 1 to y and 1 to n, and subtracting out different sections of the matrix... anyway it's this:
 * { [ ( n^2 - n )/2 * ( y^2 - y )/2 ] - [ ( (m-1)^2 - (m-1) )/2 * ( y^2 - y )/2 ] - [ ( n^2 - n )/2 * ( (x-1)^2 - (x-1) )/2 ] + [ ( (m-1)^2 - (m-1) )/2 * ( (x-1)^2 - (x-1) )/2 ] } / 15 represents the average number of items once rounds are complete.
 * item weight * avg number of items once rounds are complete = avg number of items per chest

And god bless you if you follow that. I only describe it so that maybe a person can qualitatively say whether I'm down the wrong path or not.

And you know, I wanted to know if there was an easier way, or what your way was,. – Sealbudsman (Aaron) t/c 06:33, 26 May 2015 (UTC)