Space Engineers

Space Engineers

MGSS Airlock Script 2.0
156 Comments
Elafis Jul 21 @ 2:45pm 
I have a isse with airlock. For every steps I need click on recompilate. Do you know where is a issue? Thank you
Engineered Coffee  [author] May 22 @ 8:11am 
I wish that were possible. Exterior vents just stop working, except depressurize to bring air in.
GalvazimGX May 22 @ 8:07am 
@ MrMallenby You need an outer vent to dump excess oxygen
MrMallenby Feb 26 @ 4:38am 
How do i purge the tanks? they keep filling up too much and breaking them does nothing
Elafis Jan 11 @ 11:33am 
Hello. I have a large hangar with smaller ones in it, both the large one and the small ones can go out, from the smaller ones to the large one. How to set the airlock to work correctly?

Is it possible to have both sides open (inner and outer) in case there is atmosphere outside?
MrMallenby Dec 14, 2024 @ 2:09pm 
Yea the door open and close thing had me wondering, swapped the doors for some from rebels gates (outer doors) and worked a treat so guessing the doors i was using just dont like the script.

As for the Auto closing i tried changing the auto close value to things ranging from 30 seconds to 600 seconds and there was no effect, Got around it by using another auto close door mod which seems to override the issue haha
Engineered Coffee  [author] Dec 14, 2024 @ 5:39am 
The doors autoclose on purpose. It was an attempt to address Keen's bug. You can turn it off inside the script settings.

Not sure why the doors aren't fully opening. The script doesn't use timing. It looks for when doors are full open or closed.
MrMallenby Dec 13, 2024 @ 9:33am 
As an update to my previous comment the outer doors dont open fully either i think something in the timing of the script is broken
MrMallenby Dec 13, 2024 @ 9:15am 
Note sure if its just me running into this but when i cycle the airlock which works fine, Once my inner doors open a few seconds later they will close again without any input from me or reason too
MrMallenby Dec 12, 2024 @ 2:45pm 
Really hoping you can find the time to update this, Best airlock script i have found
Scatcat92 Nov 21, 2024 @ 4:13pm 
Fair, thanks for the speedy reply
Engineered Coffee  [author] Nov 21, 2024 @ 4:08pm 
I haven't touched the code for a year or so. I had plans to remove the inner door as required but haven't yet. Hopefully I can find time soon to update.
Engineered Coffee  [author] Nov 21, 2024 @ 4:06pm 
It is a bug with Keen. It happens to big hangar doors, even without the script. They have been aware for a couple years, don't think it will get fixed. Relaoding the world is the only fix. Sorry.
Scatcat92 Nov 21, 2024 @ 3:57pm 
Hi, Love the script but im having a few issues. in the process of adding a garage to my base in a co-op world. we've raced to get it airtight and set the garage up as the second airlock but the outer vents never stop depressurising and sometimes the inner vents start depressurising even when the control light is on. this is only on the garage airlock though, the front airlock works fine.
JenfX Nov 18, 2024 @ 4:43am 
Can i make 1 hangar with 1 inner door and 3 outer gates? Because i don't want to open all of 3 gates, when i need 1 (https://imgur.com/a/Us5Exs7)
Sergeant Kelly Nov 7, 2024 @ 6:44pm 
I got my airlock hangar to function like that by editing the script itself to not require an inner door.
TestSubject_2519 Nov 4, 2024 @ 12:30am 
Just a quick question, is it possible to make a hangar airlock without an inner door? I'd like to replace the inner door with an airlock so I can always go between the hangar and main interior of a ship without having to have an airlock and regular door between the two, or having to cycle the hangar closed if I want it open for whatever reason.
Reepotah Oct 22, 2024 @ 8:41am 
Neat script, but I've tried using VCZ Ramp Door as an outer door and it never opens for more than 10cm.
Roccanan Mar 31, 2024 @ 2:18pm 
Firstly, I would really love this script, IF, if it would find my properly named Airlock Vet [AIRLOCK A]. No matter the naming convention, that Airlock Vent is never found.
DuckyToDucker Oct 8, 2023 @ 8:34pm 
I have been having an issue where the script just quits working. I have 3 airlocks on a ship. They all have hangar doors. I use the rotating door for all other personnel entrances. Normally logging out and back in fixes it, but I cannot get it to work any more. I was working on the ship, so I thought maybe it was something I did, but all 3 broke at the same time and are fully separated from each other. I have double checked all the naming conventions and get no error from the programming block. I tried removing the script from the programmable block and then loading fresh from the script list, but no joy. Any thoughts?
DuckyToDucker Oct 4, 2023 @ 6:37am 
Is there a way to show a sprite based pressure for the next room? I know how to add the corner LCD to show the airlock status, but I am looking for something that will allow me to show the pressure in the next room connected to my hangar. Great script BTW.
RandomVintage Oct 2, 2023 @ 6:56am 
Have been really enjoying this script on my latest play-through of SE, and I would like to make a feature request. If possible it'd be great if support could be added for LCDs inside non "LCD" blocks such as cockpits and programmable blocks etc. I took a look over the code, and the API documentation for SE scripts, and I got about as far as getting the Echo running on the "keyboard" LCD of the programmable block, with hopes of maybe getting the "main LCD" of the script to display on the large LCD of the programmable block, but my C# is extremely rusty, and this is the first time I've poked at SE scripting at all. I'm going to keep poking at it in my own time, but I figured it couldn't hurt to ask somebody that knows better than I do before bashing my head into it for a week.
Engineered Coffee  [author] Jul 31, 2023 @ 7:22am 
I noticed that in my last play through too. I am not sure what changed. I will look into it when I find some time.
CovertJaguar Jul 31, 2023 @ 2:32am 
Has a tendency to shut off my 02 Gens and then never turn them back on again. I keep thinking I'm out of ice, but no, the generators are just off again.
Pringels09 May 9, 2023 @ 8:11am 
This is awesome, but is there a way to show make the Sci-Fi Button terminal show the airlock status? If not, then this would be an awesome feature
DuckyToDucker Jan 28, 2023 @ 8:54pm 
I think you just need to not fill the O2 tank so you can manually depressurize the interior back into the tank. I might be very wrong though :)
Delois Jan 28, 2023 @ 7:01pm 
I would love a 'Maintenance Mode' Control light that empties all air so I can work on the interior without loosing air. (Unless this is there and I missed it)
DuckyToDucker Jan 28, 2023 @ 3:06pm 
I am sorry if I missed it somewhere, but is there a way to update the display on the Sci-Fi one button terminals? It has a pretty large screen. I was hoping to have that button trigger the airlock and provide a display of the status. Thank you and great work on this amazing script.
Pecs Nov 2, 2022 @ 12:52am 
Unfortunately it has a few mods, but I have an exterior vent named [AIRLOCK] Outer Vent on all my MGSS ships. Usually it's to do with the tanks filling up in creative, but this time it was being weird. I also usually name a tank for each airlock as is suggested.
Engineered Coffee  [author] Nov 1, 2022 @ 6:05pm 
@Big Boy. You need to make sure you have an exterior vent named properly. Send me a link to a blueprint and I'll see what's going on.
Pecs Oct 27, 2022 @ 1:31pm 
I can't ever get atmospheric ships to open outer doors - the disconnected O2 tanks are always full and there's nothing in the script that empties them to allow airlock depressurization. It works in space, but atmosphere = nope even if the atmosphere is identical to inside.
LumpySpaceKing Oct 24, 2022 @ 6:25am 
Your script is awesome! My only wish is for LCD pressure progress bar color to change gradually between empty and full colors.
CTH2004 Aug 7, 2022 @ 12:11pm 
WHat's the difference between this and "Whips Auto-Door and Airlock Script"?
Engineered Coffee  [author] Jul 19, 2022 @ 2:21pm 
I am catching up on all the latest comments/issues. IRL has been chaotic. Looks like lots of display styles to change, I will see what I can do. I also like the no interior door, I will make it optional
Syngather Jul 17, 2022 @ 3:03pm 
Any way to make this work with the Rotary Airlock mod? Or is there a way to make it so an Airlock does not require a named Inner Door?
jayfarm May 30, 2022 @ 10:40am 
Occasionally I wind up venting a bit of O2 due to other doors (double sliders in my nose can't fit vents) which drops the overall pressure of the internal ship. The script keeps my Oxygen tank off, so I can't refill the main cabin without disabling the script. Is this the expected behavior or do I have something setup incorrectly? Even when ship air gets too low it won't turn on the oxygen tank to let the inside refill.
royalrollin May 28, 2022 @ 3:02pm 
It works very well! I tested it with my 90.000 PCU Base!:steamthis:
Klous Apr 30, 2022 @ 11:56am 
Occasionally the main status LCD is wrong about an Airlock status showing it depressurizing when its actually fully pressurized. Haven't been able to determine when/why.
almagnus1 Apr 17, 2022 @ 2:19pm 
I like the script, it's quite awesome, but one tweak would make it even better: The ability for the script to allow the outside door to close automatically, and not lock it open.

I'm using this script on a mining ship that's on the large blocks and designed to drill through asteroids, while also dumping the stone it's accruing, and I would ideally like to have the airlock closed and depressurized as the entire exterior of the ship is heavy armor blocks (which is needed otherwise the bore will heavily damage the outside of the ship). As the ship is designed with a gravity drive in place (which helps smoothely push it through the asteroid), there's no good place to put a sensor (especially since the less stuff on the exterior the better). The simplest solution for this application is to allow the exterior door to be closed.
Battlemage Apr 2, 2022 @ 5:22am 
Out of curiosity, is it possible to get multi-screen support for the overall airlock status screen? I'm sitting at 14 airlocks/3 pages right now with plans for another 6 airlocks, and since I have the room in my base for it I'd like to be able to display all the pages at the same time.
Fascist Pig Bank Mar 28, 2022 @ 3:39am 
Looks like there is a Keen bug where if you have an OUTER VENT on a small ship and you fly it into a hangar and pressurise the hangar the small ship OUTER VENT will not update and still thinks its depressurised thus the script assumes the hangar is not pressurised.
Alfared Mar 25, 2022 @ 11:52pm 
Just wanted to ask if it is possible to use the sic-fi button display to display the airlock status?
Engineered Coffee  [author] Mar 20, 2022 @ 4:05pm 
Updated to V2.5. I changed the required full pressure from 99% down to 95%. I added this as a variable called "fullPressure" in the customization section. This does mean the system technically lose air over time but it should be relatively slow.

Looks like certain doors; especially the new hatches have some calculation issues from Keen, it's like the door block itself needs more air which drops the pressure making the script think the air is too low.

@Erling, let me know if this helps your issue. Otherwise send me the world/blueprint save file so I can take a look.
Erling Mar 16, 2022 @ 11:31am 
I can't get this to work... I've 2 inner doors, 1 outer gate and 1 outer door. The inner doors is impossible to close, you try but they instantly get opened again before they can close. Airlock vents is offline even when i toggle the control light on or off, nothing happends and I can't manually turn them on. I've watched the tutorial and named everything so running out of ideas now.
Dots Mar 8, 2022 @ 5:33am 
This script is my favorite script of all times. Once you get to master it it becomes easier.My question is if there is a discord people who use this mod can join to talk to each other and throubleshot if needed?
Typhon Plume Mar 7, 2022 @ 1:01pm 
Took me a minute of testing to see if it works as intented... just have to remember the [AIRLOCK} tag used is casesensitve. Other then that best airlock script out there.
DCvinyou2day Mar 6, 2022 @ 1:40pm 
I am loving the concept of this mod, I am just having issues getting my inner hanger doors to stay open while the outer doors are closed. They close as soon as I seal and pressurize the airlock. Not sure what I am doing wrong, but I don't even have enough time to get a small grid vehicle in before the inner doors start closing up again. Oddly enough while the inner doors are closed the outer doors stay open just fine. Just not the reverse.
Battlemage Feb 28, 2022 @ 8:58am 
@Mechgineer I have my airlock sensor controlled with the sensor above the inner door. I'll add in a second sensor on the outer door to toggle the airlock back. And for the inner door, it's not a bad feature to have that flag set there to auto-close the door and leave it unlocked/on, it'd just be nice to have the option to set the outer door to do the same (either with a global flag or local through custom data).
Engineered Coffee  [author] Feb 28, 2022 @ 7:46am 
@Battlemage: You can open/close the outer door by turning the control light off/on. I did not auto-close because of hangars, I don't want to cut off rovers or ships. I would suggest using a proximity sensor for auto-closing to outer door. Watch my tutorial video on this page ~9:00 for setup.

As for the auto-close on the inner door. Looks like I just missed this. I have been testing this morning and looks to work fine. I updated to V2.4, reload the script from the workshop.
Engineered Coffee  [author] Feb 28, 2022 @ 7:26am 
@Goat Man: I need a little more info. The script depressurizes and then turns off. This is because it gets to the outside level (say 50% on the high mountain), turns off, then opens the door. Otherwise the vent would keep sucking outside air and fill up your tank.