Rusted Key

The Rusted Key is a new item in Risk of Rain 2.

Whenever a new stage is entered, a Rusty Lockbox will spawn with the rarity of the contents based on how many Rusted Keys the entire party had when entering the stage.

This item is unique in the fact that it doesn't modify the current stage and is quantified by all keys among the team rather than an individual.

The key is not consumed upon opening a rusted lockbox.

Math
To understand how the Key affects the chance on a specific rarity of item, one first needs to understand how a normal chest chooses an item: A normal chest has 80 chances for a common item, 20 for an uncommon item and finally 1 chance for a Legendary item. Then the chest, during its creation, uses this weight selection to select the rarity of the item. After choosing the rarity, it chooses an item at random from all available items from that tier.

The Rusted Keys multiply the chances of getting an Uncommon tier item by the amount of keys the team has.

The Rusted Keys multiply the chances of getting a Legendary tier item by the amount of keys the team has squared.

This equation can be used to help you find the rarity of each tier of item:

x = The number of keys in the team's inventory

y = Net rarity

A specific tier of rarity can be found by dividing its rarity value by the net rarity. For example, say you have x = 3 keys in your inventory. The equation has the net rarity of items equaling 149. The rarity of common items is 80/149, where 80 is the rarity value of common items and 149 is the net rarity. Divide it out, and it is approximately equal to 0.5369, meaning that 53.69% of items collected from rusty lockboxes will be common tier. For uncommon tier items, it would be 20x/149, which would be approximately 0.4027 because you have 3 keys. This means that 40.27% of items also collected from rusty lockboxes would be uncommon. For legendary items, you would use x2/149, which would give you about 0.0604, meaning that 6.04% of items found would be legendary. Use the equations below and the one above as a system of equations to find out the rarity of each tier of items:

80/y = Rarity of common tier items

x(20)/y = Rarity of uncommon tier items

(x^2)/y = Rarity of legendary tier items

All variables mean the same things as they mean in the first equation. Be sure to use the first equation to find the value of y.

Chance of each rarity:

You can also use this graph made using Desmos Graphing Calculator (or this) to see the rarity of each tier of items considering how many Rusted Keys you have.