Spawn System
The Enemy Spawn Director
The Enemy Spawn Director (ESD) monitors players through a mission, and decides what to spawn, where, and how much based on how well the player is doing. The ESD knows how well a player is doing based on Stress Levels. It makes changes to the amount of enemies that are spawning to try to ensure that you are under a constant and continuous amount of Pressure. By keeping your Pressure Level consistent throughout a mission, the ESD insures that there are never too little enemies and never to many enemies. For a more in depth guide on how the ESD works see Spawn System Info.
What files contribute to the ESD?
There are many files that contribute to making things all flow and work nicely, but the two most important files that actively control the spawning of enemies, are the esd_manager.sso and the esd_factions_and_compositions_library.sso files. Both of these files at their core control what enemies spawn, and how many of them spawn.
ESD_Manager.sso
The ESD Manager file controls what spawns during the Wave Phase of the Spawn Cycle. It also determines the length of each Phase, and controls Pressure and Stress. Enemies spawned through the ESD Manager will always spawn aggressive unless specified otherwise. Lots of information can be found edited using this file. It is located in "server_pc\root\paks\server\default\default_other.pak\ssl\spawn_system\enemy_spawn_director."

Phase Length Settings
The ESD Manager controls the lengths of each Phase of the Spawn Cycle. There are three options that get selected based on Stress Levels SHORT NORMAL and LONG. For example if your Stress Levels are high, Wave Phases will last a shorter amount of time, and Breather and Tension Phases will last longer. All time values are in Seconds.

Pressure Settings
Enemies spawn if the Pressure value is at or above a certain number. This is the First failsafe to stop all of the available enemies from spawning all at once and overwhelming the player. For enemies spawned from the ESD Manager, their base pressure settings are all set to 100. So They will not start spawning until you and your squad have been under enough Pressure from the Tension Phase to have a Pressure Score of 100 or over. Changing these values will change when the ESD Manager starts spawning enemies.

Enemy Spawn Packs
Enemy Spawn packs to not get Names
Each entry for an enemy is called an Enemy Spawn Pack. Each pack has an isEnabled variable, which tells the ESD whether or not to chose the Pack in the Spawning Process, this variable can be set to True or False.
The amount that each enemy will spawn in can be specified using the minCount maxCount or Amountvariables, or if not specified will spawn the default number assigned to the enemy type in the archetypes_library.sso.
The type of enemy that initially spawns is determined by the input into the archetypeUid space. It is important to note that this only guarantees that a specific enemy type spawns when the pack is picked, it is not the only way that type of enemy can be spawned.
Each Enemy Spawn Pack can be set to a specific Combat Type. This determines what kind of combat enemies spawned through the ESD Manager will prioritize. Options include: ANY, RANGED, MELEE.
Each Enemy Spawn Pack has a cooldown range. When a Pack is selected, a number within the cooldown range is selected randomly. The Pack is then disabled until the cooldown has finished. This cooldown is in place so that you will theoretically not get the same Extremis Spawn 10 times in a row.
Extra Pack Variants
Extra Pack Variants are what allow a Lictor to spawn accompanied by a Warrior and a pack of Hormagaunts. Having multiple allows the game to have more variety and keep stop players from knowing what is going to spawn. It helps create that dynamic feeling the ESD is famous for.
When an Enemy Spawn Pack is selected by the ESD Manager, it has the option to spawn with additional enemies. The way it knows what extra enemies are available is by searching the extraPackVariants section of a Spawn Pack. On the right you can see the spawn pack consists of "FactionPackVariants" that have "subPackDescs" inside of a "subPackDescDict".
These FactionPackVariants can be named anything as long as they do not contain any spaces or special characters excepting Underscores. The SubPackDescs and subPackDescDict also follow the same naming principles. It is very important that two or more FactionPackVariants cannot have the same name inside of a Spawn Pack, and that two or more SubPackDescs cannot share the same name withing a FactionPackVariant.
These Extra Pack Variants contain an archetypeUid space just like the main Spawn Pack, and the amount of an enemy type can be specified, or left blank to use the default number specified in archetypes_library.
Each Extra Pack Variant has an excludedDifficultyLevels variable. As you can see on the right, you can disable an Extra Pack Variant on any difficulty 0-5. 0 being Minimal, and 5 Being Absolute. Excluding an extra Pack Variant from a difficulty will disable it from being selected when playing on that difficulty. Modifying this section gives you full control over what is spawning on every difficulty level.
How Enemies Are Selected In the ESD Manager
Spawning is based entirely on Random Number Generation (RNG).

Spawn Cooldowns
The ESD isn't just in a constant state of picking Spawn Packs, otherwise everything would spawn all at once. Spawn cooldowns are in place to stop this from happening. Tyranids and Chaos both have their own cooldowns that determine how often an Enemy Spawn Pack is picked. These values are all in seconds, so going off the picture to the left, every 240 seconds, the ESD Manager will look through the Tyranid or Chaos section of the file depending on what mission you are playing, and pick one of the enabled Enemy Spawn Packs to spawn. It will then look at the extraPackVariants that are available, and spawn one of those options to go along with the original enemy that was spawned in the Spawn Pack.
Difficulty Modifiers
Difficulty Modifiers Modify the spawn cooldowns mentioned above. They work by multiplying the original value by a given value. The difficulties are not labeled but they are listed in order, so the first entry is minimal difficulty and the last entry is Absolute. In the image on the left, the Spawn Cooldown for both Chaos and Tyranids is 240 seconds. The modifier for the first three difficulties is 1.5. If we multiply 240 by 1.5 we get 360. Another way to think of this is its 240 times 1 and a half. So 1 whole of 240 is 240, and then we are adding half of 240 which is 180. 240+180 = 360. So on the first 3 difficulties the ESD manager will pick a Spawn Pack to spawn every 360 seconds instead of every 240. Likewise on Lethal and Absolute the spawn times are multiplied by 0.8 and 0.7. So 240 turns into 192 and 168.
ESD_Factions_And_C0mpositions_Library.sso
The ESD_factions_and_compositions.sso file controls the spawns during the Tension phase of the Spawn Cycle. Its not as impressive as the ESD Manager, but its equally important. If this file is blank, or does not have enough entries for a faction, enemies will not spawn at all period. This file can be found in "server_pc\root\paks\server\default\default_other.pakssl\spawn_system\enemy_spawn_director."

Spawn Packs
The Spawn Packs in the Factions and Compositions Library are a little different from those in the ESD Manager. Instead of picking an enemy to spawn and then picking from its extra pack variants, the Factions and Compositions Library just has the Pack Variants set up to spawn.
Each Spawn pack has a name space which can be changed to anything as long as it fits the naming rules of no spaces or special characters excluding underscores. The packs have Sub Packs just like in the ESD manager that also follow those rules. Remember it is very important that two or more Spawn Packs do not have the same name, and that two or more SubPackDescs cannot share the same name withing a Spwan Pack.
Each Spawn Pack has SubPacks that describe what is going to spawn when the Spawn Pack is selected. You can see in the above image a Hormagaunt Spawn Pack titled "HormagauntSergeants_idle". The first SubPack says that 20 Hormagaunts are going to spawn, and the second SubPack says that 5 Hormagaunt Sergeants will spawn. So if "HormagauntSergeants_idle" gets selected by the ESD, 20 Hormagaunts and 5 Hormagaunt Sergeants will spawn.
At the very bottom of Spawn Packs you can designate the packType and the combatType. packType tells the ESD how enemies will behave when spawned in. They can either spawn in AGGRO or IDLE. IDLE enemies will spawn wandering or standing around will be oblivious to the player until the player is within view. AGGRO enemies will spawn already knowing where the player is and will make their way towards them to attack. combatType tells the enemy spawning what combat type to prioritize, either RANGED or MELEE.
What Can I spawn in these files?
By default the ESD Manager contains the only entries for Extremis, Terminus, and Mini Boss Spawns. These enemy types will only spawn during the Wave Phase, and at no other point. However this is not set in stone. In fact you aren't even limited to spawning Tyranids and Chaos in their respective Faction sets. If you wanted to spawn a Rubric Marine with a pack of Hormagaunts you could do that in either of these files. All it takes is adding the Archetype id to the correct spot to get an enemy to spawn.
For a full list of available archetypes you can use in these files, see Archetypes.