Electric Trains


Adds electric trains.

Content
27 days ago
0.16 - 1.1
36.0K
Trains
Owner:
Degraine
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
6 years ago
Latest Version:
1.3.6 (27 days ago)
Factorio version:
0.16 - 1.1
Downloaded by:
36.0K users

Info

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, and make sure that you have electricity coverage over the locomotive.

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%.

Advantages
- 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.

Disadvantages
- 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.

Compatibility (For modders)

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?)
- In your control.lua script, register the locomotive and its internal storage fuel item via the on_init() and on_configuration_changed() methods using this call: remote.call("electrictrains","register","locomotive-entity-name","fuel-item-name")

Eg, for this mod the remote call used in both methods would be:
remote.call("electrictrains", "register", "deg-electric-locomotive", "deg-electric-locomotive-fuel-dummy")

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.