Item spawning mechanics

Items have certain systems in place to determine where and when they can or cannot spawn, and how likely they are to do so.

## Spawn Depth

Each item has a minimum depth (that is to say, amount of levels completed) before you can start seeing that item spawn. Some items also have a maximum depth, where you will stop seeing that item spawn naturally after that point.

On top of this, some items also have an average depth of spawning, where you are most likely to find it at around that depth - it will be less likely to find significantly earlier or later than that point.

It is worth noting that special levels increase the "item depth" by 3 (that is, the level depth used by the game to determine spawn rates for items), so for example, items which would normally generate on Europa L1 (depth level 8) may also appear in a Callisto special level (depth level 5 + item level 3).

Note that this mechanic mainly affects loot dropped from lootboxes and such, and does not usually include items that an enemy might drop unless stated otherwise.

### Example

40mm grenades have a minimum depth of 2, a maximum depth of 20, and an average depth of 6 (as of version 1.5). This means you won't see it spawn from boxes on the first level, and it will stop dropping after reaching the Gateway. However, the average depth is 6, so you're most likely to find 40mm grenades right before Valhalla Spaceport, with the likelihood decreasing when it's much earlier or later than that point.

*(To clarify: How does this mechanic apply to endless?)*

## Spawn Weight

When determining items to spawn on the level, the game typically puts everything that can spawn there into a table and then draws from that at random like a bag. To ensure that some items are more common than others, each item has a "weight" - essentially, that many "copies" are placed into the "bag" before 1 thing is drawn at random, so higher weights mean more "copies" which means a higher likelihood of finding said item.

## Spawning Formulas

Provided below are the formulas used by the game to calculate how an items weight is modified by the current depth level. For context,

d

l
e
v
e
l

{\textstyle d\_{level}}

 is the current depth level (modified by any item depth modifiers),

d

m
i
n

{\textstyle d\_{min}}

 is used to mean "minimum depth level",

d

m
e
d

{\textstyle d\_{med}}

 is the "typical depth level", and

d

m
a
x

{\textstyle d\_{max}}

 is the "maximum depth level".

d

l
e
v
e
l

<

d

m
e
d

 and

d

m
i
n

 is defined

:
w
e
i
g
h

t

f
i
n
a
l

=
w
e
i
g
h

t

b
a
s
e

∗
(
1
−

d

m
e
d

−

d

l
e
v
e
l

d

m
e
d

−

d

m
i
n

1

)

{\displaystyle d\_{level}<d\_{med}{\text{ and }}d\_{min}{\text{ is defined}}:weight\_{final}=weight\_{base}\*(1-{\frac {d\_{med}-d\_{level}}{d\_{med}-d\_{min}+1}})}

d

l
e
v
e
l

>

d

m
e
d

 and

d

m
a
x

 is defined

:
w
e
i
g
h

t

f
i
n
a
l

=
w
e
i
g
h

t

b
a
s
e

∗
(
1
−

d

l
e
v
e
l

−

d

m
e
d

d

m
a
x

−

d

m
e
d

1

)

{\displaystyle d\_{level}>d\_{med}{\text{ and }}d\_{max}{\text{ is defined}}:weight\_{final}=weight\_{base}\*(1-{\frac {d\_{level}-d\_{med}}{d\_{max}-d\_{med}+1}})}

otherwise

:
w
e
i
g
h

t

f
i
n
a
l

=
w
e
i
g
h

t

b
a
s
e

{\displaystyle {\text{otherwise}}:weight\_{final}=weight\_{base}}

## Unique Tiers

Each unique has a tier, which mainly affects two things:

* How many levels you have to go through in Purgatory in order to find it, with tiers 1, 2, and 3 requiring 4, 5, and 6 levels respectively.
* Where it can spawn:
	+ Tier 1: Starts spawning at Callisto L3, chance increases slightly towards Europa L2, stop spawning after Io L2.
		- d

		m
		i
		n

		=
		3
		,

		d

		m
		e
		d

		=
		9
		,

		d

		m
		a
		x

		=
		16

		{\displaystyle d\_{min}=3,d\_{med}=9,d\_{max}=16}
	+ Tier 2: Starts spawning at Europa L3, chance increases slightly towards Io L2, stop spawning after Dante L2.
		- d

		m
		i
		n

		=
		10
		,

		d

		m
		e
		d

		=
		16
		,

		d

		m
		a
		x

		=
		23

		{\displaystyle d\_{min}=10,d\_{med}=16,d\_{max}=23}
	+ Tier 3: Starts spawning at Io L3, chance increases slightly towards Dante L2, never stops spawning.
		- d

		m
		i
		n

		=
		17
		,

		d

		m
		e
		d

		=
		23

		{\displaystyle d\_{min}=17,d\_{med}=23}

## Unique Item Generation

### Guaranteed Uniques

At the start of every run, the game rolls to decide where it will place a guaranteed unique for you, ensuring you can always get at least one unique in each run. There is a 1/5 chance of it being in Callisto, 2/5 in Europa, and 2/5 in Io. However, it will only generate if you enter the special level (purple elevator, either of the main path or any of the branches) of the moon where the guaranteed unique would spawn.

It is worth noting that guaranteed uniques will typically replace one of the rewards that you would normally get in that level.

### Favored Uniques

Each branch has a favored unique, which affects what will spawn if the guaranteed unique happens to be in that location. The different chances are:

* Callisto: 25% chance that the guaranteed unique will be the branch's favored unique
* Europa: ~20% chance as there can be either tier 1 and 2 uniques
* Io: ~21.5% chance as there can be tier 2 and 3 uniques

As to why this is the case, there are 8 weapons and 2 armors in each tier of unique, making for a total of 10 unique items per tier. For Callisto, only tier 1 uniques can spawn, so it will roll a unique randomly from this pool of 10. However, when rolling for a favored unique, the game triples the weight of that unique, essentially meaning that it has a 3/12 chance of pulling that unique and a 1/12 chance of pulling any other unique.

For Europa, it gets a little more complex. Since two different tiers of unique spawn, the pool increases to 20. However, it also means we need to take into account the spawn depth mechanics (described above). Tier 1 uniques start generating on Callisto 3 and typically generate around Europa L2, while tier 2 uniques start at Europa L3 and typically appear around Io L2. Ordinarily this would give them a roughly similar chance to appear, but since this mechanic applies to special levels which have an item level modifier of +3, the game treats it as if it were trying to generate an item on Io L1. To spare you the calculations, the final weights are as follows:

* Tier 1 unique:

0.25

{\displaystyle 0.25}
* Tier 2 unique:

0.857143

{\displaystyle 0.857143}

Putting it all together, assuming that the favored unique is tier 2 for this level:

c
h
a
n
c

e

f
a
v
o
r
e
d

=

w
e
i
g
h

t

f
a
v
o
r
e
d

w
e
i
g
h

t

t
i
e
r
1

∗

n

t
i
e
r
1

w
e
i
g
h

t

t
i
e
r
2

∗

n

t
i
e
r
2

w
e
i
g
h

t

f
a
v
o
r
e
d

{\displaystyle chance\_{favored}={\frac {weight\_{favored}}{weight\_{tier1}\*n\_{tier1}+weight\_{tier2}\*n\_{tier2}+weight\_{favored}}}}

c
h
a
n
c

e

f
a
v
o
r
e
d

=

0.857143
∗
3

0.25
∗
10
0.857143
∗
9
0.857143
∗
3

{\displaystyle chance\_{favored}={\frac {0.857143\*3}{0.25\*10+0.857143\*9+0.857143\*3}}}

c
h
a
n
c

e

f
a
v
o
r
e
d

=
20.11
%

{\displaystyle chance\_{favored}=20.11\%}

The chance is slightly higher for a tier 3 favored unique on Io, being 21.56%, as the Soulstealer cannot generate naturally.

In effect, these percentages mean that, at the start of any run, there is somewhere between a 5-9% chance that you will be able to get a specific unique by visiting the branch where that unique would be favored, affected by what moon it's rolling for and whether that branch generates at all. This only applies to uniques which have a branch where they are favored.

Note that Dante Inferno also has a guaranteed unique separate from the above system, favored towards the BFT 10K. As only tier 3 uniques can spawn here, the effective chance of getting this weapon here is 3/11 (27.27%).

### Uniqueness

Note that, as the name implies, uniques are indeed unique and cannot generate randomly more than once per run (the Twin Viper gets around this by generating the copy itself). As such, the numbers given in this article are under the assumption that all uniques are still available and none have generated so far, for the sake of simplifying calculations.

### Example

At the start of the run, it is decided through a 40% chance that the unique will generate on Io. Afterwards, the player reaches Europa and takes the Shadow Halls branch and reaches the Dark Cathedral. From here, the game rolls which unique will spawn, and from the entire available pool of Tier 2 and Tier 3 uniques, pulls the favored unique of this branch, Death, at a 21.56% chance. Since the branch is always guaranteed to spawn, the chance the player had at the start of this run of getting this outcome was 8.62%. Of course, the actual chance in practice may be affected by any uniques generating beforehand, among other factors.

In this example, if the player instead went to the CRI Laboratories, they would have the same chance of getting the Wavedancer instead. However, since this branch is not guaranteed, and there was only a 2/3 chance of this branch generating, the overall chance was 5.75%.

As a final example, if they had instead gone to Io Warehouse, which has no favored unique, they would have a 8.4% chance for any specific tier 3 or a 2.45% chance for any specific tier 2 unique.