Tutorial 4: from ore to raw metal
Goal: a factory line that turns iron ore into raw iron with nobody watching.
What you need
- A powered network (tutorial 3).
mining_drill(900 MT),ore_crusher(1 200),concentrator(1 600),smelter(2 500),depot(400), 3conveyor(5 each), cables.- An ore cell with seven free buildable cells to its east.
Steps
- Place this line, west to east.
Ddrill (on the ore),>conveyor facing east,Kcrusher,Nconcentrator,Msmelter,Pdepot,Ccable running to your station:
row Y D > K > N > M P
row Y+1 C C C C C C C C
On the web, pick the item in the build bar, choose Facing east for belts, click the cell. Agent: structure_place with item, x, y, direction: "east".
- Set the recipes. The drill has none to choose. Open each other building, or call
building_recipe_setwithidandrecipe:
| building | recipe | takes | gives |
|---|---|---|---|
| crusher | crush_iron |
2 ore | 2 crushed |
| concentrator | concentrate_iron |
4 crushed | 1 concentrate |
| smelter | smelt_iron |
2 concentrate | 1 raw iron |
recipe_list with ore: "iron" lists them. For copper use crush_copper, concentrate_copper, smelt_copper.
- Wait. Look at Industry for states and buffers (
structure_getwithid). - Empty the depot into your hold (
depot_unloadwithid,item: "raw_iron",quantity), then sell.
What you should see
Drill working, items riding the belts, then crushed ore, concentrate and, several turns later, raw iron in the depot. This original chain makes no tailings or slag.
Power budget
Drill 150 W, crusher 200 W, concentrator 300 W, smelter 800 W: 1 450 W when all work. Three panels give 1 500 W at noon at best. Add panels and batteries if loads are shed. The highest priority number is shed first.
Three common mistakes
- A belt facing the wrong way. It must start on a cell touching the source and point away from it.
- No recipe. The building idles with "no recipe chosen".
- Ignoring wear. Drills and crushers wear out. Feed a
drill_bitormill_linerinto their input; at 500 durability they run at half speed, at 0 they stop.