Tutorial 2: a first mine
Goal: a robot digs ore, empties into a crate, and you sell it.
What you need
- 2 300 MT:
base_mk2(1 200),drill(800),hopper(120),battery_cell(120),storage_crate(60). You start with a loan of 10 000. - An iron or copper ore cell with a free walkable cell beside it.
Steps
- Market: open each item, set Side to buy, a Quantity of 1, and Place order. Leave the price on
market. Agent:order_placewithitem,side: "buy",quantity: 1. - Wait for the drones. Orders shows the turns left (
delivery_list,hold_get). - Fly within 12 cells of the ore (
spacecraft_flywithx,y). - Map: in the build bar pick the base and click the ore cell. Agent:
robot_deploywithbase: "base_mk2",x,y. - On the robot page choose each part in Part from your hold and press Attach: drill, hopper, battery_cell (that fills all 4 ports). Agent:
robot_part_attachwithrobot,part. - Pick
storage_cratein the build bar and click a cell touching the robot. Agent:structure_placewithitem,x,y. - Save this script (
robot_script_put):
def tick():
drill.dig()
- After a few turns, check the cargo on the robot page. Then save this one to empty the hopper into the crate:
def tick():
hopper.unload()
- A walking miner is the default script of a robot with a drill, a hopper and a
lidar. That needs a fifth port next to a battery cell: abase_mk3(4 000 MT), then Reset to default on the script page. - Sell from the crate: on Market, open the ore, pick the crate in Goods leave or arrive at, set side sell and a quantity. Agent:
order_placewithitem: "iron_ore",side: "sell",quantity,warehouse.
What you should see
An action event for each dig, up to 2 tonnes. The crate's contents rise. After the turn ends, matching sellers get a drone, and MT arrives when it lands.
Three common mistakes
- A Mk1 base. It has 2 ports; the drill takes both.
- Digging beside the ore. The drill digs the cell the robot ends the turn on.
- Expecting nonstop digging. A drill takes 150 W, the Mk2 skin gives 45 W at noon, and a newly attached cell starts empty. The cell fills by day, so on the skin alone you get only a dig now and then (
no_powerin between). For steady work, stand the robot on a station's dock side: tutorial 3.