Space Engineers

Space Engineers

Not enough ratings
Pressure Lockdown Protocol
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
426.978 KB
22 Aug, 2017 @ 7:46am
10 Jul, 2021 @ 12:02am
10 Change Notes ( view )

Subscribe to download
Pressure Lockdown Protocol

Description
\\\\\\\\\\\\\\\\\\\\\\\\\\
NEW FEATURE:
//////////////////////////
Program now automatically sets Font Size, Font, Color, and Content Type, for LCDs. All you need to do is name them, now. (It's strongly recommended to use some variation of corner LCDs).


PURPOSE:
****************************************
* Prevents undesired space walks by sealing doors between rooms that are pressurized and rooms that are not.

FEATURES:
****************************************
* Closes all doors in a room when it depressurizes.
* Checks the balance of pressure between adjacent rooms.
* Locks doors between rooms that have different pressures.
* Prints pressure status of room and adjacent rooms to LCDs at each door.
* Switches to emergency lighting if a room is depressurized.


SET-UP:
***************************************
* Build rooms with air vents, doors, lcd's, and lights as desired.

* Place a Corner LCD or Flat LCD Top or Flat LCD Bottom on either side of each door between rooms.
* IMPORTANT: Set LCD font to Monotype, and font size to the smallest setting possible.


* Set up lighting to include lights that you want to turn on when the room is pressurized and lights that you want to turn on when it is
depressurized.

* Rename all blocks to include SECTOR TAGS associated with the rooms that they are in. (See NAMING CONVENTIONS below).


ACTIONS:
*****************************************
*OPTION 1: Vent Triggered:
* Set up vent actions in each room to run this program with the following arguments:
* ACTION 1 (100% pressure): CheckDoors <SectorTag>
* Example: Vent S01, Action 1: Argument "CheckDoors S01"
* ACTION 2 (0% pressure): CloseDoors <SectorTag>
* Example: Vent S01, Action 2: Argument "CloseDoors S01"

*OPTION 2: Timer Loop:
* Set up a program timer to run this program without an argument.
* WARNING: This will not automatically close doors.
* To close doors you will still need to put the 'CloseDoors <SectorTag>' argument into ACTION 2 of every vent.
* You could also close the doors by other means, like linking vent ACTION 2 to door groups.

ARGUMENTS:
***************************************
* CloseDoors <sectorTag>
* Set this on the second action (depressurize) for the sector's air vent.
* This closes all doors in the sector.

* CheckDoors <sectorTag>
* Set this on the first action (pressurize) for the sector's air vent.
* This checks the pressure in adjacent rooms, and locks doors to rooms of unequal pressure.
* Also displays the pressure differences on designated LCDs.

* OverrideDoor <sectTag1>_<secTag2>
* This is an optional command.
* If a door is locked because of unequal pressure between two sectors,
this will depressurize the vents in both sectors, and unlock the door.
* An underscore '_' is REQUIRED between the sector tags in the argument.
* BAD: OverrideDoor S01 S02
* GOOD: OverrideDoor S01_S02

* ResetOverride <secTag1>_<secTag2>
* This is also an optional argument.
* If Depressurize has been set to On by the OverrideDoor command, this will restore Depressurize to off for both sectors.
* An underscore is also required between the sector tags in this command.

* OpenLock <sectorTag>
* This argument is for exterior airlocks and hangars that you may frequently want to depressurize.
* Locks and hangars will need two extra components:
* Vaccuum Vent - Placed on outside of station.
* Only need one per station.
* Should have its own special sector tag (default 'X0X')
* Lock Timer
* You need one dedicated timer for each hangar or airlock.
* Include respective sector tag in timer's name.
* TIMER ACTIONS:
* Call this program with argument "OverrideDoor <sectorTag>_<vaccuumTag>"
* Open exterior doors of hangar/lock

* CloseLock <sectorTag>
* Closes an airlock that's been opened.

NAMING CONVENTIONS:
***************************************
* Rename all vents, lights, doors, and pressure lcds involved with this script to have SECTOR TAGS corresponding to their particular room.

* Suggested tags: S01, Sector1, SectorA, Room1, R01, etc.
* Do not include spaces in sector tag. Use underscores if needed.
* Bad: S 01
* Good: S_01

* VENTS:
* Air vents just require one sector tag.
* Example: Vent S01

* DOORS:
* Doors require a sector tag for both of the sectors they connect.
* These sector tags should be separated from eachother by a [Space].
* Order of tags does not matter
* Example: Door S03 S02
* <<IMPORTANT>> The first part of the Door name should be only one word, i.e. not include any spaces.
* The tags need to be the second and third words in the door name.
* Bad: Sliding Door S03 S04
* Good: Sliding_Door S03 S04

* LCD's:
* Like doors, LCD's need to have two sector tags, but here the order does matter.
* The first sector tag represents the sector that the LCD is actually located in.
* The second sector tag represents the sector on the other side of the door from this LCD.
* Example:
* LCD S03 S02 is located in Sector 3 next to Door S02 S03.
* On the other side of the door is LCD S02 S03, which is located in Sector 2.
* This script is designed for Corner LCD's as well as Flat LCD Tops and Flat LCD Bottoms.
* Probably works with regular LCD's and Text Panels as well.

* LIGHTS:
* Lights that change based on pressure need to have sector tags followed by a [Space] and a LIGHT TAG.
* Default light tags: "w" and "r".
* Light tags can be changed in the CONSTANTS section of the script.
* Light tag w is for lights that will be on when the room is pressurized and off when it is depressurized.
* Example: Light S01 w
* Light tag r is for lights that will be off when the room is pressurized and on when it is depressurizd.
*Example: Light S01 r
* Light tags do not have to be followed immediately by a [space]
*Example: Light S01 w13
* If you want a light to remain on, whether the room is depressurized or not, then do not include a light tag.

* ADDITIONAL:

* All tagged blocks can include your own personal tags after the sector tags.
* Example: "Door S04 S03 OMC"
17 Comments
SJ_Omega  [author] 5 May, 2023 @ 4:35am 
@bazingaaa Are you talking about the mods page in Space Engineers? If so, it's an in-game script, so you just need to subscribe, then load it onto a programmable block.

Also, I've got an overhauled version of the script that I'm planning to upload soon.
S.T.A.L.K.E.R. 4 May, 2023 @ 5:45pm 
I can't find it at mods
TheBlueChocolate 10 Jul, 2021 @ 6:02am 
Thanks, it now works (I guess I don't need to tell you how I set it up).
Having tried things a bit, I guess your script consider every configured room as airlocks linked to other airlocks.

However, I noticed one hing: When using the OpenLock argument while the inner door is open, it start depressurising before the door is fully closed, and sometimes don't switch the door state (Keep the inner door on and the outer door off)

One thing I would like is a way to auto open the doors once unlocked (Could be a tag).
Another suggestion I have is to add a different display, for the inside of an airlock (example : Display the room pressurisation, A connected room and the other connected room).

I tried multiple airlock script, this updated script is not the one with the most features (example : No detailled display, but that's not a problem for me) but it is easier ton configure than scripts with more features.
SJ_Omega  [author] 10 Jul, 2021 @ 12:05am 
@TheBlueChocolate I just made a small fix and uploaded it. Let me know if this newest version works. If not, could you walk me through what you did for set up?

Did you rename the doors and vents to include sector tags? Did you set up the vent actions?

This is one of my older scripts, and looking at it now, I realize it badly needs some tweaks. It probably wouldn't hurt for me to do a tutorial video as well.
TheBlueChocolate 9 Jul, 2021 @ 4:57pm 
I tried to set up a test platform for this script, but it didn't work. At first, I thought I set it up wrong, so I downloaded your "Pressure Lockdown Demonstration Chamber (Using the old version of the script), and apart from the wrong font scale for the LCD, It was working fine.
Then I tried to load the latest version of the script inside another PB, and turned off the other one, and It didn't work anymore. Then I Turned the lates version off an the old version back on and it worked...

The config on the demonstration chamber looks like the one you describe, so my questions are
WTF is going on? Why does the latest version not work but the old one does?And How can I use the new one then?
SJ_Omega  [author] 22 Jun, 2020 @ 3:25am 
Glad you got it working, and thank you for the suggestions. I definitely think an override all is a good idea, and shouldn't be too hard to implement.
SNBartek 21 Jun, 2020 @ 11:37pm 
Ok. That was my bad. Now i understand how this script works. I didn't have the "CheckDoors" command in the vent, so the script would close the door, but not check the pressure difference after closing. Now everything works fine. If you will want to change the script in the future, i have a two suggestions. Dimming lights during lockdown and option for override all sections. Thank you for this script! Its amazing! :D
SJ_Omega  [author] 21 Jun, 2020 @ 2:29pm 
I have a couple thoughts on what it could be:

Are you running the "CheckDoors" command from the first vent trigger action? Did you include the section tag? You can also run the script with default action from the vent trigger as well. This would actually run a door check for each vent. The door won't lock immediately. It will only lock once the room is pressurized.

If that doesn't work, I'd also check the name of the door that's not locking. Is there more than 1 word before the first sector tag? (i.e. something like "Hangar Door S01 S02"). If that is the case, you'll need to rename the door so that there's a single word before the sector tags, so something like "Door S01 S02" or "Hangar_Door S01 S02".

This is one of my older scripts. In the future I really need to go through and make the whole thing more user friendly.
SNBartek 21 Jun, 2020 @ 10:38am 
None of that. I am trying to make an emergency lockdown if the hull is damaged. At this moment i named two vents (in two sections) and gate(from frostbite). Vents uses first setup so i dont use timer block. Everything works fine, but after closing door, they arent turned off. They only turn off if they were closed when the script was activated
SJ_Omega  [author] 21 Jun, 2020 @ 9:51am 
@SNBartek Is this specifically in a section you're using as an airlock or a hangar?