CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.65k stars 4.18k forks source link

Something wrong with vehicle power usage? #20375

Closed 1skandar closed 7 years ago

1skandar commented 7 years ago

I'm losing battery charge and I'm fairly sure I shouldn't be. I have a V8 diesel with a truck alternator. The only other things running are 3 headlights and a stereo. I'm driving around at 30 to 40 mph in the dark, if that matters. Still, I'm using up just shy of 1000 power and that alternator should be putting out 1320. And yet I'm slowly, but surely, losing battery charge.

The only other thing that could possibly be using power is if the Cable Charging System bionic screwed up, as I didn't unhook before driving, just let it decouple naturally (which, btw, is kinda weird, if understandable in its own right, I should be able to charge even from a moving vehicle. I understand the why, so I'm not calling it a bug, just odd)

Am I missing something here? I mean, if I had been using a car battery instead of storage batteries I'd be flat out of power.

Coolthulhu commented 7 years ago

Last time I checked the stereo used a different method to consume power. That can be considered a bug since the method is confusing: it skips the epower_to_power conversion and drains batteries directly. That means that stereo's epower should be multiplied by 373 to get the real number.

By counting stereo as 746 epower, we get roughly 400+~750+3*~200=~1750.

Another part which does this weird conversion is chimes. But no one uses chimes because there is no reason to.

1skandar commented 7 years ago

Yeah, I'd say that was a helluva bug. There is no way a stereo should be using more power than the engine itself, much less the headlights. Well, ok, fine. I was using it as a way to get a bit of a moral boost while driving versus my mp3 player, but sheesh.

Coolthulhu commented 7 years ago

Nah, that's not a bug - that's intended. The bug is only that it is hidden with weird numbers and unusual energy consumption code.

1skandar commented 7 years ago

Ok, let me rephrase that, that needs adjusting. Again, it makes absolutely no sense that a stereo drains more power than the most powerful internal combustion out there. That's just bonkers.

Edit: No, seriously, unless I'm missing something it gives the same moral boost as a mp3 player...and that's it. I mean, if I were to run a mp3 player off of a UPS and use a UPS Charger the stereo would still be using roughly 100 times as much power. As there something I'm missing here?

Coolthulhu commented 7 years ago

If you have some data on how much should given engine/piece of electronic take, list them somewhere.
Preferably in a separate issue, so that this one is about invalid display and the other one about balancing or "realism". Mixing issues doesn't work too well with github.

Keep in mind that the in-game stereo is loud. Think bass that you can feel with your feet, not mp3 player with a speaker next to it.

1skandar commented 7 years ago

I don't care how loud it is, when was the last time you turned on your car stereo....and ran your car battery flat? In what world does it make sense that stereo takes the entire output of a car's alternator ? Does sitting there with your radio running but the car not kill your battery in 15 minutes?

And from the aspect of game balance, an MP3 player takes, what 1 charge every 6 or 10 minutes? So why does a car stereo, which does functionally the same thing, cost a thousand or so times as much? I don't care how loud it is supposed to be, that doesn't look balanced. Or how about the fact the stereo drains more power than does any other vehicle system.... outside of electric motors. That includes combustion engines. I don't mean this to be rude, but why is this even a question that the thing is way out of whack? In what way does a system that gives you a small morale bonus justify that kind of cost?

Coolthulhu commented 7 years ago

In what world does it make sense that stereo takes the entire output of a car's altenator ?

IRL alternators vary their output (and thus load on the engine) based on demand. It makes perfect sense for a stereo to use up almost the entire output of an alternator, because that is what happens when the alternator only powers the engine and stereo.

Currently alternators have rather low values because they keep their load constant - they never turn off. If you want to request a feature where alternators vary their output based on load or battery content, make an issue and describe how you imagine it.

So why does a car stereo, which does functionally the same thing, cost a thousand or so times as much?

Because this power is incredibly cheap and stereo is better than MP3 player (more morale). Like in D&D games where a sword costs 15 gp, and sword +1 costs 2015 gp. Because you can't wield 10 swords, but can benefit from that +1 in almost every case where you'd use the sword. Mp3 player takes 150 turns to eat one battery. Stereo eats 2 batteries per turn, but uses vehicle power meaning it takes ~2/300 gasoline per turn. So it just consumes different common resource instead.

It's perfectly fine balance-wise.

1skandar commented 7 years ago

I'm trying to not get rude here, but I'm really struggling. Please, PLEASE look at the power drain of every other vehicle component and tell me why a +20 or +30 morale boost is worth out costing literally everything outside of electric motors (or nearly everything). Where as a mp3 player being charged from a vehicle mounted UPS charger would literally cost about 1/100th as much, or 1/1000th as much from regular batteries. Are you seriously, unironically, telling me the +10 morale bonus difference between the two is worth that?

Now listen I know we clashed in the last thread and we have some different ideas about balance. Still, look at this. I can see no angle where this makes any sense, none. I mean, a car alternator produces 780 power, are you telling me it's fine and balanced that it then goes into a 100 or so power drain just because you turned the stereo on? How in the heck does it maker any sense that a stereo is costing the vehicle twice as much as the engine? I'm not trying to be rude, or argumentative, but this is just literally incomprehensible

EDIT: Um, actually I think it doesn't give you any better benefit than the mp3 player. It gives you the "listened to music" morale buff, which is a flat +20 no matter the source. Unless I've missed something?

Coolthulhu commented 7 years ago

Please, PLEASE look at the power drain of every other vehicle component and tell me why a +20 or +30 morale boost is worth out costing literally everything outside of electric motors (or nearly everything).

It doesn't really matter that everything vehicle-related is incredibly cheap. Well, doesn't matter here - it is a problem, just that it's a problem with everything that ISN'T a stereo. What matters is: is stereo worth using? In which case would using the mp3 be preferable? That is what balancing is about.

Think of the situations where you'd prefer to use the stereo despite the extra cost. You should be able to come up with a few.

Are you seriously, unironically, telling me the +10 morale bonus difference between the two is worth that?

What else are you going to put that precious power into? If there were alternatives, such as autocrafting vehicle system, you'd have an argument like "using a stereo is a bad idea because I can masscraft heroin for a bigger bonus". But there is no autocrafting vehicle system, so the choice is:

I mean, a car alternator produces 780 power, are you telling me it's fine and balanced that it then goes into a 100 or so power drain just because you turned the stereo on?

Balanced? Of course. If you want quality of life because stereo+alternator drains your battery and shuts down, that's a whole different thing. This one could be considered.

But the argument that stereo uses 1000 times as much power when counting item batteries and vehicle batteries as identical is horrible. It's like saying that farming is overpowered because one use of hoe turns a seed into 4 seeds and 8 berries. For this argument to work, you'd have to prove that it is not worth spending the fuel to power the stereo, by comparing it to other sources of morale that can grant 10 morale, stack with mp3 and can be produced with less resources than power for stereo.

Once again: it doesn't matter that mp3 costs 1/1000 of the power. Not at all. If there was a whistle taking no resources to use and granting 5 morale, it wouldn't make mp3 too weak, even though now mp3 takes infinity more power than the alternative.

How in the heck does it maker any sense that a stereo is costing the vehicle twice as much as the engine?

If you're talking realism, grab real life data and provide it here. If you're talking balance, then it doesn't really make sense to talk about energy costs of combustion engines which use an order of magnitude more energy in the form of fuel. Translate costs to fuel and then compare them.

1skandar commented 7 years ago

I, uh, I can't believe this. You're serious? You really are? How old are you? Not exact age, but are you old enough to have owned a car? You've actually, I dunno know, been around a car for a few minutes? If so, does it cause an immediate panic if you decide you want to listen to a song with the engine off?

You want real world data, sigh, ok. A factory stereo takes about 50 watts or so. A car battery is rated somewhere north of 1 kilowatt hour. That means a car battery would drive that stereo for roughly 20 hours or so. Well, it doesn't quite work out that cleanly, but you'd certainly get 10 to 15 hours of just stereo use out of a fully charged battery before draining it far enough the car wouldn't start.

Also, a typical car alternator produces 75 ish amps to about 100 amps at 13 ish volts, or 1 to about 1.2 kilowatts or so. Now, look above where I said a stereo draws about 50 watts? We're talking like 5% or less of the max power output. (as an edit, heavy duty alternators, like those in buses and semis, can easily produce three to four times as much power)

And none of that should be surprising, really. My mind just boggles that I had to break it down like that for you. Cars are designed to generate a power surplus, even at idle. You can (and I have) literally take the battery out of a running car and it'll just happily keep right on running. Unless we're going to completely ignore reality, cars in Cata, the stock ones anyway, should follow the same principle.

Coolthulhu commented 7 years ago

I, uh, I can't believe this. You're serious? You really are? How old are you? Not exact age, but are you old enough to have owned a car?

Keep acting like a fucking jackass and you'll achieve the opposite of what you want.

My mind just boggles that I had to break it down like that for you.

Real life data requirement was so that you'd stop pulling "it makes no sense" and horrible bullshit arguments about balance that you obviously do not understand. Now you actually have something to argue about and if you didn't act like a mong about it, we'd be getting somewhere.

A factory stereo takes about 50 watts or so.

Typical tiny stereo, the in-game ones are louder than raised human voice and produce listenable music at range you can no longer understand a loud conversation. Not ghetto blaster yet, but not all stock stereos can produce "pumping bass" at that range.

Also, a typical car alternator produces 75 ish amps to about 100 amps at 13 ish volts, or 1 to about 1.2 kilowatts or so.

At maximum output. Once again I have to remind you about something I mentioned just a moment before: in the game, alternators do not disconnect, do not lower their load - they are only connected or removed. So by default they do not work at full load because then they'd be uneconomical in typical case (just driving around).

Now sum it up in a constructive idea. Do you want stereo energy usage to be more in-line with alternator output (or headlights or whatever), boost alternator output so that it is more suited to working as generator, treat stereo as smaller and weaker and recalculate power usage around that, or just complain and be smug about missing a point?

kevingranade commented 7 years ago

IMO stereo should be scaled down to standard volume output and standard power consumption. If the balance from the morale boost is a problem, that's the thing to change.

AncientSion commented 7 years ago

If you really wanted to, you could give a car stereo two action stances, one where its at a regular, human voice, loudness, and one for a Ghettoblaster type of level, costing either a bit or a lot of energy. Scaling the volume down entirely would make it impossible to draw zombies to your car like you can now.

1skandar commented 7 years ago

As a final note, even if this was considered an aftermarket stereo, those tend to only range up to 200 watts until you start having to get custom made parts. And, regardless, my point about stock cars should always be energy positive stands. No competent engineer would design a car that could just up and die from a dead battery while just driving around. The public backlash over that kind of thing would be huge.

Also, even at idle, alternators are still pumping out plenty of juice, as it spark plugs take something on the order of 10,000 volts to fire. So, the output difference between an altenator at idle and at speed isn't as great as you might think.

By all rights, cars in Cata should be a lot more capable of power generation than they are. From a game balance aspect, I get why they aren't, but it should still be understood. A car could power your house, if you were conservative. A bus could power a small business. No single electrical device is going to cause an appreciable draw on either of them. I'd say a good rule of thumb is any vehicle specific parts with a running power costs should not exceed 5 ish percent of altenator output, electric motors notwithstanding. The engine itself will be an exception, of course. In fact, that is something that might need adjusting upwards, 60% to 75% of total altenator output or so. I'd have to hunt down exact numbers.