Prototype/Locomotive
The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/LocomotivePrototype.html
This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/Vehicle » Prototype/RollingStock » Prototype/Locomotive
A locomotive.
Mandatory properties
This prototype inherits all the properties from Prototype/RollingStock.
max_power
Type: Energy
reversing_power_modifier
Type: double
burner or energy_source
Type: EnergySource
Must be a burner energy source when using "burner", otherwise it can also be a void energy source.
Optional properties
front_light
Type: LightDefinition
front_light_pictures
Type: RotatedSprite
darkness_to_render_light_animation
Type: float
Default: 0.3
max_snap_to_train_stop_distance
Type: float
Default: 3.0
In tiles. A locomotive will snap to a nearby train stop when the player places it within this distance to the stop.