stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. News
  3. New: Digital Valves – switchable condensation valves and same-tank distillation

New: Digital Valves – switchable condensation valves and same-tank distillation

A player asked for a switchable condensation valve to cleanly separate a gas mix in one tank. It turned into 14 new valves – with an example script for distillation.

A player wrote to me on Steam: the game has a Digital Valve, but the condensation and expansion valves can only be flipped by hand. That way you cannot control which line the condensate flows into – and a distillation in a single tank, where water, pollutant and CO2 come out one after another while it cools, is impossible. That is exactly what Digital Valves are for.

The Digital Condensation Valve and the Digital Expansion Valve use the same code as the game valves. So I did not rebuild the physics, I only put a switch in front of it: condensate only flows while the valve is on and powered. With three of them on one tank, condensate only ends up in the line whose valve is currently open.

Since I was at it, six more valve types joined, each for gas and liquid: a 3-way diverter valve, an infinitely variable throttle valve, a thermostatic valve that opens by temperature without any script, a safety relief valve with alarm and counter, a distribution valve to three outlets and a merging valve from three inlets – every branch switchable, no backflow. All have their own model with yellow rings for gas and blue ones for liquid, arrows for the direction, a status LED and a data port.

While building the example script for distillation I found something interesting in the game code: the game condenses a gas by the total pressure of the line, not by its partial pressure. That is why pollutant only condenses before CO2 from about 2930 kPa – below that the order is reversed. The script recalculates the condensation temperatures with the game's formulas every half second, only ever opens one valve and shows when the pressure is not enough. In my simulation every substance ends up more than 99 percent pure in its line.

The server and all players need the mod. The guide with the script, IC10 table and condensation table is in the wiki. As always in German and English – have fun separating!

Esc
↑ ↓ selectEnter open/ opens search anywhere