Defense in Factorio is not a separate game mode; it is a cost of running a factory. Biters attack because their spawners absorb your pollution, and they get stronger as the hidden evolution factor climbs. If you know which enemies the current evolution level brings, you can build the defense that stops them, and not more.
This guide is for Factorio 2.0 (base game) on Nauvis, with default map settings. All numbers are for normal-quality buildings and come from the official Factorio Wiki. Space Age differences are noted where they matter.
Defense by evolution stage
Check your current evolution in the console with /evolution (it is not a script command, so achievements stay enabled). Then build for the stage you are in and the next one.
| Evolution / threat | Recommended defense | Ammo and upgrades | Notes |
|---|---|---|---|
| 0 to 0.2: small biters (15 HP, no resistances), small worms (range 25) | A few gun turrets facing the nests your pollution reaches; walls optional | Firearm magazines (5 damage); Physical projectile damage 1 | Small worms outrange gun turrets (25 vs 18). Do not build turret lines inside worm range. |
| 0.2 to 0.5: medium biters (75 HP, 4 flat / 10% physical), small spitters from 0.25, medium spitters from 0.4 | Stone walls in front of gun turret rows; ammo on a belt; gates at exits | Piercing rounds (8 damage, Military 2); more Physical projectile damage and Weapon shooting speed | 4 flat physical resistance absorbs most of a firearm magazine's 5 damage. Spitters (range 13 to 16) cannot outrange gun turrets. |
| 0.5 to 0.9: big biters (375 HP, 8 flat / 10% physical), big spitters, big worms (range 38) in new bases | Two wall layers or a gap before the turrets; add laser turrets and flamethrower turrets; robot repair | Laser turret research and its damage and shooting speed upgrades; flamethrower turrets on light oil | Big biters hit two tiles away, through a single wall. Lasers and fire ignore biter resistances. |
| 0.9 and up: behemoth biters (3,000 HP, 12 flat / 10% physical and explosion), behemoth spitters, behemoth worms (range 48) | Dense lines mixing lasers, flamethrowers and gun turrets; artillery to keep nests away from the perimeter | Uranium rounds (24 damage); keep pushing damage research | Firearm magazines are nearly useless here. Behemoth worms resist laser by 80%, so artillery handles worms. |
The thresholds are where each enemy starts to appear. At 0.5 evolution most spawns are still smaller units, and the mix shifts gradually toward the bigger ones. You have time to upgrade, but not unlimited time.
How pollution triggers attacks
Nests spawn biters and spitters freely, but those units only attack your factory when your pollution cloud reaches the nest. A spawner absorbs pollution from its chunk and spends it to send units to the next attack group. Every 1 to 10 minutes (random), the gathered group launches its attack. When attackers come near a military structure such as a turret, they prioritize it.
The pollution needed to send each unit rises with its size:
| Unit | Pollution to join an attack |
|---|---|
| Small biter / small spitter | 4 |
| Medium spitter | 12 |
| Medium biter | 20 |
| Big spitter | 30 |
| Big biter | 80 |
| Behemoth spitter | 200 |
| Behemoth biter | 400 |
So the same pollution buys fewer but far tougher attackers as evolution rises. The size of your cloud decides how many nests send attacks; evolution decides what they send.
Where pollution comes from
| Building | Pollution per minute at full load |
|---|---|
| Boiler | 30 |
| Burner mining drill | 12 |
| Electric mining drill | 10 |
| Pumpjack | 10 |
| Oil refinery | 6 |
| Steel furnace | 4 |
| Assembling machine 1 / chemical plant | 4 |
| Assembling machine 2 | 3 |
| Assembling machine 3 | 2 |
| Stone furnace | 2 |
| Electric furnace | 1 |
A building's pollution is its base pollution times its pollution multiplier times its energy usage multiplier. That means efficiency modules cut pollution (they lower energy use), while modules that list a pollution increase, such as productivity modules, raise it. Solar panels produce no pollution, which is why replacing boilers is the biggest single cut. Trees and ground tiles absorb pollution; 2.0 greatly increased default tile absorption, and water absorbs the most per tile.
How evolution really works
Evolution is a global value from 0 to 1. With default settings, three things add to a running total:
| Source | Adds to the total | Equivalent |
|---|---|---|
| Time | 0.000004 per second | Same as about 267 pollution per minute |
| Pollution produced by your machines | 0.0000009 per unit | 1,000 pollution/min adds 0.054 per hour |
| Destroyed spawner | 0.002 each | About 2,200 pollution or 500 seconds of time |
The total is then squashed into evolution with evolution = total ÷ (1 + total). Evolution 0.2 needs a total of 0.25, evolution 0.5 needs 1 and evolution 0.9 needs 9. In other words, the same gain counts for less the higher you are: a destroyed spawner raises evolution by 0.002 at the start but only by 0.0005 at 0.5 evolution.
Doing the arithmetic on those defaults shows what actually drives evolution:
| Scenario (constant rate) | Reaches 0.2 (medium biters) | Reaches 0.5 (big biters) |
|---|---|---|
| Time only, no pollution | About 17 hours | About 69 hours |
| 1,000 pollution per minute | About 3.7 hours | About 15 hours |
| 5,000 pollution per minute | About 53 minutes | About 3.5 hours |
Real factories grow, so these are not predictions, but the lesson holds: time alone is slow; pollution is what usually pushes evolution, and destroyed nests add a fixed, avoidable chunk. Evolution counts pollution produced, not pollution that spreads, so trees and water do not slow evolution. They only shrink the cloud, which means fewer nests attack.
Older guides often say the time factor is "per tick". With default settings it is 0.000004 per second; per tick it would be sixty times faster. If your numbers do not match what you see in /evolution, that is the usual reason.
Enemy types and resistances
Resistances in Factorio are a flat amount subtracted from each hit, then a percentage. This is why weak bullets fall off so sharply against big enemies.
| Enemy | Health | Resistances | What it means |
|---|---|---|---|
| Small / medium biter | 15 / 75 | Medium: physical 4 / 10%, explosion 0 / 10% | Medium biters already eat most of a firearm magazine's damage |
| Big biter | 375 | Physical 8 / 10%, explosion 0 / 10% | Hits through a single wall |
| Behemoth biter | 3,000 | Physical 12 / 10%, explosion 12 / 10% | No laser or fire resistance: lasers and flamethrowers stay effective |
| Spitters (small to behemoth) | 10 / 50 / 200 / 1,500 | Explosion only (0 / 10% to 0 / 30%) | Range 13 to 16, always shorter than a gun turret's 18 |
| Worms (small to behemoth) | 200 / 500 / 1,500 / 3,000 | Medium and up resist fire (50% to 70%) and laser (20% to 80%) | Range 25 / 30 / 38 / 48. Stationary, outrange gun and laser turrets |
Spitters' acid puddles damage units and slow them, but placed buildings and tiles are unaffected by the puddles. Their projectiles still hit buildings directly, and they go over walls.
Gun turrets and ammo progression
The gun turret is the base of every early defense: 400 HP, range 18, ten shots per second, no power needed. It costs 10 copper plates, 10 iron gear wheels and 20 iron plates, and the Gun turret research costs only 10 red science.
| Ammo | Damage | Unlock | Switch when |
|---|---|---|---|
| Firearm magazine | 5 physical | Available from the start (4 iron plates) | Medium biters appear (about 0.2) |
| Piercing rounds magazine | 8 physical | Military 2 (red and green science) | Big biters appear (0.5) and uranium is available |
| Uranium rounds magazine | 24 physical | Uranium ammo (needs utility science and uranium processing) | Final ammo for gun turrets |
Ammo damage scales with Physical projectile damage research, and fire rate with Weapon shooting speed. The research matters as much as the magazine: an upgrade applies to every turret at once, while placing more turrets only helps where you place them.
Inserters can load a gun turret with up to 10 magazines. Run a belt of magazines behind the turret row and give each turret an inserter; an inserter can also pass ammo from one turret to the next. A defense line that depends on you refilling it by hand will fail the first time you are away.
Space Age: level 6 and the infinite levels of Physical projectile damage have half the effect for bullets and gun turrets in Space Age.
Walls and turret placement
The stone wall has 350 HP and costs 5 stone bricks. Its resistances are high against acid (0 / 80%), fire (0 / 100%) and laser (0 / 70%), but low against physical damage (3 / 20%), which is what biters do. A wall is a speed bump that buys time for your turrets, not armor.
What the wiki confirms about walls, and how to use it:
- Walls stop melee units, not projectiles. Spitter acid and worm projectiles go over walls. Walls protect turrets from biters only.
- Big and behemoth biters reach two tiles. A single wall with turrets right behind it lets them hit the turrets. Use two wall layers, or leave a gap between the wall and the turrets.
- Biters attack walls that block their path to a target. Units already attacking a turret may push to it instead. Gaps that break up a long wall can work better than an unbroken line they methodically chew through.
- Gates have the same health and resistances as walls and close automatically for enemies when they are not connected to the circuit network, so an exit costs no defense. Gate research comes after Military 2.
-
1
1. Find where attacks come from
Open the map, turn on the pollution view and see which nests the cloud touches. Defend those sides first. Walling the whole perimeter in the early game is a waste of stone.
-
2
2. Place the turret row
Put gun turrets in a line facing the attacks, close enough that their ranges overlap. Keep the row out of worm range (25 tiles for small worms).
-
3
3. Feed ammo
Run a belt of magazines behind the row with one inserter per turret, or chain turrets with inserters from a single loaded chest for a short line.
-
4
4. Add walls in front
A wall line a couple of tiles in front of the turrets, with a gate where you need to pass. Double it once big biters are on the way.
-
5
5. Automate repair
Construction robots with repair packs automatically repair damaged buildings in a roboport's construction area (110×110 tiles). Repair packs stored in a roboport are available to its robots.
Laser and flamethrower turrets
Both need military science (Laser turret also needs chemical science), and both add something gun turrets lack.
| Turret | Range | Supply | Strength | Weakness |
|---|---|---|---|---|
| Gun turret | 18 | Magazines | No power; cheap; works anywhere | Ammo logistics; physical damage meets the highest biter resistances |
| Laser turret | 24 | 800 kJ per shot, up to 1.2 MW; 24 kW idle | No ammo; biters have no laser resistance | Power spikes; worms resist laser strongly |
| Flamethrower turret | 6 to 30, 120° arc | Crude, heavy or light oil by pipe | Fire damage over an area; biters have no fire resistance | Minimum range; slow stream can miss; worms resist fire |
Laser turrets. 1,000 HP, 20 laser damage, 1.5 shots per second. The power is the catch: 20 laser turrets firing at once draw up to 24 MW. If that browns out your factory, the turrets fire slower just when you need them. Accumulators placed on the defense network cover the spikes. Damage is improved by Energy weapons damage in the base game (the Space Age version is called Laser weapons damage) and by Laser shooting speed.
Flamethrower turrets. 1,400 HP, cost 5 engine units, 15 iron gear wheels, 10 pipes and 30 steel plates. Light oil does 110% damage, heavy oil 105% and crude oil 100%, so piping crude oil from a pumpjack line is fine, and light oil is a small bonus. Fire on the ground keeps burning, and ignited enemies take damage over time, which makes flamethrowers excellent against crowded attack groups. Walls have 100% fire resistance, so flames in front of a wall do not hurt it. Flamethrower research needs only red, green and military science.
Clearing nests: when and how
Each destroyed spawner adds 0.002 to the evolution total. That is cheap for one nest and expensive for fifty. Clear nests when there is a reason:
- Your pollution reaches them. Removing them stops those attacks at the source.
- They sit on resources or space you need.
- They are where you want to expand next.
Leave nests outside your cloud alone. They do not attack until pollution reaches them, though they do expand: every so often 5 to 20 units leave nearby spawners and walk to an unclaimed chunk to build a new nest or worm. New bases get medium worms only above 0.3 evolution, big worms above 0.5 and behemoth worms above 0.9, so new nests near you get more dangerous over time.
Spawners start with 350 HP, scale up to 3,500 at full evolution and regenerate 1.2 HP per second. Two practical rules for clearing them:
- Deal with worms first. Worms are stationary and outrange both gun turrets (18) and laser turrets (24). Turrets placed inside worm range will be hit, so either accept losses and repair, or bring enough firepower to finish the worms quickly.
- Clear early, before the nest grows tougher. A nest at low evolution is 350 HP of spawner and small worms; the same area later has bigger units and worms.
Artillery
Artillery solves the nest problem for good, at a price. The artillery turret has 2,000 HP and fires 0.3 shells per second. In automatic mode it targets enemy structures within 224 tiles (minimum range 32), meaning spawners and worms only, not moving units. Manual targeting reaches 560 tiles. Infinite research adds 30% of base range per level.
It costs 20 advanced circuits, 60 concrete, 40 iron gear wheels and 60 steel plates, and the base-game Artillery research needs red, green, military, chemical and utility science. The artillery wagon carries 100 shells (the turret holds 15) and brings the same firepower to anywhere your rails go.
The trade-off is evolution: artillery destroys spawners automatically, and each one adds 0.002. A string of artillery turrets along your perimeter keeps nests away, but it also removes many spawners in a short time. Use it when the nests near your walls are a bigger problem than the evolution they cost.
Space Age: Artillery moves later in the tech tree (it needs metallurgic science from Vulcanus). Other planets bring their own enemies (demolishers on Vulcanus, pentapods on Gleba) and new turrets: the tesla turret (range 30), the rocket turret (range 36, needs agricultural science from Gleba) and the railgun turret (range 40, 72° arc, needs cryogenic science). Nauvis biters work as described in this guide.
Map settings for peaceful or low-enemy play
All of this is optional. When you create a map you can change how much defense the game asks of you:
- Peaceful mode: enemies do not start fights and only respond when the player or a structure fires at them. Most return to peaceful afterward, and they do not expand.
- No enemies: no enemy units attack.
- Enemy bases (frequency and size): fewer and smaller bases means fewer nests within reach of your cloud.
- Starting area: a larger starting area pushes the first nests further away.
- Evolution: separate time, destroy and pollution factors.
- Expansion: can be turned off, or tuned with maximum distance, group sizes and cooldown. The Rail World preset turns expansion off; the Death World preset doubles base frequency and size, shrinks the starting area to 75% and raises the evolution factors.
Peaceful mode and no enemies disable some achievements. If you want the logistics game without the pressure, they are legitimate choices; the review covers how much that changes the game.
Common mistakes
- Clearing nests for fun. Every spawner adds to evolution. Clear what attacks you or blocks you.
- Staying on firearm magazines. Against medium biters, 4 of the 5 damage goes to flat resistance before research bonuses. Get Military 2 early.
- One wall, turrets right behind it. Fine until big biters arrive at 0.5; then they hit the turrets through it.
- Building turret lines inside worm range. Small worms reach 25 tiles; gun turrets reach 18.
- Laser turrets on a factory with no power headroom. A large attack becomes a brownout, which makes the lasers weaker.
- Counting on trees to slow evolution. Absorption shrinks the cloud and the number of nests attacking, but evolution counts the pollution produced.
- Artillery everywhere on day one. It is the right tool late, but the spawner kills it racks up raise evolution quickly.
Related guides
- New to the game? Pollution and the first turrets are introduced in the Beginner Guide.
- When military, chemical and utility science come online is covered in the Progression Guide.
- Room for ammo and oil lines is easier with a Main Bus.
- Whether biters, peaceful mode or no enemies suits you: the Factorio Review.
★Honest Take: defense is a tax you can set yourself
Biters are the part of Factorio players argue about most, and the argument usually comes from a misunderstanding. They are not random. They attack where your pollution goes and grow stronger mostly because your factory pollutes, so defense follows directly from how you build. Once you see that, the game gives you clear levers: cleaner power, efficiency modules, turrets only where the cloud reaches, and research before more turrets.
The honest downside is that defense is upkeep. Ammo belts, wall repair and power spikes take attention away from the factory, and at high evolution a weak line can cost an evening of rebuilding. If that sounds like a chore, the map settings exist for a reason, and turning enemies down is not cheating. If you keep them on, build for the next evolution stage, not the current one, and they stay a manageable tax rather than a crisis.