Which mod adds the ability to use electric motors as alternators?

Like what it says on the title. I don’t know what else to put.

Electric motors and alternator are two different things. Alternator convert kinetic energy into electricity I believe. Electric motors use electricity to run, not gas.

But to directly answer your question, I don’t think there is a mod that does that

It’s the Cataclysm++ mod, although it isn’t mentioned anywhere on it’s forum page or in the features readme it comes with. However, it seems to be currently out of date, so you may need to wait a bit or have a go at fixing it.

Yes, but an alternator is essentially just an electric generator, which is set up almost identically to an electric motor. Most of the time you can switch the two easily, and sometimes you don’t even have to.

Thank you sir. For some reason I thought it was in an older version of blaze mod.

So does that allow putting an electric motor on a bicycle and using foot pedals to charge the battery as well as using the battery to move?

An alternator is a rotor and stator that uses mechanical energy to rotate the rotor, causing the EM field to change and generate a voltage difference and a current.
An electric motor is a rotor and stator that uses a voltage difference and a current to generate an EM field, which rotates the rotor and provides mechanical energy.

They really are the same things, just with the voltage drop applied at different points and the rotor either driving a shaft or being driven by a shaft. You might optimize the designs somewhat differently, but the core bits are the same.

Electric motors aren’t going to be replacements for alternators in CDDA until someone figures out a solution to the electric motor efficiency problem.

In real life? You could set up a system like that, sure.
In CDDA? There’s no coded support for multi-mode motors/alternators like that but something could be added, probably as part of the solution to https://github.com/CleverRaven/Cataclysm-DDA/issues/24871.

In your case you want a generator/alternator on the foot pedals and a motor elsewhere. It can’t do both as of yet.