DonBruce64 / MinecraftTransportSimulator

A Minecraft mod that adds planes and automobiles with realistic physics!
Other
113 stars 61 forks source link

[Suggestion] Option for engines to use only a specific fuel #112

Closed Profilename1 closed 5 years ago

Profilename1 commented 5 years ago

I think it would be nice, if only for the purpose of realism, if it was possible to "lock" engines to a certain fuel. This comes up with mods like Immersive Engineering and Immersive Petroleum, which introduce Ethanol, Gasoline, Diesel, and Biodiesel. All four of those are plausible fuel choices, but of course real life engines only take one or two of those at best.

In addition to realism, this change would also give modpack makers a means of gating vehicles behind certain advancements. To speculate a bit, a pack might have kerosene tractors come first, followed by gasoline cars and then diesel trucks. Then there could be a "Jet-Grade" kerosene with additives for your jet engines.

Overall I wouldn't say that this is a high priority item, but it's definitely something to keep in mind when drawing up the roadmap.

fsendventd commented 5 years ago

Just as a note, real life engines can take all four of the fuels you mentioned in the first paragraph. Racing engines run off ethanol, standard automotive engines are gasoline, and diesels can run off petroleum diesel or biodiesel.

DonBruce64 commented 5 years ago

I can see this being good, however specifying specific fuels for specific engines will be problematic if those fuels are not present in a user's modset. Mods could be made dependent to packs, but that would not work for multiple mods that add the same fuel. For example, "fuel" is a liquid present in multiple mods. As is ethanol. So marking one as dependent to ensure the fuel exists would mean that you have to use that mod no matter what.

Profilename1 commented 5 years ago

Naturally, lava should be the default fuel for all engines so as to maintain compatibility with vanilla. You are right, though. Since the content itself is handled with submods, it would have to be those submods that specify what fuel an engine can take while currently the coremod handles fuel. Ideally this could be handled in a config file but this further complicates things as now each submod would have to have a config and each engine would have to have an entry in that config where you could define what fuel (or fuels, as fsendventd pointed out) that engine could take and possibly even how efficient each fuel is for said engine. It all snowballs.

DonBruce64 commented 5 years ago

Right. Having each type of engine use a unique fuel is quite possible. But having each engine itself use a different fuel is another matter as it would require either specifying it before-hand, or creating a static list of fuels and forcing pack creators to pick from them. Both of which have their pros and cons.

Profilename1 commented 5 years ago

One possible compromise would be having a list of engine types that pack makers could then flag their engine as being. Then perhaps the fuels for each type could be managed from the config of the main mod. You could split it into, say, spark ignition, compression ignition, and jet engines with lava being the default fuel for all of them. Then you could generate the list of fuels as the config does now, but repeat it for each of the static types. This does, of course, have drawbacks, the biggest being the hardcoded list of engine types.

DonBruce64 commented 5 years ago

Yeah, I really don't want to set people into static engine types. I foresee that being painful should people want more types of engines. On the other hand, if I let people choose types, then one person could make a "racing" type and another could make a "formula1" type, and both could be the same engine but require different fuels.

PDelta41 commented 5 years ago

One thought that I had would be multiple "categories" of fuels. MTS would specify "fuel 1", "fuel 2", (or just "gasoline", "diesel") and so on; by default, lava would qualify as all types, but just like the config now allows changing the one fuel, you could, for example, set gasoline as "fuel1", diesel as "fuel2" (and bio-diesel as "fuel2" with 0.85% efficiency), and if you wanted to get really fancy, allow engines that use multiple fuels, like a flex-fuel using both gas & ethanol (perhaps with different efficiencies). It would also probably make sense to default engines to "fuel1" unless specified for backwards-compatibility.

DonBruce64 commented 5 years ago

Again, this leads to the problem that packs might not use the right fuel for their engines. For sure it's possible that they might talk, but if you just have fuel1 and fuel2, then what one pack uses for fuel1 as avgas might be another's fuel1 for ethanol. I do like having generic names as an option, however, as it lends itself better to uniformity. Might do something like that....

DonBruce64 commented 5 years ago

Implemented in V15.0.0.