AI Paths Unpacked: RimWorld Routing Quirks and Tactics
Your colonist walks around the mud instead of through it, ignores the shortcut door, and takes the long way past your trap corridor. None of that is random. RimWorld picks the cheapest route, and every kind of cell has its own price.
RimWorld 1.6Core game numbers. DLC notes are marked where they apply.
Known trap: +800
Outside area: +600 a cell
Turret field: range + 4
Pawns count ticks, not tiles
Each step costs the pawn's own move time plus the cost of the cell it steps onto. A colonist with the normal 4.6 move speed needs about 13 ticks for a straight step and about 18 for a diagonal one. Mud adds 14 to every step, so one muddy cell costs about as much as two cells of bare soil. Pawns add up the cost of the whole trip and take the lowest total, so a longer road over good ground often wins.
On a cell with both floor and furniture, only the highest cost counts. A shelf standing on mud costs 50, not 64.
| Cell | Extra ticks per step | What it means for you |
|---|---|---|
| Most built floors (concrete, wood, stone tiles), smooth stone, broken asphalt | 0 | The fastest ground in the game. Even a cheap concrete strip pays off on busy routes. |
| Packed dirt, rough-hewn stone, straw matting | 1 | Close to free. |
| Soil, rich soil, stony soil, rough stone | 2 | The normal baseline outdoors. |
| Lichen / sand | 3 / 4 | Slightly slow. |
| Mud, marshy soil, soft sand, ice | 14 | About double a normal step. The main reason for "weird" detours. |
| Shallow water and marsh | 30 | Undrafted pawns treat it as far worse (an extra 180 per cell when planning), so they swim only if there's no sane way around. |
| Deep water | No path | Not walkable, and standard bridges can't be built on it. Chest-deep water can be bridged. |
| Item stacks on the ground | 14 | A cluttered hallway is a mud hallway. |
| Chairs, stools, bushes | 30 | Keep them off the walking line. |
| Beds, tables, hoppers, trees, sandbags, barricades | 42 | A pawn walking along a row of sandbags only gets slowed by the first one. |
| Shelves | 50 | Shelves in a corridor reroute haulers. |
| Fence | 80 | Pen animals can't cross it at all. Use a fence gate. |
Why colonists step around traps and raiders don't
A pawn that knows about a trap treats its cell as costing 800 when planning a route, and if it does walk over it, the step takes 40 extra ticks. That is why haulers take a long loop around your trap corridor. Pawns that don't know about the trap see no cost at all and walk straight in.
| Who walks over the trap | Base chance it fires |
|---|---|
| Enemies who don't know it's there | 100% |
| Your colonists, slaves and tame animals | 0.5% |
| Visitors and traders from friendly factions | 0% |
| Calm wild animals | 20% (5% for an IED) |
| Wild men | 30% |
| Anyone with the Nimble trait | one tenth of the above |
| Trap-immune creatures | 0% |
Who knows about a trap
Your own pawns, friendly visitors, released guests, calm wild animals and wild men. Smart raiders and sapper raids spot about 30% of your traps and route around those. Plain assault raiders know none of them.
Placement that works
Traps can't touch each other, diagonals included, so leave an empty cell on every side: every other cell in a row, with a gap between rows. Put them where raiders have to walk and your colonists don't, and add a door for your own traffic.
Doors, forbidden doors and allowed areas
In 1.6 an allowed area no longer only limits jobs. It also bends walking routes: an undrafted colonist pays 600 extra for every cell outside its area. It will walk around a building to stay inside the zone and only cuts outside when the inside route is far more expensive. Drafted pawns ignore this.
Door speed by material
Colonists pay the door's opening time as part of the route. A slow door on a main hallway pushes pawns toward any other exit.
| Material | Door, ticks to open | Powered autodoor |
|---|---|---|
| Wood | 38 | about 9 |
| Steel, plasteel, silver, gold | 45 | about 11 |
| Uranium | 60 | 15 |
| Any stone blocks | 100 | 25 |
An autodoor costs 40 steel, 2 components and 25 of the material you pick, and uses 50 W. Without power it opens as slowly as a plain door of the same material. Walking through two closed doors in a row adds another 45 ticks, so airlocks belong on rarely used exits, not on the kitchen hallway.
Fire, water and darkness
- A cell with a ground fire adds 1000 to the route and each burning neighbor cell adds 150. Pawns will walk a long way to skirt a grass fire, which is why firefighters sometimes approach from the far side.
- Shallow water and marsh cost 30 per step. Undrafted pawns also count an extra 180 per cell when planning, drafted ones only 18. Draft a colonist if you want it to wade.
- Deep water is impassable for walking pawns.
- With Anomaly, pawns caught in unnatural darkness add 300 per dark cell. Ordinary night darkness has no extra per-cell route penalty.
- Snow and sand buildup slow each step. The heavier of the buildup penalty and the cell's own cost applies; they don't add up. Sand buildup comes with Odyssey.
How raiders pick their route
| Raid type | How it moves | What to build |
|---|---|---|
| Assault | Takes the cheapest open route to your base. Ignores turret range and knows no traps. | One open entrance with traps and a killbox. |
| Smart assault | Strongly prefers to stay out of what your turrets can see, out to their range plus 4 cells, and spots about 30% of traps. It will still cross a turret field when every other way is worse. | Hide turrets behind walls so they only see the entrance, or let the detour lead into traps. |
| Staged attack | Gathers and waits near your base first, then attacks like an assault. | Same as assault. Use the waiting time. |
| Sappers | Mine through walls toward an owned bed (or a building or a colonist). Also avoid turrets and spot some traps. | Thick outer walls near bedrooms and a mobile response team. |
| Breachers | Blast or cut their own hole in the wall instead of looking for a door. | A plain killbox won't catch them. Meet them where they breach. |
| Siege | Builds a mortar camp at range. | Mortars or a sortie. |
More on base defense: combat defense and raid defense tips.
Common detours and how to fix them
| What you see | Why | Fix |
|---|---|---|
| Colonists loop around a field instead of crossing it | Mud, marsh or sand on the straight line | Lay a concrete or wood floor strip. Floors cost 0. |
| A pawn ignores the obvious door | The door is forbidden, or the route leaves its allowed area | Unforbid the door and check the area overlay. |
| Everyone crawls through one doorway | Stone door (100 ticks) or two doors in a row | Use wood, steel or a powered autodoor and remove the extra door. |
| Haulers take the long way past the defense | Known traps cost 800 each | Give colonists their own door that skips the trap lane. |
| Hallways feel slow | Items (14), chairs (30), shelves (50) on the path | Keep a clear walking line. Put storage in rooms off the hall. |
| Penned animals stay stuck | Fences are impassable for pen animals | Add a fence gate on the side they need. |
| Raiders skip the killbox | Another open path, or a smart raid avoiding turrets | Close every other gap and hide turrets from the outside. |
See the routes yourself
- Turn on dev mode, open the debug settings menu and enable Draw paths. Select a pawn to see the route it is following.
- Enable Draw avoid grid during a smart raid to see where your turrets push raiders.
- Plan the walking lines when you lay out the base. The base layout tool helps.