Skip to main content

Locomotive

CategoryTrains
locomotive
Category
Trains
Prototype type
locomotive
Internal name
locomotive
Planet
nauvis

Overview

A locomotive is the powered engine unit of a train in Factorio, used to pull cargo, fluid, or artillery wagons along rails. Locomotives provide propulsion, braking, weight, friction and air resistance values that determine a train's acceleration, top speed and handling. They accept solid fuel (wood, coal, solid fuel, rocket fuel, nuclear fuel) in their fuel inventory to operate while manually driven or when acting as the traction source for an automated train.

Locomotives connect to other rolling stock simply by placing units adjacent on the same track; a green-outline connection indicates a valid coupling. An already-placed disconnected wagon can be coupled by driving a locomotive near it and using the Connect/Disconnect control (default key). The same control disconnects the last car of a train when needed. When driving a locomotive directly the usual vehicle controls apply: accelerate, decelerate/reverse, and steering; controller users may choose relative or absolute driving modes for joystick behavior.

Train motion is simulated each tick using the locomotive's and each wagon's prototype values for weight, friction, braking force and air resistance. Locomotives contribute weight = 2000, air_resistance = 0.0075, friction_force = 0.5, and braking_force = 10 to the train totals. These numbers combine with those from wagons to calculate per-tick speed changes via friction, acceleration from locomotives (including fuel acceleration multiplier and a factor of 10 per locomotive facing the moving direction), and air resistance applied against the front rolling stock. The computed speed is capped by max_speed = 1.2 × fuel_top_speed_multiplier. Braking uses the summed braking force (modified by braking technology bonuses) divided by total train weight to reduce speed each tick.

Air resistance is smaller for a locomotive than for a cargo wagon, so placing a locomotive at the front of a train reduces aerodynamic penalty and helps achieve higher speeds. The locomotive’s higher braking force also makes it an effective contributor to train stopping power; however braking is distributed across all rolling stock according to their braking_force values.

Locomotives interact with the world and enemies in distinct ways. A locomotive in transit will usually crash through most obstacles (biters, vehicles, player) if moving sufficiently fast; if the train is moving too slowly or the obstacle is too strong, the train will stop instead. When a locomotive collides with enemies, the enemies will retaliate and may attack and damage both the train and the rails. While stopped and attempting to accelerate, a train will continually take damage if colliding with resistive targets. Construction robots and logistic repair methods are commonly used to automatically repair locomotives and tracks at stations.

Fuel choices determine run duration when burning in a locomotive. Typical burn times per single inventory item are: wood 3.33 s, coal 6.67 s, solid fuel 20 s, rocket fuel 166.67 s, and nuclear fuel 2016.67 s. Using higher-tier fuels increases fuel_top_speed_multiplier and fuel_acceleration_bonus factors, improving acceleration and maximum achievable speed for the train.

Practical notes:

  • Always place at least one locomotive facing the intended travel direction; additional locomotives facing that direction multiply acceleration contribution and help pull heavier trains.
  • Put locomotives at the front to benefit from lower air resistance and better acceleration; reversing or having locomotives at the rear reduces efficiency.
  • Monitor fuel in locomotives at automated stations to prevent stalled trains; inserters or dedicated fueling chests are typical solutions.
  • Use construction robots or repair packs at station areas to fix locomotives and rails after combat or collisions.
  • When driving manually, use the Connect/Disconnect control to manage coupling; controller users may need to adjust joystick mode for preferred steering behavior.
No related recipes

Other entities of this type