Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(balance): gasoline engines can burn alcohol, V8 and V12 engines in general require higher-quality fuel #5750

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

chaosvolt
Copy link
Member

@chaosvolt chaosvolt commented Nov 22, 2024

Checklist

Required

Optional

Purpose of change

I mentioned in #5749 that allowing gasoline engines to run biodiesel but not regular diesel was a bit of an oddball decision, with alcohol arguably being the better choice for them (as @yay855 initially did in their PR before being nudged to switch it to biodiesel).

Describe the solution

  1. Changed the gasoline_engine abstract to allow ethanol, denatured alcohol, and methanol instead of biodiesel. As noted in discussion of feat(content): Biodiesel Fuel for Gasoline Engines #3716 the worry was that easy access to putting booze in your gasoline engine would make diesel engines obsolete. The main counterpoints are that ethanol still takes time and resources to set up (made arguably a bit less roadblocked but no less of a logistical hassle by feat(content): add clay and copper retorts for craftable DISTILL quality 1 #4977), while diesel engines have the even easier to produce option of lamp oil to run off of. It was additionally pointed out that ethanol has a fuel value of 15.6 compared to biodiesel's 29.6, so if anything if the concern is making diesel engines stay relative why would you give it a fuel option that has twice the effectiveness of the more obvious choice?
  2. Additionally added those three fuel options to the gas_turbine_engine abstract, maintaining the glorious tank and heli engine superiority over puny gasoline and diesel engines.
  3. Per Coolthulhu's suggestion, V8 and V12 engines were given stricter fuel requirements for balancing purposes, losing access to alcohol (gasoline engines) and lamp oil/motor oil (diesel engines). Per his suggestion, turbine engines retain the ability to eat whatever they like since they're low-efficiency.
  4. Updated description entries accordingly.

Describe alternatives you've considered

  1. Adding E85 fuel for more realism points and/or a way to stretch out the player's supply of gasoline without going full dorf mode like using pure alcohol would entail.
  2. Rigging it so we can power engines with just vodka and other drinkable alcohols for the lulz.

Testing

  1. Checked affected files for syntax and lint errors.
  2. Load-tested in compiled test build.
  3. Spawned a regular car, confirmed it lets me switch it to run off denatured alcohol.
  4. Spawned a big-ass V8 truck, confirmed it only accepts gasoline and avgas, and the engine description is different.

image
image
image
image

Additional context

@github-actions github-actions bot added the JSON related to game datas in JSON format. label Nov 22, 2024
Copy link
Collaborator

@RoyalFox2140 RoyalFox2140 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A year ago Kheir shot this down, so let's see how it goes this time. I'll ask and we'll have to discuss it more.

@yay855
Copy link
Contributor

yay855 commented Nov 22, 2024

Yes, I tried to do the same thing and it didn't get approved. Chaos's reasons are sound, at least.

@chaosvolt
Copy link
Member Author

Adding my musings from the discord here:
image

@blot-runner
Copy link
Contributor

Adding my musings from the discord here: image

You seem to focus exclusively on ethanol and denatured alcohol in your comparison. But methanol is super easy to produce in the game. No still, no fermenting, no rare tools or components al all, no books to search for, all you need is wood, water, clay retort, brazier and fire, and you're mass-producing fuel. The only real gateway here is Cooking 4, as opposed to 2 for the lamp oil, but that can be trained quite fast (I think it took me a day of game time). It does take twice the time to produce the same amount, comparing to the lamp oil, but the latter requires you to at least search for a pot or other proper cooking implement, not to mention hunting, fighting zombies or scavenging for the necessary fats.

@chaosvolt
Copy link
Member Author

No still

It does require distilling quality 1 which a clay retort provides, same as denatured alcohol. You're right though, wood does make the comparison more complicated and makes it possible to skip out on the fermentation. I do still feel that this is more reasonable than lamp oil to be honest?

Plus we really should not have added biodiesel to gasoline engines as an alternative to that, it makes it seem really weirdly inconsistent to allow one form of diesel but not factory-made ones.

@RoyalFox2140
Copy link
Collaborator

I am fine taking off biodiesel from gasoline engines unless a realism argument exists for biodiesel being used in a gasoline engine.

@chaosvolt
Copy link
Member Author

That would work too I suppose. Any other devs we should ask for an opinion on the current PR proposal, or should I just make it a removal of gasoline engines running biodiesel?

@Coolthulhu
Copy link
Member

Feels a bit weird IMO. Not as weird as biodiesel in gas engines, but still weird.

Blending would be more realistic, but wouldn't solve the gameplay issue of gas being non-renewable.
Is it really a huge deal if gas engines are non-renewable? It seems that the lamp oil diesel is the biggest outlier here, so rebalancing everything around that means more work than nerfing lamp oil.

I'd say that the best way to balance it would be to have lower level engines accept more fuel types, but have V12 only work with (av)gas for gasoline, and (bio)diesel for diesel. As far as I recall, gas turbines are inefficient, so it seems fine for them to be able to burn weird stuff.

@chaosvolt
Copy link
Member Author

chaosvolt commented Nov 23, 2024

I'd say that the best way to balance it would be to have lower level engines accept more fuel types, but have V12 only work with (av)gas for gasoline, and (bio)diesel for diesel. As far as I recall, gas turbines are inefficient, so it seems fine for them to be able to burn weird stuff.

That works then. Does that mean we want V12 diesel to disallow lamp oil and motor oil?

Honestly if needed then just removing biodiesel from gasoline engines works too.

@chaosvolt chaosvolt changed the title feat(balance): set gasoline engines to use alcohol as alternative fuel instead of biodiesel feat(balance): gasoline engines can burn alcohol, V8 and V12 engines in general require higher-quality fuel Nov 23, 2024
@blot-runner
Copy link
Contributor

blot-runner commented Nov 24, 2024

@RoyalFox2140

I am fine taking off biodiesel from gasoline engines unless a realism argument exists for biodiesel being used in a gasoline engine.

From what I was able to learn, it's the opposite - even stock diesel engines cannot run on pure biodiesel, you'll need AT LEAST 80% of the petrol diesel in the mix (pure biodiesel is still possible if the engine is modified to accept it). Taking into account the fact that one of the main problems is much higher viscosity than that of petrol diesel, I think the gasoline engine will die quite fast when fueled with any amount biodiesel (presumably, the injectors would be the first thing to go, but I'm no mechanic).

@Coolthulhu

I'd say that the best way to balance it would be to have lower level engines accept more fuel types, but have V12 only work with (av)gas for gasoline, and (bio)diesel for diesel.

I know that you're talking about gasoline/diesel engines and what I'm saying might be beyond this PR's scope, but - wouldn't it be nice to have steam engines accept liquid fuels too? All of them? I mean, as far as I know, they aren't really efficient, but their RL staple is "anything that burns is fuel" and it might provide an interesting alternative for lowtec runs.

As far as I recall, gas turbines are inefficient, so it seems fine for them to be able to burn weird stuff.

IRL they are the most efficient of the three (the best are >60% vs. ~55% for diesel and ~40% for gasoline engines, if the Wiki is to be trusted). IDK, I always thought the main balancing factor there was "like hell you're going to find one". Or is it just my luck?))

@chaosvolt
Copy link
Member Author

chaosvolt commented Nov 24, 2024

To be fair, Coolthulhu likely meant they're inefficient more than they're wasteful unless you have a downright wacky deathmobile. They have decent efficiency in game terms if I recall, just their power is so high that their fuel use is just high overall as a result.

EDIT: I'd actually forgot the efficiency really was set low, huh.

@blot-runner
Copy link
Contributor

blot-runner commented Nov 24, 2024

To be fair, Coolthulhu likely meant they're inefficient more than they're wasteful unless you have a downright wacky deathmobile. They have decent efficiency in game terms if I recall, just their power is so high that their fuel use is just high overall as a result.

Wait, you mean, there are people who don't build wacky deathmobiles?
Jokes aside, though, I've just checked combustion.json - gasoline engines, diesels and gas turbines are coded at 30%, 40% and 25% efficiency, respectively. For comparison, steam engines are 50% efficiency. 0_0
So, gas turbines are the least efficient, while steam engines are the most. Shouldn't it be the other way round?

@Coolthulhu
Copy link
Member

So, gas turbines are the least efficient, while steam engines are the most. Shouldn't it be the other way round?

Gas turbines are not that efficient alone. They do get mega efficient when combined with steam turbines and run at constant power, but that's not how they're used in the game.
Our steam engines could possibly get an efficiency nerf, partly for realism and partly for balancing. They're not the giant turbines used at constant power for electricity generation, so the 50% efficiency has no rationale.

But regarding this PR: is there a good reason to use gasoline engines over diesel? If not, gas engines could get a buff to something, like max power output at given size category.

@chaosvolt
Copy link
Member Author

But regarding this PR: is there a good reason to use gasoline engines over diesel? If not, gas engines could get a buff to something, like max power output at given size category.

Mostly seems to come down to personal preference in practice. Fuel spawns do vary a bit, generally gasoline tends to spawn commonly in small amounts while diesel and jp8 vehicles are rarer, but skewed towards larger stockpiles due to some of those spawns being big vehicles that can roll for fuel in multiple and/or bigger tanks. Both can potentially be plentiful if you hit the right location, like airports or helipads (also potentially including avgas for gasoline engines).

For diesel you can also get by in emergencies with lamp oil but while it's easy to produce it doesn't scale well, in my most recent laptop playthrough I got a Tankmod tank going using lamp oil and it took a decent chunk of a town's worth of zombies (and a lot of trying to make the tallow before it spoiled) to get 30 liters, which wouldn't have lasted me long but was enough to get started on a trip out of town. It was all a moot point however, because I'd completely forgot (somehow, despite being the one that picked that engine for the tank when I remade the old mod's vehicles to resemble IRL ones better) that I was running an Abrams and thus had a turbine engine the whole time, so I could've just been stealing gas from all the nearby cars the whole time...

Another time in a much older playthrough I'd got a humvee running off motor oil stolen from car engines, specifically ones from a bandit camp I'd happened to spawn not far from, which was less of a waste of time since that time it actually got the vehicle far enough to find some proper diesel and I wasn't forgetting about any easier sources of fuel that time.

@blot-runner
Copy link
Contributor

blot-runner commented Nov 25, 2024

Gas turbines are not that efficient alone. They do get mega efficient when combined with steam turbines and run at constant power, but that's not how they're used in the game.

Hmm, the Google Almighty states the M1 Abrams specific fuel consumption as 0.289-0.3 kg/kWt-hours depending on the rpm. With JP-8 energy density of 44 MJ/kg it translates to 27-28% efficiency, close enough to 25%. You're right, apologies for derailing the discussion.

But regarding this PR: is there a good reason to use gasoline engines over diesel? If not, gas engines could get a buff to something, like max power output at given size category.

Speaking as a layman: I always thought "gas vs. diesel" boils down essentially to "peak power vs. efficiency", so it sounds plausible. The only problem is diesels provide more torque, which, to my knowledge, is not simulated in the game, so if the gas engines get a power buff, it'll provide a somewhat counterintuitive outcome of a heavy deathmobile performing better off-road with a gas engine than with a diesel. Not sure how impactful it is, though, with the Impenetrable Trees of Doom still a thing, the vehicles are mostly confined to the roads anyway.
BTW, I think IRL diesels are also noisier, harder to repair (no idea HOW harder) and have issues starting in winter (though I imagine that one is already in place with "E_COLD_START" flag).

@RoyalFox2140
Copy link
Collaborator

Diesel engines are a bit more powerful, slightly heavier, have better fuel options, and cold start flag. Cold Start does almost nothing but in winter it's harder to start the car.

I think if we talk about fuel based cars diesel is superior, but I think if we talk about vehicles overall I always go with solar because of how much power you can produce as you scale up, a good electric motor is just harder to find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants