Directors

As a rogue-lite game, Risk of Rain 2 features a lot of random generation as part of its gameplay - unlike many other action games, enemies and most items are randomized between different runs, both in their nature and location. The systems that manage these are called the Directors. Their main purpose is to manage spawning of monsters and interactables while keeping a balance between variety and consistency to ensure a fun experience and ever-different playthroughs.

Risk of Rain 2 uses three sets of Directors: The Scene Director, which is responsible for setting up the map when entering an Environment; the Camp Director, which is similar to the Scene Director and is responsible for setting up a Void Seed when it spawns; and the Combat Directors, which are responsible for spawning enemies while players explore the map.

Basics and Terminology
Although all types of Directors work differently, they share some similar concepts. Understanding them is important to understand the finer details of their inner workings.

List of Directors
The game has a wide variety of Directors. Note, however, that not all of these Directors are active at the same time. Directors are classified into Instantaneous and Continuous Directors. Only active Directors can spawn monsters and interactables.

Instantaneous
Instantaneous Directors have simple behavior: once activated, they perform their spawns, then immediately disable themselves once more.


 * The Scene Director is active only during map setup, before the players arrive. It is responsible for spawning all interactables, as well as the initial monsters present on the map when players teleport in.
 * The Camp Director is active only during map setup when a Void Seed spawns. It is responsible for spawning all interactables and monsters related to it when players teleport in.
 * The Teleporter Boss Director is activated 3 seconds after players activate the Teleporter. It is responsible for spawning Teleporter Bosses.
 * The Shrine of Combat Director is activated whenever a player activates a Shrine of Combat. It is responsible for spawning the monsters that appear from the Shrine.
 * The Defiant Gouge Director is activated whenever a player activates a Shrine while in the possession of a . It is responsible for spawning monsters according to the item's behaviour.
 * The Battery Director is activated whenever a player activates a Pillar on or a Deep Void Signal on . It is responsible for spawning a single big wave of enemies during the holdout event.

Continuous
Continuous Directors activate and deactivate themselves based on various conditions. While active, these Directors will regularly receive "credits" and attempt spawns until they are disabled.


 * The two Standard Directors activate when players enter the map, and deactivate 3 seconds after players activate the Teleporter. They are responsible for spawning most of the monsters players will encounter when exploring the map. Both Directors have very similar characteristics, but they differ in their spawn rates. They will be called the Fast and Slow Directors in the rest of the article.
 * The Teleporter Director activates 3 seconds after players activate the Teleporter and deactivates when the Teleporter is fully charged. It is responsible for spawning monsters while the Teleporter is charging.
 * The Arena Director activates whenever a player activates a cell in the and deactivates when the holdout event finishes. There can be up to 4 Directors active, one for each unique monster.
 * The two Mithrix Directors activative at the beginning of the second and third phases of the fight respectively and deactivate when their respective phase is over. They are responsible for spawning monsters during the boss fight.
 * The two Escape Sequence Directors are active during the escape sequence on Commencement. They are responsible for spawning and  Chimeras respectively.
 * The Voidling Director is active during any Simulated Environment on . It is responsible for spawning monsters during the fight with the.
 * The Simulacrum Director activates when any Simulacrum wave commences and deactives when it finishes. It is responsible for spawning all monsters for the wave.

Director Credits
Just as players use money to purchase items, the Directors make use of a special, invisible currency called "credits". Instantaneous Directors gain a burst of credits when activated, which they immediately spend. On the other hand, Continuous Directors accumulate and spend credits over time while they are active. The number of credits received depends on the Director itself, though all Directors use the same costs to spawn entities.

Spawn Cards
In order to determine what to spawn and at which frequencies, the Directors make use of a concept called Spawn Cards. A Spawn Card represents a single entity and has a Weight, a Credit Cost and a Stage Condition. Every monster and non-static interactable in the game has a spawn card.


 * The Entity represents what will be spawned if the card is selected.
 * The Weight represents the relative chance of the card to be selected.
 * The Credit Cost represents how many credits a Director must spend to spawn the entity listed on the card.
 * The Stage Condition represent the earliest stage this card can be selected.

Categories
All spawn cards belong to one of several Categories, which are simply a collection of spawn cards with a weight. Every map uses the same set of categories, but the weight of the categories themselves varies depending on the map, and not all maps use all spawn cards. Some maps can also override the weight or cost of individual spawn cards, although this is rare. Note the Scene Director is not given any credits to spawn interactables on, , , , and , which are omitted from the table. The spawns from the are also omitted to further simplify the table, since they are only the Void Cradle, Void Potential, and Void Stalk with equal chances.

The monster spawn card data only include the location where they are normally encountered. This does not include Family Events and the, which override these spawn card categories. Since these overrides are fixed, regardless of Environment, they are summarised in their respective pages.

Weighting
Whenever a Director picks a spawn card, it does not do so completely randomly - it takes into account the computed weight of the element. The computed weight of the element depends on two things:


 * The relative weight of the category (equal to the weight of the category, divided by the sum of the weights of all categories)
 * The relative weight of the card (equal to the weight of the element, divided by the sum of the weights of all elements that can spawn on this map and within that category)

The final chance to be picked is equal to the product of these ratios.

Think of it like a lottery. First, every category puts in tickets equal to their weight (a category with a weight of 10 has 5 times more tickets than a category with a weight of 2). Then, a random ticket is picked to select a category. The same thing then happens within the category: every item puts in tickets equal to its weight, and then a random ticket is drawn to determine which spawn card is selected from that category.

The Scene Director
When activated during the start of a stage, the Scene Director spawns everything at once. Once it has selected "reserved" spots for the Teleporter and player spawns, it starts populating the map with interactables, then monsters. Finally, during cleanup, if at least one player has a, an , or a , it will spawn the relevant items for each player who has them in their inventory. The items within the Lockboxes are determined when they spawn.

Credit Income
The Scene Director holds 2 credit budgets, one for its interactables and one for its monsters. The base amount of credits given to the Scene Director when the stage starts depends on the environment.

The amount of interactable credits is then increased by +50% per additional player beyond the first. For instance, on Abyssal Depths, the Scene Director will hold 400 credits in singleplayer, 600 with 2 players, 800 with 3, and a whopping 1000 with 4. This total represents how much the Scene Director will have to work with. This effectively means that singleplayer is "easier" than multiplayer, because if the loot is shared evenly even for two players, they will each obtain 75% of the amount of items than they would in singleplayer.

Note that whenever the "vault" of Abyssal Depths is open, the Scene Director is granted 160 additional interactable credits. These credits are not increased by player count, however, and this does not apply to the "vault" of Distant Roost either.

The amount of monster credits is not increased by player count, but rather multiplied by the difficulty coefficient. For instance, entering Abandoned Aqueduct with 2 players at the start of "Medium" (which is a coefficient of 2.3) will give the Scene Director 230 monster credits to work with. The only exception to this rule is the first stage, which always starts with the base amount of monster credits.

The tables for the credit and spawn card categories for both interactables and monsters are summarised as follows:

Spawning Interactables
When spawning interactables, the Scene Director will repeatedly select a spawn card from its deck, only selecting between cards it can currently afford. It then pays for it, attempts to spawn it and starts again. The process is interrupted only if one of 2 conditions are met :


 * The Scene Director's credit count reaches 0 or less.
 * The Scene Director has no interactable it can afford.

Because there is no hard limit to the number of possible spawns, this means that almost all maps will hold at least one Barrel or Equipment Barrel, since these interactables have a cost of 1 and a rather high weight. It is likely they'll be selected a few times when the Scene Director has few credits remaining (less than 10).

Spawning Monsters
When spawning monsters, the Scene Director will use the same routine as when spawning interactables, with one main difference: a limit of 40 monsters. When this limit is reached, the Scene Director will discard its remaining credits and finish its setup. Monsters spawned this way do not use any of the checks used by the Combat Directors - they can never be Elite or too cheap, although they will always be valid and within the budget.

Monsters spawned by the Scene Director use their own reward coefficient of 0.0667, which is one-third of what an equivalent monster would give before the Teleporter Event. Details on how monster rewards are calculated are given in the Combat Director section.

The Camp Director
The Camp Director is similar to the Scene Director, in that it spawns the interactables and monsters for the Void Seed area. The main difference is that the Void Seed comes with two flavors of Camp Directors:
 * one to spawn interactables and monsters, and
 * one to spawn decorative kelp (non-interactable) and Voidtouched elites from the Environment's pool of monsters.

The Combat Directors
The Combat Directors are responsible for spawning every monster that is not initially spawned by the Scene Director.

Attributes
Every Combat Director has different attributes. They are summarized in the following tables. These attributes are referenced later.

Note that the Scene and Camp Directors are only included for when they spawn monsters, but they are not actually Combat Directors.

Instantaneous Directors
Instantaneous Directors receive a burst of credits when they are activated. The amount is specified on the "Credits on activation" row. Once they've spawned their wave, they immediately deactivate.

Continuous Directors
Continuous Directors may or may not start with some initial credits and they have a credit generator attached. Every second, the generator grants some credits to its Director. The number of credits generated every second can be found with the formula:

$$creditsPerSecond = creditMultiplier \times (1 + 0.4 \times coeff) \times (playerCount + 1) / 2$$

Where: The Arena Director is an exception as its credit and credit multiplier values are calculated at the beginning of each cell holdout event and are meant to smoothly increase between round. For each Active Director, they are calculated as follow:
 * creditMultiplier is the "credit multiplier" attribute of the Director
 * playerCount refers to the number of players in the game
 * coeff represents the current difficulty coefficient

$$credits = (baseCredits + creditMultiplierPerRound * (currentRound - 1) * coeff) / activeDirectors$$

$$creditMultiplier = creditMultiplierPerRound * currentRound / activeDirectors$$

where:
 * baeCredits is the credits the Director starts with
 * creditMultiplierPerRound is the base credit multiplier with a value of 0.15
 * currentRound is the current round, starting at 1
 * activeDirectors is the number of unique monsters, starting at 1 and increased by 1 at each odd round count

Director transfer
Whenever a Combat Director deactivates, it transfers 40% of its remaining credits to another random active Director and discards the rest. If there are no other active Directors (such as when the Teleporter has been charged), these credits are lost.

When activating the Teleporter, the Teleporter Directors activate before the standard Directors deactivate, so they receive some credits from the deactivating Directors. Which Director receives which one's credits is random, however.

Monster & Elite tiers
Most monsters in the game can spawn in multiple variations of power level, called Tiers. Tier 0 monsters are the base version of the monster, while Tier 1 and higher have higher attributes and unique abilities - these monsters are called Elite monsters. Their HP bar outline is white instead of grey, and they also have an "Elite item" granting them the abilities of their affix.

Elite monsters have a higher credit value than their normal counterparts. The value of a monster is equal to its base value multiplied by the value multiplier of its elite tier (e.g. a T0 Jellyfish is worth 10, a T1 Jellyfish is worth 60, and a T2 Jelllyfish is worth 360).

Some Elite tiers are not available until a certain number of stages have been completed. Whenever it is calculated, the maximum value of an Elite monster only takes into account the available tiers (e.g. the highest possible value for a Jellyfish is 60 in stages 1-5 and 360 from stage 6 onwards).

Similarly, some monsters can never be Elite - the maximum tier for them is always considered 0, regardless of the current stage. This currently only affects the and.

Card pre-selection
Before entering the spawn loop, some Directors prepare cards in a specific way, allowing them to match specific conditions the standard selection method may not match.

This is only applied to the first card, so if the first spawn fails, the second one will not use these mechanics again.

Shrine of Combat
When the Shrine of Combat Director picks its card, it does so in a way that will guarantee that it will work. As such, the Shrine of Combat Director only picks from cards that match the following conditions:


 * The card is valid.
 * The card's value is lower than the Shrine of Combat Director's credits.
 * The Shrine of Combat Director's credits are lower than the "too cheap" value for the card (see the next section for details).

If at least one card matches all these conditions, the Director picks one at random and uses it.

If no card matches all these conditions, the shrine deactivates, spawning in an inactive state as if already used.

Note that since these conditions mimic those used by the spawn loop, the Combat Shrine Director should eventually succeed when it actually attempts the spawn even if the enemy limit has been reached at the time of each activation.

The Defiant Gouge Director works in exactly the same way.

Teleporter Boss
The Teleporter Boss Director picks its first card only from the Champions category, but it makes no check whether the spawn will fail due to the card being too cheap or too expensive. If this is the case, or no Champion spawn cards are found (due to a Family Event or the being enabled), the Director will select any monster card from those available for the Environment until one of appropriate cost is found. Note, that it is possible to end up selecting another Champion monster as a result of this.

If the selected monster is not from the Champion category, the boss fight will be what is known as a Horde of Many event, but there is nothing special about this in the underlying mechanics. Every monster has a Health Bar subtitle message when it is selected for the boss fight, and while the Champion monsters, the and the  Chimeras all have unique messages, every other monster defaults to "Horde of Many".

In the early game Horde of Many is generally only possible where the and  are available, because their initial costs and their lack of Elite Tiers make them fairly likely to being either too cheap or too expensive. But in a very late run even Champion monsters will be deemed too cheap and only Scavengers will spawn.

Due to the initial spawn card being rerolled only if the selected monster is too cheap or expensive, this makes tracking the chances of a Horde of Many very complicated. For example, on if the Director has less than 4000 credits, picking the Overloading Worm will cause it to be rerolled. The chances of picking a normal monster then depends exactly on how many credits the Director has. Between 4000 and 4800 credits no Champion monster will fail to spawn. Between 4801 and 5400 credits the Magma Worm will be rerolled, but the only remaining non-Champion monster affordable is a. From 5401 credits and above, even though the Magma Worm will still fail, only the remaining Champion monsters are within the credit conditions. These numbers change once again after looping, as the availability of and T2 Elites change the credit thresholds for rerolling.

Be mindful that in the above example if the Director starts with, for example, 4700 credits, the deactivated Fast/Slow Directors may donate it enough credits to push it over the 4800 threshold which can lead to a Horde of Many.

If the Director fails to spawn a monster due to the location chosen, e.g., inside a wall, the spawning process will end prematurely. So, if, for example, the Director has enough credits to spawn 3 monsters, but the second one fails, only the first one will spawn. In the special case where the very first spawn fails because of this, the Director will choose another card which could lead to Horde of Many as described above, even though the initial card passed the cost conditions. This effectively makes Horde of Many possible on any Environment as early as stage 1, but it is a fairly rare phenomenon.

Battery Director
While there is no special selection criteria for this Director, due to the fixed amount of credits and the small monster pool, it is possible to list all possible spawn encounters.

For :


 * 60%: 2
 * 20%: 3 (1 of which will be Perfected Elite)
 * 20%: 1

For the : Notably, on Void Locus the Battery Director behaves like a Teleporter Boss Director and will attempt to select a Champion spawn card first. This is guaranteed to fail because the costs 800 credits. However, with the enabled, it is possible for affordable Champion spawn cards to be in the monster pool, which can make the encounter more biased towards Champion monster spawns.
 * 40%: 1
 * 30%: 2
 * 30%: 4 (2 of which will be T1 Elites)

Spawn loop
While active, all Combat Directors, both instantaneous and continuous, will periodically attempt to spawn a monster. A spawn loop runs every frame and follows the following steps.

Pick a target
If the Director targets players, it selects one random living player as its target. When a player has been selected, the Director also sets a "retarget timer," which is a random value between 1 and 10 seconds. At the end of that timer, it will pick a random living player again as its next target (which may be the same player as the previous one).

Directors that target an object will never switch to something else.

The Director uses the target to determine where the enemy will appear. All enemies have a minimum and maximum distance value, dictating how close or far they can be from their target when they spawn.

Check the timer
If the monster spawn timer is at 0 or less, the Director will attempt a spawn.

When they activate, all Directors start with a spawn timer of 0, which means they can immediately attempt a spawn. The Teleporter Boss Director starts with a spawn timer of -600, so it will virtually never not attempt a spawn.

Check for overcrowding
If there are already 40 monsters or more on the map, the spawn will FAIL. The Teleporter Boss bypasses this restriction, however.

Prepare a wave
If the previous spawn was a SUCCESS, the wave parameters are kept and this section is skipped.

If the Director has pre-selected a monster card and no spawn has FAILED yet, it prepares the wave using that card.

If the Director has not pre-selected a card, or the last spawn attempt was a FAIL, a random monster card is selected.

The Director then determines which Elite tier will be active. The chosen Elite tier is the highest available tier the Director can afford (as in, the value of the corresponding Elite monster is less than or equal to the Director's current credits). Once the tier has been chosen, a random affix is then picked from its tier (unless the chosen tier is 0). All Elites from the wave will use this tier and affix.

Finally, a spawn counter is created, starting at 0 and tracking how many monsters have been spawned with the current parameters.

Check the spawn card
The Director checks that the current card is valid for the spawn. It checks the 4 following conditions:


 * The current wave has spawned 5 or less monsters.
 * The spawn card conditions are met (i.e. if a Hermit Crab was selected, the stage must be 2nd or higher).
 * The Director can afford the monster (i.e. its spawn cost is equal to or lower than the Director's current credits).
 * The monster is not too cheap for the Director (see below for details).

If all conditions are met, the spawn will SUCCEED and the Director starts preparing the spawn - otherwise, it FAILS and the Director skips the spawn. Note that no credits are spent if the spawn is a FAILURE.

Too cheap?
A monster is deemed too cheap for the Director if all three of these conditions are met:


 * The amount of credits the Director has is more than 6 times the value of an Elite of the selected Tier.
 * The Director is not an Instantaneous Director.
 * The selected monster is not the most expensive the Director could spawn (defined as the highest value out of all monsters of the maximum available Tier)

The third condition ensures that Directors will always have at least one possible enemy to spawn. (Before build 3830295, the Director could gain so many credits that it considered every single monster in the game too cheap, and therefore did not spawn anything.)

Prepare the spawn
enemyXPReward = coeff * monsterValue * rewardMultiplier enemyGoldReward = 2 * coeff * monsterValue * rewardMultiplier where the reward multiplier is an attribute of that Director, and coeff is the difficulty coefficient.
 * 1) The Director prepares the monster matching the spawn card.
 * 2) If the Director has enough credits to spawn an Elite of the selected Elite tier, it sets the monster as Elite and raises its value accordingly - otherwise, the monster will be tier 0.
 * 3) The Director pays for the monster. It spends an amount of credits equal to the monster's value and increments the wave spawn counter by 1.
 * 4) The Director calculates the HP and damage multipliers of the monster according to its Tier.
 * 5) If the monster is a Teleporter Boss, its HP multiplier is multiplied by the number of living players and it is set so that will deal bonus damage to it.
 * 6) The Director applies the HP and damage multiplier to the monster by giving it an appropriate amount of Boost items. These are invisible items that increase the monster's HP and damage.
 * 7) The Director sets the reward of the monster. They are calculated as follows :
 * 1) The Director spawns the monster.

Check the spawn status
What happens now depends on whether the previous spawn was a SUCCESS or a FAIL.


 * 1) If the spawn failed
 * 2) *If the Director is an Instantaneous Director that already spawned at least one enemy, it deactivates.
 * 3) *The monster spawn timer increases by a random amount specified by the "Spawn Interval (Between waves)" attribute. This attribute is irrelevant for Instantaneous Directors, because they will either try again immediately or never succeed.
 * 4) *The current monster card is destroyed, which means another one will be prepared during the next attempt. The same card may be selected again, however.
 * 5) If the spawn succeeded
 * 6) * The monster spawn timer increases by a random amount specified by the "Spawn Interval (During a wave)" attribute.
 * 7) *The current monster card and Elite tier/affix are kept.

Example
Since the spawning method is rather complex, here is a concrete example to help understand the various concepts behind spawning.

Note that the Directors' spawn rates have changed as of the Skills 2.0 update. However, the same concepts still stand, so the old values will be used.

Scenario
4 players have just entered Abandoned Aqueduct, in their second loop. The difficulty is already past HAHAHAHA (Coeff of 17.5).

t = 0s | Attempt 1 : Condemned by poverty
Both Fast and Slow Directors activate, starting with 0 credits. They immediately target Player 2, choose a retarget timer of 6s, then attempt a spawn, which fails since they have no credits. Fast decides to attempt a spawn 4.01 seconds later, while Slow chooses a delay of 18.33 seconds.

t = 4.01s | Attempt 2 : Now we're talking
After 4.01 seconds, both Directors have received 4 waves of credits. Each wave contains 0.75 * (1 + 0.4 * 17.5) * (4+1) / 2 = 15 credits, so both Directors have 60 credits (we will ignore the very small increments of the difficulty coefficient every second to make calculations clearer). Fast will now try another spawn, since its monster timer has reached 0.

First, Fast keeps Player 2 as its spawn target since 1.99s remain on its retarget timer. There are only 12 monsters on the map (pre-placed by the Scene Director), so all is well.

Since Fast's last spawn FAILED, it picks a spawn card - a Beetle, of base value 8.

Fast must then select an appropriate Elite tier. It tries Tier 1, which is always available, and finds that the value of a T1 Beetle would be 8 * 6 = 48 credits, which it can afford. It also tries Tier 2, which is available since players are in their second loop, getting a value of 8 * 36 = 288 credits, which is too much. Therefore, Tier 1 is selected.

Fast selects a random affix from the Tier 1 list. Glacial is selected. Finally, the Wave spawn counter is set to 0.

With the wave parameters set, Fast can now actually attempt a spawn.

Beetles have no special conditions, and Fast's credit count (60) is higher than 8 but lower than 288 (the cost of 6 T1 Beetles), so the spawn will SUCCEED.

Fast notices that the cost of a T1 Beetle, 48 credits, is lower than its current budget. It therefore decides to spawn the Beetle as a Tier 1 Elite, raising its value to 48.

Fast pays for the Beetle, and it has 12 credits remaining. Since the Beetle is Tier 1, its HP multiplier is set to 4.7 and its damage multiplier to 2. It is also granted the Glacial buff. Since it is not a Teleporter Boss, no further adjustments are necessary.

Fast then calculates the base reward of its shiny new Beetle. Its base XP reward will be 0.2 * 17.5 * 48 = 168 XP, and its Gold reward will be double that, 336 Gold.

Finally, the Beetle spawns, not too far away from Player 2. With its higher HP and damage, we can only hope it will be a force to be reckoned with.

Since the spawn was a SUCCESS, Fast keeps Beetles and T1/Glacial. It decides to spawn the next monster 0.45s later.

t = 4.46s | Attempt 3 : They are billions
Shortly after our Elite beetle starts spawning, Fast decides to spawn another monster. It has not received any credit since, so its budget is still 12.

Our poor Player 2 is still targeted for 1.54s, so no change there.

Because the last spawn SUCCEEDED, Fast has no need to choose another monster card or Elite tier/affix.

Just like before, 12 is higher than 8 and lower than 192, so the spawn will SUCCEED again.

This time, however, Fast does not have enough credits to spawn another T1 Elite - if that had been the case, that Elite would also have been Glacial since the affix has not changed. Fast only pays 8 credits and spawns a T0 Beetle, which leaves it with 4 credits.

The base reward of this basic Beetle is only a mere 28 XP and 56 Gold since it is T0. It spawns, also around Player 2.

Since this spawns SUCCEEDED, Fast keeps its card/elite again and decided to attempt the next spawn 0.23s later.

t = 4.69s | Attempt 4 : We shall stop for now
Once our second Beetle has started spawning, Fast decides yet again to try and spawn a Beetle.

Player 2 has still 1.31s going for them, so they are still the target.

Fast also keeps its card/elite yet again.

This time, however, Fast no longer has enough credits to pay for any Beetles (4 credits versus 8 cost) so the spawn FAILS.

Because of this, Fast must now wait much longer - 5.63s this time - before its next spawn. It will also select another card/elite combo - Player 2 is safe for now.

Past that
If we were to continue the simulation, we would keep generating random numbers and advance time to simulate a run. We would probably have Fast try another wave or two before Slow makes its first real attempt with the 15 * 18 = 270 credits it had accumulated, enough to spawn one Greater Wisp and almost enough to spawn a Tier 2 Beetle.

Version History

 * Anniversary Update


 * Bug Fixes
 * 🌧 Fixed not being selected as a boss due to a misconfigured spawn card


 * Early Access 'Skills 2.0' Content Update


 * Gameplay Changes
 * Reduce the spawn frequency of the “aggressive” director
 * This should result in spawning behavior a bit more similar to Early Access Launch, where the Director will be able to save up a tiny bit more before spawning things. This doesn’t make the game easier or harder - there should just be slightly fewer small monsters, and more big monsters.


 * Early Access Scorched Acres Content Update


 * QOL
 * Revisit Director AI to prevent stall cases when spawning monsters and bosses


 * Early Access Patch (Build ID No.3830295)


 * Bug Fixes
 * Director no longer stops spawning monsters late in the game
 * Director logic in selecting/skipping monsters to spawn has been cleaned up