Electric Trains

Adds electric trains.

6 days ago
0.16 - 1.1
3 years ago
Latest Version:
1.3.1 (6 days ago)
Factorio version:
0.16 - 1.1
15526 times


Another attempt to bring electric traction to the game. This mod introduces electric locomotives that can be recharged at train stops by connecting to the power network, and supplemented by battery packs that can be charged in a recharging station that has a suspicious resemblance to an accumulator (very Batteries Not Included, I know).

This new type of locomotive can be mixed and matched with traditional locomotives, or you can use purely electric traction. When placed they will have a small amount of charge - enough to get to a nearby train stop and begin charging. Note that direct charging only works when the train is running on a schedule that takes it to a train stop.

The large internal buffer (250MJ) of electric locomotives can be supplemented by battery packs that hold 100MJ of energy each. If the locomotive has run through its internal charge and is drawing power from a battery pack when it arrives at a train stop, the battery pack will be fully drained and removed as charging commences. Battery packs can be stacked up to 10, increasing the range of the locomotive by 400%.

- There are no restrictions on where you place the locomotives in the train.
- Electric locomotives are lighter and have higher acceleration and top speed compared to standard locomotives.
- Charging at train stops means you can do away with fuel logistics entirely and rely on your power grid to keep your train network running.

- Electric locomotives have less total energy capacity compared to a vanilla locomotive, especially once you have access to rocket fuel.
- Vanilla locomotives' performance improves with better fuels, whereas electric locomotives have fixed (though high) performance.
- Recharging electric locomotives and battery packs creates a high demand on power supplies.


If you want to take advantage of the system in this mod for charging a locomotive, you can register one by doing a couple of things:
- Define a locomotive entity with the properties you want in your mod, as usual.
- Define a fuel item with the energy capacity you want the locomotive to inherently possess. (Technically optional, but if you don't then what's the point?)
- Use the following call in your control.lua script to register the locomotive and its internal storage fuel item: remote.call("electrictrains","register","locomotive-entity-name","fuel-item-name")

My electric locomotives use the 'electrical' burner category, and should accept any fuel item (reusable or not) that matches, if you want to add one.