Electric Motor Size Revamp

So I recently made a PR to add a new size of motor (motor_tiny) to the electric motors.

Discussions revealed that the sizes of electric motors might need a revamp.

I proposed this solution :

enhanced electric motor is a like a Tesla engine : 780 HP, 175 kg and 250L Tesla Model S Drive Unit

large lectric motor is like one from a racing car : 420 HP, 90kg and 16L AM Racing AMR Dual Stack 250-90 AC Motor

electric motor standard electric car : 125HP, 68kg and 20L Curtis 1238e-7621 HPEVS Dual AC-34 (I don’t know if it’s really “standard” or not)

small electric motor motrobike : 15HP , 17kg and 5L BLDC / PMSM brushless motor HPM-10KW

tiny motor electric bike : 0.7HP , 5.8kg and 0.5L Front 500w Heavy-Duty Direct-Drive Motor

Which seems reasonnable to me but isn’t really backed by any strong rationnal on the choices of reference models.

So, since I won’t be able to complete this PR before august anyway, I thought that it could be a good idea to discuss it so that we might come up with something better. Or at least something that enough poeple agree on to avoid someone having to change everything all over agin next year.

What’s your thought on motor size, weight and power ? Is the solution I proposed good enought, do you have suggestion to improve it ?

1 Like

The tiny probably isn’t tiny enough to be the sort of thing you’d want in an electric fan or a toy or something. I’d say leave the rest and make the tiny motor like a 12V one that can’t be installed on vehicles, only used to craft certain electronics.

Also, and this is probably silly, but round numbers would be a bit easier to work with and remember. Maybe 800, 400, 200 and 20HP?

1 Like

Yes definitly, I was planning to add motor_micro that would only be for crafting and not instalable on vehicle

Yes we need values that can be easily expressed in power and "power": 1 is 0.5HP, so round number would be better.

1 Like

Yeah, using a “fan motor” (tiny motor in game) for a bicycle just seemed silly. But if changing those ones to micro, and moving all crafting of tiny parts (automated doors on vehicles, etc) and leaving the tiny motor for bicycles only, seems a good idea.

Absolutely no need for round numbers. Just why? :zipper_mouth_face:

I think a small project like this one often gets overlooked for bigger, flashier changes. (We’ve had a ton of great changes lately – rotting, lab changes, first aid)

I don’t have anything to offer in the way of advice for development, but I can give props.

You’re refining something in the game. Good job. Thanks for your efforts.

1 Like

Pair number would be easier to convert in Power, but we can use the nearest one.

Thanks, but it’s not done yet ^^"

Jesus Christ. I wonder how fast it burns through the power reserves stored in batteries.

Remote control buggies? Like toy ones?

@John_Candlebury : Noted on github that the enhanced electric motor is supposed to be a hub wheel motor so it could stay the way it is. Since the small size was intended from the beginning.

Actually this is a very good question, does anyone know how epower (the power consumption) is calculated ? If we change power on the motors epower should probably follow so that the electric motors don’t suddenly become ultra OP. Hopefully we can find an epower that won’t make them useless either …

Well if RC car is an item then someone needs to add that behaviour to the game. If RC car is a vehicle : first you would need to implement miniature_frame and all the other miniature part of the car, and second I was planning to make micro_motor not be instalable so that would not work.
But If power can be set as something between 0 and 1, then we could make a micro_motor have less than 0.5HP and be instalable.

From the relevant functions in the vehicle code:

int vehicle::epower_to_power(int const epower)
    // Convert epower units (watts) to power units
    // Used primarily for calculating battery charge/discharge
    // TODO: convert batteries to use energy units based on watts (watt-ticks?)
    constexpr int conversion_factor = 373; // 373 epower == 373 watts == 1 power == 0.5 HP
    int power = epower / conversion_factor;
    // epower remainder results in chance at additional charge/discharge
    if (x_in_y(abs(epower % conversion_factor), conversion_factor)) {
        power += epower >= 0 ? 1 : -1;
    return power;

int vehicle::power_to_epower(int const power)
    // Convert power units to epower units (watts)
    // Used primarily for calculating battery charge/discharge
    // TODO: convert batteries to use energy units based on watts (watt-ticks?)
    constexpr int conversion_factor = 373; // 373 epower == 373 watts == 1 power == 0.5 HP
    return power * conversion_factor;

1 epower is 1 watt is 1/373 power. 1 power is 1/2 HP is 373 watts is 373 epower.
Altenators are 50-75% efficient in converting power to epower.
Electrical motors should be 75-90% efficient in turning input energy into power but I haven’t worked through the code to figure that out - the actual numbers (ie, a small motor has -1000 epower and 20 power) can’t be applied directly because that would have the small motor consuming ~3 HP of power to produce 10 HP and that’s not right.

Does this mean that the value are wrong and “gamey” or does it mean that your missing info to explain them ?

I fear that the changes I suggested, especially on power, will break electric engines. For example enhanced_electric_motor would go from 500 power to 1560 power and if I keep same ratio between epower and power it gets -187200 epower.

So maybe it would be better to just change volume and weight and not touch power so that it doesn’t mess with game balance ?

I traced through the code last night and had a discussion with Kevin about how things worked. And the answer is, electrical motors actually are 700% efficient: they produce 37.3 kW of motive power at the cost of 5 kW of electrical power.

I don’t intend to fix the problem right now, beyond changing the units of power from 1/2HP to watts so that it’s easier to reason about the problem.

That’s what I get when I bump enhanced_electric_motor power to 1560 . It doesn’t seem right …

But then again the original values were already pretty high :

I don’t intend to fix the wonky math for vehicle speeds. I would just like to add a way to display a vehicle’s current power epower consumption/generation and approximate time to full recharge/discharge.

Doing that becomes slightly easier if everything is in the same units.

Yep no problem, the wonky math just means, I think, that for now it’s a bad Idea to mess with motor power

engine power is solely accessed through part_power, so there’s space to do the conversion.

Ok new problem : If I replace motor_small and medium_storage_battery by motor_tiny and small_storage_battery in the Electric Bicycle recipe I get this :

With a tiny motor of 2 HP it’s not enought to move the electric bike, which is annoying since the real life equivalent is 0.7 HP.

1 Like