Gregtech++ [GT++] [GTplusplus]

Gregtech++ [GT++] [GTplusplus]

94.1k Downloads

Possible problems with future GT5.09 compatibility

JohannesGaessler opened this issue · 6 comments

commented

I'm currentlc developing an update to GT5.09 Chemistry (see Blood-Asp/GT5-Unofficial#1030).
As part of this update I'm adding Hydrofluoric Acid, a substance which is also added by GT++.

Currently when using GT++ in combination with my branch it causes the following unintended behaviour:
-My Hydrofluoric Acid Cells get turned into GT++ Hydrofluoric Acid when put into a fluid canner
-The Chemical Dehydrator outputs my Hydrofluoric Acid Cells instead of the GT++ ones.

Balance considerations:
-My Hydrofluoric Acid is much easier to produce by synthesizing Fluorine and Hydrogen

At the moment I'm not sure what would be the best way to resolve this conflict.

One solution would be to simply give the substances different names, but to be honest it would be a little silly to have two versions of the same substance;
Maybe since GT++ adds generally very high tech you could call your fluid something along the lines of 'Concentrated Hydrofluoric Acid' to imply that the one I'm adding simply won't cut it for your machines.

Unifying the fluids could cause just big problems since you need 6000 of my Hydrofluoric Acid to produce 1000 Tetrafluoroethylene, which is on a much larger scale than what happens in GT++.
Either my recipe would be way to hard or your recipe would become much easier than intended.

I'm also adding the following materials, please tell me if they will also cause conflict:

Acetic Acid, Acetone, Allyl Chloride, Ammonia, Bisphenol A, Calcium Acetate, Benzene, Carbon Dioxide, Carbon Monoxide, Charcoal Byproducts, Chloroform, Cumene, Dimethyldichlorosilane, Ethylene, Hydrochloric Acid, Hypochlorous Acid, Hydrofluoric Acid, Methanol, Methyl Chloride, Phenol, Phosphoric Acid, Phosphorous Pentoxide, Polyvinyl Acetate, Propene, Sodum Hydroxide, Sulfuric Ethylene, Tetrafluoroethylene, Vinyl Acetate, Wood Gas, Wood Tar, Wood Vinegar

What I'm noticing so far is that you're adding a fluid called Hydrogen Chloride, and I'm adding Hydrochloric Acid.

commented

I'm not going to fix this, your PR will have to work around this as existing worlds will already contain my fluids and they cannot be renamed at this point. PR's should also consider modpacks when making such large scale changes, so as not to break existing scripts or recipe changes.

Call yours Weak HF or desaturated HF.
Because the recipe you imply would be completely wrong based on real life production (Which I add all recipes for)

https://en.wikipedia.org/wiki/Hydrofluoric_acid#Production

Production

Hydrofluoric acid is produced by treatment of the mineral fluorite (CaF2) 
with concentrated sulfuric acid. When combined at 265 °C, 
these two substances react to produce hydrogen fluoride 
and calcium sulfate according to the following chemical equation:

    `CaF2 + H2SO4 → 2 HF + CaSO4`

Although bulk fluorite is a suitable precursor and a major source of world HF production,
HF is also produced as a by-product of the production of phosphoric acid,
which is derived from the mineral apatite.
Apatite sources typically contain a few percent of fluoroapatite, 
acid digestion of which releases a gaseous stream consisting of sulfur dioxide (from the H2SO4), water, and HF, as well as particulates.
After separation from the solids, the gases are treated with sulfuric acid 
and oleum to afford anhydrous HF. Owing to the corrosive nature of HF, 
its production is accompanied by the dissolution of silicate minerals, 
and, in this way, significant amounts of fluorosilicic acid are generated.

Hydrochloric and Hydrogen Chloride are different things.
https://en.wikipedia.org/wiki/Hydrogen_chloride
https://en.wikipedia.org/wiki/Hydrochloric_acid

commented

JohannesGaessler - Today at 7:55 AM
I think the best solution to my PR conflicting with GT++ would be to rename my fluids to "Impure Hydrofluoric Acid" and "Impure Hydrochloric Acid" by default. Then, if GT++ is not loaded, rename them to what they were called before. Thoughts?
Anyways, I'll go to bed now.

Alkalus [GT++] - Today at 8:17 AM
Don't rename fluids, because if someone adds GT++ after the fact, it breaks your logic
All that HF they have pre GT++ now becomes GT++ HF
and they have 0 Impure HF

commented

I've looked around a little.
Forge fluids have a name and a default local name.
The name identifies the fluid, the default local name is what is shown to the player.
The default local name has no influence on the game logic, it's 100% cosmetical in a correctly functioning mod.

I set the name of my fluids to something like "HydrofluoricAcid_GT5U" which will make them distinct from GT++ fluids.
The default local name will be something like "Hydrofluoric Acid".

I have attached a suffix to the name of the following chemicals: Hydrochloric Acid, Hydrofluoric Acid, Phosphoric Acid, Sodium Hydroxide

Unfortunately it is not possible for me to check from within GT5U whether GT++ is installed because Loader.isModLoaded("GT++") will always return false, independent of whether or not GT++ is installed.
I assume this is because GT++ is loaded after GT5U.
For this reason I think I will not be able to dynamically change the default local name of my fluids unless I did some convoluted hacks like having GT++ set configs that are then read by GT5U.

I have thought about my options and I have decided to not include a prefix like "impure" to the default local names of my chemicals
In part they will have the same default local name as the GT++ fluids.
My reason for deciding this way is based on the following evaluation:

It is inconsitent to have the same substance be implemented twice.
It is also inconsistent to be able to produce any chemical in a chemical reactor with perfect purity except for one or two with no discernible reason.

I think the latter is actually a worse inconsistency because it implies that there is an issue with the chemistry after which the processes are modelled (accurate modelling is important to me).

As a player I think I would lose less immersion from having two mods implement the same substance twice.

The latter inconsistency would also appear more often since the amount of people who have GT5U installed will be greater than the amount of people who have GT5U and GT++ installed.

commented

The modid isn't GT++, it's miscutils.
GT5U already has a check for whether or not GT++ is installed anyway.
Look at the other compatibility that exists within it and see how it is handled.
https://github.com/Blood-Asp/GT5-Unofficial/blob/unstable/src/main/java/gregtech/api/GregTech_API.java#L199

I still suggest renaming your liquids which I have already implemented because mine have the real life processes for them, anything less means they'd be impure. I'm no chemical engineering, but I can read how they're made and re-implement that. There is no reason to cause confusion when GT++ is loaded by having fluids with duplicate names which serve different purposes.

commented

I still suggest renaming your liquids which I have already implemented because mine have the real life processes for them, anything less means they'd be impure.

What processes are done industrially is not determined by purity alone.
For HF specifically one of the major factors is that you need large amounts of phosphor for producing fertilizer.
Phosphor is mined from apatite, you get the HF as a byproduct, therefore it's a very cheap way of getting HF.
On top of that in real life chemical processes almost always beat electrolyzation or centrifugation because they're much cheaper when performed on a large scale.

However, mixing elemental Fluorine with elemental Hydrogen at a 1:1 ratio and heating the mixture would also yield very pure HF.
Unfortunately, elemental fluorine is very hard to get in real life (it is literally the most reactive element).
In real life the easiest way to get it is to electrolyze HF.

I think the best solution available (that does not require rebalancing) would be to change the default local name of some GT++ fluids (something like "Industrial Grade Hydrofluoric Acid").
The fluids in GT5U would have the normal names.
This would have absolutely no impact on the gameplay of either mod; The default local name is 100% cosmetical.
My point of view is based on the following opinions:

I think the standalone mod should be the base line.
Therefore regular materials should be included in the main mod, exceptional materials should be in addons.


I think it is very important to have consistent features.
The precedent set by Gregtech is that you can very easily separate elements and that no further impurities arise from processing them in your machines.
What I mean by this is that you can electrolyze or centrifuge basically everything at high speeds and that you can literally make distilled water in a chemical reactor.
You can also put elemental lithium in direct contact with oxygen and it won't spontaneously catch on fire.

At this point I think changing one of the core mechanics like electrolyzation is not an option.
As you said, I need to consider what already exists in Gregtech and to me that means to also consider the (partially unrealistic) processes that already exist.
In GregTech you have a magical machine at your disposal that will give you large amounts of elemental fluorine and elemental hydrogen, and you also have another magical machine which can synthesize chemicals very easily at perfect purity.
If the result of those machines were suddenly impure that would be a hard contradiction to the internal logic of the mod.

My analogy would be that if GT was a mod that included something else that is highly unrealistic, like let's say a dragon, but that thing had very clearly defined attributes, it would make no sense to deviate from those attributes in one specific case for no reason.


Anyways, if my arguments do not convince you I'm willing to concede on this issue.
I think it would be stupid to make the base fluids suddenly impure, but I think the majority of players will not care either way, so it's not worth it to keep arguing beyond this point.

commented

I think the standalone mod should be the base line.
Therefore regular materials should be included in the main mod, exceptional materials should be in addons.

The thing is, this has existed long before your addition to the base mod and you're the one who actually has to be considerate here because it is you who wants to add new content.

I'm willing to change the display name of my fluids.
Let me do it later today for the upcoming next release.

IHL Also adds Hydrogen Chloride. just as an FYI.