Space Engineers

Space Engineers

Heavy Gas
78 Comments
da britian 9 May @ 1:21am 
Okie Doke, thanks for the clarification.
nevcairiel  [author] 8 May @ 3:59pm 
The mod should automatically work with any O2 and H2 tanks, no matter their size or origin.
da britian 8 May @ 3:52pm 
Got any plans to update the new O2 & H2 tanks? Including the DLC & small grid small oxygen tank?
nevcairiel  [author] 2 Sep, 2024 @ 10:28pm 
My mass settings are based on preserving the mass of the ice when processing it, which these values are the only ones that achieve that without modifying H2/O2 generators. You can assign any density to the gas based on their presumed pressure in the tanks.
Uzar 25 Apr, 2024 @ 5:13am 
Hi nevcairiel, thank you very much for this mod! Adds more realism and forces you to think about how you build your gas haulers.

On another note, would you be willing to provide an additional mod for the IO gases (Gasoline, RocketFuel, Steam and Deuterium)? Happy to send you the adjusted code.
Or would you be OK with me uploading a separate mod (based on your code but for adjusting said values) myself?
Darian Stephens 20 Mar, 2024 @ 5:00am 
How does this interact with the Zeppelin Gas Cell mod?
That's technically a hydrogen tank, but it's meant to float based on the hydrogen inside.
Is there an exception for this mod, or will the lift counteract the weight enough, or what?
Hage Maoh 11 Mar, 2024 @ 9:47pm 
Any chance you can add an XML config file for this? I like the basic features, but want to be able to rebalance gas masses
nevcairiel  [author] 20 Jan, 2024 @ 1:42am 
For H2, its 0.011kg per liter, for Oxygen its 0.178kg
Zen_Man 20 Jan, 2024 @ 1:36am 
I am too stupid to calculate gravity acceleration into mass so I just tested H2 mass in a tank on Pertam (g = 1,2). Dividing mass change by litre change. Its 0,0162 Kg per Litr.

Can anyone correct me please if I am wrong?
nevcairiel  [author] 20 Jan, 2024 @ 12:18am 
@kinngrimm
From reading the description it should be fine.
kinngrimm 19 Jan, 2024 @ 4:39pm 
is this compatible with the mod "Viable Hydrogen"
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2266876809
nevcairiel  [author] 2 Jan, 2024 @ 1:53am 
The only use I can permit is an unlisted personal copy with adjusted values if you want to. Use in a public mod is not allowed.
PeterRabbit 1 Jan, 2024 @ 7:41pm 
@nevcairiel Because this mod still doesn't allow me to configure the densities of the gases, may I use a modified version of this script in my own gas rebalance mod?
PeterRabbit 1 Jan, 2024 @ 7:40pm 
Because we can infer that our "oxygen" gas is actually stored as liquid oxygen, I will similarly assume that hydrogen is also liquid hydrogen which has a density of 0.071kg/L, but this is not sufficient because to be able to burn hydrogen in space, we also need to bring along oxygen. Because ice converts directly into "hydrogen", and thrusters can run off nothing but "hydrogen", I make the assumption that hydrogen tanks actually store both hydrogen and oxygen. The mass ratio of hydrogen to oxygen in water is 1:8 so do a bit of math and you end up with 0.4266kg/L as the density of "hydrogen".
PeterRabbit 1 Jan, 2024 @ 7:40pm 
Almost all of the values in the game can be changed except for one critical value which is how much "oxygen" it takes to pressurize volume, specifically that it takes 1L of "oxygen" to pressurize 1 cubic meter of space. Therefore any realistic balancing of oxygen and hydrogen has to start with that as a basis.
The big complication here of course is that air contains other gases too, but given that an air vent can fill an oxygen tank from planetary atmosphere, I will just assume air is pure oxygen with a density similar to Earth.
Earth's atmosphere has a standard density of about 1.225kg/m^3 at sea level, and because 1L of "oxygen" fills 1m^3 of space, that would result in a density of 1.225kg/L, which is actually not too far off from the density of liquid oxygen which is around 1.141kg/L.
Syn G's Tits 1 Jan, 2024 @ 12:36pm 
Space Engineers itself has no information about the pressure of the tanks. Nor the weight of the gas in the tanks. It is only logical to conclude that this is a Cryogenic tank and the gas inside is stored in its liquid form. Do you have information from keen I don't that tells you the pressure inside of the hydrogen and oxygen tanks?
nevcairiel  [author] 1 Jan, 2024 @ 5:14am 
You can't actually liquify Oxygen or Hydrogen at room temperature, it would need be stored cryogenicly. So, it doesn't have to be liquid.

The values used in the mod are valid for gaseous storage, not liquid. And you can certainly measure gas as a volume and a weight. The pressure inside the tank would then be derived from that.
Syn G's Tits 31 Dec, 2023 @ 7:15am 
You'd then also have to alter the output of the O2H2 Generator if you wanted to maintain the 1kg to 1kg ratio with 2:1 hydrogen:Oxygen.
Altering the O2H2 values so 1kg of ice produces: 1.5586520777L of Hydrogen and 0.7793260388416L of oxygen would give you a near perfect conversion, with realistic liquid "gas" weights.
Syn G's Tits 31 Dec, 2023 @ 6:55am 
Hey man. Cool mod! I've made a modification to my version that is much harder but more realistic. You're Liter to Kilogram conversion seems dubious to me so I looked around online for real values for Hydrogen and Oxygen in their liquid state (Which given that we do not know the pressure we can only assume that it is liquid if Liters are to be a useful metric).

public static double GAS_L_KG_CONVERSION_H2 = 0.07078;
public static double GAS_L_KG_CONVERSION_O2 = 1.1416;

These seem to be the accurate numbers for KG/L for hydrogen and oxygen.
Comrade Dogmeat 9 Dec, 2023 @ 9:30am 
truuuuu
PeterRabbit 11 Jun, 2023 @ 2:26pm 
The gasses in SE currently use pressurized volume as the gas volume capacity of the tanks is simply the size of the tank itself. To switch to STP for gas would require converting not only all vanilla tanks to have a capacity in terms of STP, but also any mod you want to use that adds tanks!
mrudat 11 Jun, 2023 @ 7:03am 
In reply to an earlier comment, gas is sold by mass, not by volume, as for a specific amount of gas, mass does not change, but volume/pressure/temperature vary wildly. Alternatively, for O2 at least, metering it by volume at STP (Standard Temperature and Pressure, aka. 1 atmosphere at around room temperature, I believe) is possibly more useful, as you don't need to do unit conversion to know if it will fill a room or not; I believe that an air compressor is rated in volume per minute at STP (not volume of compressed air)
Innilo 6 May, 2023 @ 9:05am 
This mod is not working with my mod list for some reason atm. I'be been doing troubleshooting for 2 hrs and Heavy Gas and Paint gun are the culprits of my crashes.
Dark_raven 25 Apr, 2023 @ 2:19am 
Very cool mod! I only play with him now. But I am dressed by the large numbers of liters in the tanks and I would like to reduce them with another mod. Could you make it possible to set your weight gases in the save configuration files for this mod?
PeterB 7 Mar, 2023 @ 11:42am 
@visentinel Hmmm no I don't think so. I recently took extra stone into my inventory in an effort to lower the weight of my ship and it went back up when I jumped into the cockpit.
PeterRabbit 5 Mar, 2023 @ 8:12am 
If such a mod existed, it should also apply to the character outside of cockpits. Currently their jetpack usage is the same regardless of how much their inventory weighs.
Visentinel 5 Mar, 2023 @ 4:56am 
at the moment one can cheese the game if the ship gets very heavy by moving cargo into your character, now sure this is fine im just using my characters inventory space but then the ship becomes lighter and thats just weird .
Visentinel 5 Mar, 2023 @ 4:54am 
Hey =D Great Mod
I have an idea if youd take up the idea ?

Use the modAPI to get the weight of the player characters inventory and apply it to the cockpit so character weight becomes part of the ships flight physics.
PeterRabbit 3 Mar, 2023 @ 10:34pm 
The game itself has no concept of a unit of hydrogen or oxygen taking up more or less volume. 1L of Hydrogen is always 1L of Hydrogen, therefore the density is constant, so temperature is irrelevant. All that matters is determining what the density is based on the ratios when producing oxygen/hydrogen from ice.
nevcairiel  [author] 3 Mar, 2023 @ 10:28am 
While its true that temperature would affect the density and therefor the specific weight (but not the mass), temperature is not modeled with enough detail in SE to really account for that - and for gameplay purposes, would probably also be a bit too complicated, as nothing else cares about temperature, other then your suit.

My goal was to give a reasonable approximation that holds up to at least some aspects of physics (eg. the actual mass being right). Temperature is not being considered, since the game basically handwaves that anyway.
Ph.D Composer 3 Mar, 2023 @ 7:22am 
I do enjoy the fact that you're aiming for an accurate mass calculation. Just one thing I see being problem. Oxygen and hydrogen both have varying densities at various temperatures. Just for refence. https://www.engineeringtoolbox.com/hydrogen-H2-density-specific-weight-temperature-pressure-d_2044.html
PeterRabbit 22 Feb, 2023 @ 10:13pm 
As an example of the sort of changes I made. In SE 1 liter of oxygen can pressurize 1 cubic meter of space, and since air at 1 atmosphere has a density of 1.25 kg/m^3 that means stored oxygen should be 1.25 kg/L for me, not the 0.17777 value you use.
PeterRabbit 22 Feb, 2023 @ 9:23pm 
It would be really cool if you could allow the kg/L ratios for Hydrogen and Oxygen to be configured via the config files. I do my own rebalancing of Oxygen and Hydrogen to be realistic and I'd love to be able to use this mod but the densities are significantly different.
SunGod 14 Feb, 2023 @ 1:08pm 
Ah, interesting... I'm having NPC ships drop all over the place within 10km of my base. My first thought was heavy gases were playing a role, so thanks for setting me straight. The mystery continues! lol.

Still love the idea of adding realism to the game with this mod. Appreciate your work on it!
nevcairiel  [author] 14 Feb, 2023 @ 10:04am 
@SunGod: By default, tanks on NPC ships will not actually get heavier. Only player-owned grids are affected.

There is an option if you want to force NPCs to also deal with this, but I don't see a reason why most people would want that.
SunGod 14 Feb, 2023 @ 8:08am 
Heads-up to anyone that uses mods that spawn NPC ships like Modular Encounter Systems, using this can definitely lead to a scenario where NPC ships within an atmosphere are no longer able to maintain flight capability and will come crashing back down to the planet. Over time this will lead to a graveyard of crashed NPC ships around you.

I'm not saying this is a bad thing - if you love to salvage and restore crashed ships, it's fantastic. On the downside, if you like to build a base and explore nearby, it can make it increasingly dangerous over time, as not all crashed ships lose power right away and can have their weapons remain active and dangerous for some time. If you use an AI mod that adds combat-capable NPC crew to NPC ships, it makes salvaging more dangerous. YMMV.

Be aware your NPC-ship spawning mod may not be designed to have heavier-than-vanilla gases in their tanks, and they may come crashing down about you during your game.
nevcairiel  [author] 10 Feb, 2023 @ 11:51am 
@Heisenberg
Every liter of hydrogen has a mass of 0.0111.. kg, and every liter of oxygen has a mass of 0.1711.. kg

So a full large LG hydrogen tank has a mass of 166 tons (15 million liters times 0.0111..)

How you plan for that .. well, account for the mass at launch. :)
Bandet 10 Feb, 2023 @ 11:05am 
Can you make an addon for Industrial Overhaul?
ryangoslinglover306 8 Feb, 2023 @ 9:37am 
so tanks gain weight from the gas you put in them?
how much weight will be gained and how do you plan for this on ships? sounds real cool
nevcairiel  [author] 8 Feb, 2023 @ 12:37am 
It should work with all tanks that carry Oxygen or Hydrogen.
Kitt3ns 7 Feb, 2023 @ 4:20pm 
Does this only affect vanilla tanks or will this also cause modded gas tanks to gain mass? Asking for Zardos Modded Gas Tanks.
Vinny 7 Feb, 2023 @ 11:58am 
Tanks don't get lighter because tanks don't expand. Balloons actually gain mass as you fill them with h2, but loose far more weight because h2 takes up way more space than air. This pushes it up until the atmosphere gets thin enough that it floats on the denser air below (assuming it doesn't burst).
Queen Bee 7 Feb, 2023 @ 6:48am 
keeeen, make this vanilla
condottiere 2 Feb, 2023 @ 1:42am 
A video I saw mentioned the original, but I also found your mod when I went looking. Thanks for your work!

Mods like this (and some of the comments) highlight the value of paying attention in class at school, even if it's only recreational value for SE. It's a fun teaching point! :D
gruzzob 31 Jan, 2023 @ 7:44am 
Even then, without the hydrogen in the tank it would be vacuum (I am going to quietly ignore the challenges in making a 7.5m diameter vacuum pressure vessel), and so logically adding anything including the very (atomically) light hydrogen to it would make it heavier, and thus less buoyant not more.
It doesn't need to be compressed, it just needs to be in there to make it heavier.
Paladin Aurum 29 Jan, 2023 @ 10:25am 
Makes sense, I didn’t think about the density of the hydrogen gas being compressed inside a tank.
nevcairiel  [author] 29 Jan, 2023 @ 3:08am 
Tanks do not get lighter when you fill them with hydrogen, because the hydrogen is compressed, and thus has a higher density then the air around it.

Conservation of mass is not just an idea. If you take 1000kg of ice, the mass has to go somewhere. If you were to put your ship on a scale, the reported weight would not change.
Paladin Aurum 29 Jan, 2023 @ 2:35am 
Even so, while it makes sense for oxygen tanks to take on more weight, hydrogen tanks should do the opposite. That basically how zeppelins work. I would imagine that a steel tank of that size wouldn’t float, but it would get lighter. Maybe someone should make a aluminum hydrogen tank, and give it a levitation effect. Be cool to have airships in se, and would do wonders for the water mod.
nevcairiel  [author] 28 Jan, 2023 @ 11:39pm 
These are compressed storage tanks, not balloons. :)
Fantasy System 28 Jan, 2023 @ 9:35pm 
Shouldent hydrogen generate lift on worlds with a heavier then hydrogen atmosphere?