Closed Zaweri closed 9 years ago
Realistically an alternator could probably run off muscle-powered "engine". I guess it's either for balance reasons or technical reasons. If it's only the latter and not the former, I could try implementing it, because I always wanted it.
Stationary bicycle generators are a real world thing, so I see no reason why they shouldn't be possible in DDA.
Also there's nothing keeping you from adding a bicycle generator now that you can ship it off to other vehicles. Related feature of course is burning energy while doing so.
I started with this as part of an electric bike PR, but I got distracted with the refactoring in #10121. Since the engine isn't 'on' with the muscle engines, alternators won't currently work. A quick hack could be done, but the next thing anyone is going to request is for an electric motor to be attached. In which case both muscle engines and a small electric engine should be installable and toggleable. Not sure about all the other engine types. Plasma powered bikes!
The hand rims could run a dynamo as well, but I don't think boat paddles could, that would be silly, so there would probably need to be an extra flag of some sort.
What do you guys think?
Here's the branch I was working on: https://github.com/malhawee/Cataclysm-DDA/commits/elbike A dynamo is installable, but doesn't actually charge the batteries, because of the mentioned issue. The fix is to check if a muscle engine is on, and then find any muscle alternators to add to epower.
Why the muscle requirement on dynamo? Couldn't it just be a smaller alternator?
A truck alternator shouldn't really be installable onto some bike pedals should it? Could rename flag to "MUSCLE" which means it is capable of running on a muscle engine, but could be installed as an alternator. But a dynamo is distinctly different from an alternator in RL.
I'm not an electrician, but from what I can read, the main difference between dynamo and alternator is that dynamos produce DC while alternators produce AC. Since vehicle alternators have to tolerate engines working at different speeds, they'd probably work with bicycle power. http://www.differencebetween.net/business/structure-systems/difference-between-dynamo-and-alternator/ http://en.wikipedia.org/wiki/Alternator_%28automotive%29
Additionally quick googling shows that there are many DYI sites describing how to build a bike+car alternator power generator. Apparently the alternator will only kick in at certain speed so truck alternator might (doesn't need to be) out of question, but car ones totally do work.
Apparently electric motors can be run in reverse to generate power as well, http://en.wikipedia.org/wiki/Electric_generator. That would be pretty cool. Maybe a check to see if a muscle engine is being used and an electric motor is installed but not on, then make the motor provide a bit of epower? Could make electric bikes simpler as well. Alternators coyld be installable, but an electric engine could be used instead.
Currently, installing multiple engines requires a huge mechanics skill. It could be set up so that a muscle engine is ignored in this calculation. Is there a limit of 1 of these engines currently? A wheelchair bike would be interesting to see.
Currently a single muscle engine prevents installing any other engines, no matter the mechanics skill.
The mechanics skill requirement is probably there because the engines have to be properly synchronized. Since muscle engines can't run in parallel with proper engines, they don't need to be synced and so it should be easy to install them.
Currently a single muscle engine prevents installing any other engines, no matter the mechanics skill.
And if you've a better way to prevent folks from driving in reverse w/o a functioning engine, feel free to implement it and remove the lockout I installed to close that blocker. My blockerfixes are almost certainly not the best solution--they're just better than the blocker.
Do muscle engines need to be incapable of driving in reverse? I see why regular bikes couldn't do it, but a more complex machine could easily have a bunch of gears dedicated to allowing reverse driving, increasing rotations to power an alternator etc.
No, they need to not permit a quick-workaround of engine problems by installing hand rims on your driver's seat. They were perfectly capable of powering a hatchback when I was testing it.
How about some kind of mass limit? Something over 200-300kg probably couldn't be moved with legs or arms. Where's the block fix you mentioned in the code?
Thanks
I don't see a reason to restrict pedals or the ilk from running larger alternators, the balance comes in when they rob power output, you probably can,t power a bike and run a truck alternator at the same time with non-mutant strength, people can only generate a fraction of a horsepower.
You should be able to use muscle engines to gain a small amount of electricity while you are actively using them... Unless this is already implemented and I am a derp? Maybe a "Dynamo" part which would function as an alternator for the muscle engines?