Minecraft Blogs / Other

Formula for weight in loot tables

  • 77 views, 7 today
  • 1
  • 1
camerarandom's Avatar camerarandom
Level 1 : New Miner
1
How does rarity work in building a loot table?
Percentages are a result of the dividing the weight by the sum of all weights:

Chance = given weight of an item / sum of all selected weights in the table

2 items in list, each with a weight of 1, each has 50% chance of selection. Chance is 50% = 1 / 2

2 items in list one with weight of 1 the other item with a weight of 2. This gives the list as a whole a sum of 3.
1st item has 33.33% chance of selection 2nd item has 66.67% chance of selection.

33.33% = 1 / 3
66.67% = 2 / 3

The size of the list will affect the percentages as a whole.

In a 6 item list with each given the weights of 1, 2, 3, 4, 5, 6
The total table weight will be 21.
Thus
4.76% = 1 / 21
9.52% = 2 / 21
14.29% = 3 / 21
19.05% = 4 / 21
23.81% = 5 / 21
28.57% = 6 / 21

But in a 6 item list with each given the weights of 1, 4, 1, 2, 3, 1 the total table weight will be 12.
Thus
8.33% = 1 / 12
33.33% = 4 / 12
8.33% = 1 / 12
16.67% = 2 / 12
25.00% = 3 / 12
8.33% = 1 / 12

It is unknown if a table can exceed 100%, however it is good form to not have your table exceed the 100% mark
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome