dewiniaid / BatteriesNotIncluded

BatteriesNotIncluded, an electric vehicles mod for Factorio
Other
3 stars 0 forks source link

[Suggestion] Let batteries work in normal trains?? #11

Open g-lewis opened 4 years ago

g-lewis commented 4 years ago

I don't know if this is possible, or if it is possible I don't have any idea how it might work. But if at all possible could you allow battery packs to work in normal locomotives, so that I might be able to use the battery packs and Mk3 Locomotives from Factorio Extended together?

robot256 commented 4 years ago

BNI creates a new fuel category, "stored-electricity", and adds locomotives that use it and fuel that provides it.

Factorio Extended Electronic Locomotives create a different new fuel category, "electronic", and wirelessly beams it to the locomotive (inserted via script).

It would be pretty simple to create a separate mod, dependent on both of the above, that modifies the Electronic Locomotive prototype (in data-updates.lua) so that they accept "stored-electricity" as fuel rather than "electronic". However, the script does not check to see if the locomotives will accept the fuel. So to prevent the game from crashing, you could copy the Electronic Locomotives and make new Electronic Battery Locomotives that accept the BNI stored-electricity fuel category, and hide the original Electronic Locomotives (if you want).

EDIT: Forgot to make clear that Factorio Extended does not create any Electronic Locomotives by itself. They are in two separate mods by LuziferSenpai, and you can have Electronic Locomotives without Factorio Extended. Either way, the only way to do what you are asking for is to make completely different locomotives that use the BNI fuel type, which is easy to do in this mod or in a new one.