Infestation

Infestations are an event and a serious threat in which a number of hives are spawned, alongside insectoid defenders. They can happen randomly or can be caused by a quest; quests will warn you if this is an outcome. Infestations can also occur upon entering rooms in an ancient complex; you will get no specific warning for this quest. On the other hand, infestations often leaves behind valuable loot of insect jelly and opens the opportunity for insect farming.
== Natural Infestations ==
350px|thumb|right|Blue squares show an area with a chance of infestations spawning.
225px|thumb|right|Making 1x1 squares will usually eliminate bugs.But if a 1x2 area has a single mountain roof - regardless if the other tile is mountain or not - then it can spawn infestations.
Natural infestations require an area larger than 1x1, where at least one tile has the overhead mountain roof, within 30 tiles of a colony structure. They are centered around a single "valid" tile, which must have a temperature higher than . Temperatures under will gradually reduce the spawn chances in that area. Light will also lower, but not eliminate, the chance of infestation in an area.
Hives and insectoids will spawn within a given radius, regardless of whether those tiles are valid. A hive does not have to spawn on an infestation's center point. The initial size of an infestation is based on raid points, so infestations will get bigger as the game progresses. If the size of the event is larger than the "valid" space, it will happily expand to appear in nearby "invalid" areas, even if those areas are not directly connected. 
If generated from a quest, Infestations may spawn outside in the open.
Defeating an infestation with hives grants a Defeated insect hive mood buff to all pawns on the map. This buff lasts 10 days and stacks up to 5 times.
=== Behavior ===
Insectoids (Megascarabs, Megaspiders and Spelopedes) will spawn near hives and spend their time roaming around them. They will attack and chase any intruder that comes within a 10-tile circular radius from the hive that spawned them, returning to their hives once the threat is gone. Insectoids will only attack creatures they can see, and will not attack while they are sleeping, provided they are not woken up.
They will randomly dig at stone and structures while wandering around their hives, potentially breaching into new areas.
If any of the insectoids are downed or damaged, the entire infestation will go after colonists on the map, attacking and breaking down structures in the process. Even if outside raiders or other factors (like hypothermic slowdown) down them, they will be aggressive. If insectoids don't see hostiles within 100 tiles, they will give up and return to their hives.
If the hives and insectoid colony are left intact, they will reproduce, progressively growing more numerous. But if all megaspiders or spelopedes are killed, the hive(s) will deteriorate due to lack of maintenance.
==Other infestations==
These events are called "infestations", but do not generate hives, meaning they do not share the behavior as shown above. They are immediately hostile to colonists and will attack like raiders do.
===Too Deep: Infestation===
Insectoid infestations can spawn from digging from a deep drill. They don't seem to appear outside of active digging. Insectoids, but not hives, will pop out around the drill's area. These do not have the overhead mountain requirement like regular infestations. However, they are often smaller in number, and are unable to reproduce due to the lack of hive. 
===Wastepack infestations===
Wastepack infestations may appear whenever toxic wastepacks are destroyed.
When a wastepack infestation triggers, it creates wastepack cocoons. When these cocoons are disturbed, or when a human walks within a set radius, the insects will appear.
== Strategies ==
Infestations are most threatening in mountain bases, as they can spawn practically anywhere inside your base. Outside a mountain, they are much less harmful - around a normal level threat. When fighting an infestation, always ensure you completely annihilate every hive. If even one is left, insectoids can keep spawning and leave you back where you started. 
Since insectoids do not attack creatures while sleeping, it is possible to haul materials in and out of the area near their nests at night, including flammable material. This is however extremely risky, since attacking one of them, or doing construction near the insectoids, will wake them up. They also wake up when their individual need for rest has been filled, so be prepared (with all relevant items staged in a nearby stockpile) and act quickly once they're asleep.
=== Prevention ===
Prevention is a useful but fragile strategy of protecting mountain bases in most biomes. By reducing the temperature of every tile of overhead mountain to , spawning can be prevented, however outside of the coldest biomes, this requires coolers and a significant amount of power. A solar flare, EMI dynamo, or similar can leave you open to infestations, so adequate defences are still recommended. The cold will also affect work speed, pawn moods, and potentially pawn health. 
When spawn proofing a base, be thorough - even a single warm tile can cause a full infestation. If there is any valid tile, infestations can spread nearby into seemingly safe areas, even if there is a wall many tiles thick between.
As they require more than 1x1 of overhead mountain, you only need to build walls every second square. Only walls are capable of stopping infestations; columns and doors do not work. Note that an overhead mountain square next to an open "thin roof" area is also a valid spawn point.
===Melee block===
With a few, well-armored melee colonists, insects can be very simple to deal with via a melee block tactic.
Use a chokepoint, such as in any doorway. Have 3 melee colonists behind the chokepoint, and any amount of ranged fighters behind them. If done correctly (see right), you should have 3 colonists fight 1 insect at a time. As insects are only melee enemies, this is a trivial way to dispatch of insects. Frag grenades are extremely effective, but are not required. 
When designing a mountain base, you will want to create many chokepoints where you can melee block. You do not want to block colonists from standing on the 3 tiles behind the doorway, so place buildings away from the doorway. (See left)
===Kiting===
If insects spawn "in the open" (i.e. not inside a mountain), then kiting tactics are effective.
Even megascarabs, the fastest insect, are as fast as a healthy baseline human (assuming no Pollution Stimulus). So it is possible to lure the insects, shoot with a ranged weapon, and retreat. After you get to a safe distance, have colonists shoot, and retreat again, repeating until all insects are killed. This strategy works well against Too Deep: Infestations, as well as any hive outside of your base.
=== Mitigation ===
Insects are more likely to spawn in darkness, in "warm enough" temperatures, above -8°C (17.6°F). 
In a mountain base, you can create a "lure room". This will be a massive room that is warm, unlit, and dirty, very far away from your proper base. Since there will be many more valid tiles to spawn inside this room, infestations will most likely spawn there. You can then light this room on fire - see below for details.
If you are able to ensure that there is only one valid spawn location on your base map, you can prepare this area to automatically trap and kill the insects with fire when they appear.
===Fire===
One way of dealing with infestations is with fire. This consists of 2 parts:
# Have a "lure" room - see above for details. In an outdoors base, it is likely that only 1-2 rooms have overhead mountain, meaning dedicated rooms can be built.
# Light it on fire. Fill it with flammable objects like barricades and wood floor. You can either use molotov cocktails or IED incendiary traps to do the work.
Insects should die of heatstroke before they breach through 2-3 layers of door.
It is important to note that temperature is usually what kills insects, not the fire itself. Throwing molotovs outdoors is unlikely to be helpful: insects can walk past a burning wood floor with minimal damage, and even a direct molotov hit doesn't do much damage. Rather, it is the > heat that ignites the entire infestation and causes lethal levels of heatstroke. An area must be "indoors" in order to receive any sort of temperature change.
===Insect AI===
When attacked, insectoids will go after colonists without any walls between them first. This allows the insectoids to be lured away from their hives, chasing a runner colonist across the map. While they are away the hives can be destroyed. As long as hives are being damaged, the insectoids will keep chasing after colonists instead of returning to their hives. To keep the hive destroying pawns safe from having the insectoids' attention turned to them rather than the runner, a wall can first be built to block off the insectoids from the hives. Note that some new insectoids are likely to spawn at the hives during the process. Once all the hives are destroyed, the insectoids will wander the map like normal animals and soon starve to death.
== Farming ==
The leftover insect hives can be farmed for large amounts of insect jelly. At high difficulty levels, spawned insects also give large amounts of insect meat.
Category:Game mechanics