Space Engineers

Space Engineers

263 ratings
AAECS - Advanced Automatic Elevator Control Script
6
3
4
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
877.276 KB
2 Oct, 2022 @ 7:11am
23 Apr, 2023 @ 1:12pm
11 Change Notes ( view )

Subscribe to download
AAECS - Advanced Automatic Elevator Control Script

Description
AAECS - Advanced Automatic Elevator Control Script 1.6.0
Changes:
  • 23/04/2023 (1.6.0):
    • Added the option to make custom formatted LCD signs rather than the default template. Check the guide for more details.
    • Added the option to disable doors forcibly close/opening. You can manually open and close doors on any floor.
  • 11/02/2023 (1.5.0):
    • Fixed upside down pistons, you can now create elevators with the piston at the top of the shaft instead.
    • Fixed crash with wrong type of block included in elevator group.
    • Added ability to directly use a door as reference for a floor position.
    • Added ability to invert sign arrows (primarily for inverted elevators).
    • Implemented adjustable epsilon, you can adjust how precisely elevators arrive at a floor.
    • Implemented the ability to set a specific reference for a level position. Add the prefix [Reference] to the start of the door to use that door as a reference for that level.
  • 10/01/2023 (1.4.1):
    • Fixed issue with door state desyncronization causing elevators to get stuck.
    • Fixed issue with whitespace causing issues with elevator door configs.
  • 03/01/2023 (1.4.0):
    • Fixed issues with doors opening sometimes when they shouldn't.
    • Fixed elevator axis detection method, add better reference piston detection.
    • Fixed issue with manually created levels applying to all elevators.
    • Added piston min/max limit enforcement.
    • Implemented auto closing door option, when the elevator is inactive, the doors will automatically shut unless the call button is pressed. Check the guide for details.
    • Implemented full error output for setup issues.
  • 12/12/2022 (1.3.1, bug fix):
    • Fixed elevator axis detection method, the elevator axis should be detected automatically with no issues. You will still need to set a reference piston however.
  • 21/11/2022 (1.3):
    • Fixed "-groundfloor" switch for the reset command not working.
    • Fixed issue with elevators getting stuck if the pistons are fully retracted/extended. (This needs to be activated in the elevator config, see the guide for more details).
    • Improved terminal output, the terminal now provides the status of each elevator and is more organised.
    • Implemented auto fill configuration options, missing properties for elevator configs will now be re-added on each settings update. (Boot up, "update_settings" or "setup" commands).
    • Overhauled elevator axis detection method to provide more accurate calculation, (meaning that for basically all elevators, you shouldn't need to specify the axis).
    • (Major) Added ability to create levels WITHOUT using doors, see the guide for more details. (You can even create completely doorless elevators).
  • 19/10/2022 (1.2):
    • Added ability to individually use LCD's on blocks (such as on a control seat) as status signs.
    • Added ability to use blocks with a single screen as elevator status signs (such as the sci-fi one button terminal).
  • 15/10/2022 (1.1):
    • Fixed issue with doors not fully closing.
    • Added new config option for servers (Door enable/disable delay).
  • 02/10/2022 (1.0):
    • Script Published.

IMPORTANT:
If you think you've set everything up correctly and the elevator is stuck and wont move or you are having other issues, then see the troubleshooting section of the guide.

There is also a bug with the terminal output in game, this is a bug which was introduced with the Automatons update. See the Other Issues heading under the Troubleshooting section.

Summary:
This script can be used to create and manage complex but easy to use elevators.

Only a single programmable block is needed to manage all of the elevators on a grid. This script supports any grid size.

This script is designed in such a way meaning that there is minimal setup required for setting up elevators, there is no need to mess with sensors, timers or floor heights as it is all calculated automatically.

Each elevator can be fully customised according to whatever settings you need. You can adjust each setting or leave them to their default values.

You can find the elevator used in the showcase video Here.

Made using Malware's Visual Studio extension MDK-SE[github.com].

How to use:
Use the full guide here if you are new to this script.

A video setup example is available here and in the workshop previews: Guide

Basic Setup Guide:
Use the text and video guide mentioned above if you are new to using this script.

  • Place a programmable block with this script.
  • Place pistons at the bottom of the elevator shaft.
  • Place doors on each level, each door needs to have the prefix [L{X}] where {x} is the floor number. (E.g. A door on floor 1 will have its prefix be [L1]). This NEEDS to be at the start of the block name. It's Important to remember: Floors start at 1.
  • Select every door and piston in the terminal and make a group, you will need to come up with a nickname to refer to the elevator with commands. Name in the format: [Elevator <Elevator Name>] (E.g. Valid example: [Elevator PrimaryCargoElevator]). (If you have spaces, you need to surround the name in quotes).
  • Run the script with the argument "setup" to activate your elevator. You will now have a functioning elevator!

All you need to do now is setup commands and (optionally), change the settings of your elevator, check the guide for setting up commands: Guide.
159 Comments
DocBrown86 15 Feb @ 1:39pm 
@Viruz Thank you. I saw I missed the door thing on your guide... Sorry about that!

And for the timers, at that point I had removed the doors from the elevator list and ran 'setup', so it shouldn't have been seeing the doors on the script. I'll run a test again using a light rather than doors and see if I can make it work.
Viruz  [author] 14 Feb @ 1:52pm 
@DocBrown86 You can setup to open for specific floors via the Custom Data box. In the Custom Data for each cabin door, you will see [Exclude: ] (Providing you've setup the elevator already, if not, just add it).

In a comma separated list, you can add floor numbers where you want that specific door to not open. E.g. [Exclude: 1, 2, 5] means that the door will open on floors 3 and 4 but not on floors 1, 2 and 5. You will need to run the "update_settings" command again though.

And as for the timers, If i'm reading it right, you're trying to use timers to achieve the above by manually opening/closing the elevator doors. However I've set the script to always request the doors to either open/close according to the current elevator state, so the timer would trigger and ask the door to close, but the script would immediately (every tick) ask the door to open, resulting in the timer appearing to do nothing.
DocBrown86 13 Feb @ 5:39pm 
Also, attempting to resolve my last comment by having the script call timer blocks, but I can't seem to get it to trigger them. Do I need " ", or a space after the =? Just not sure what I could be missing.
DocBrown86 13 Feb @ 5:15pm 
I have an elevator cabin with 2 doors. One opens for the top floor, and the other for the bottom floor. Aside from setting them to manual, is there a way to tell each floor to use a specific cabin door?
Desert Ice 27 Jan @ 7:41am 
@Viruz Thanks, I just thought to ask. Otherwise, the script is working beautifully.
Viruz  [author] 26 Jan @ 9:39am 
@Desert Ice, Currently, there's no option to assign timers to individual floors, I opted to go for just having a single one for all floors, this was due to complexity, I did not want the setup process to be too complex. You may be able to achieve something similar with sensor blocks, even though it requires a bit more manual setup.

I do want to eventually rewrite this script, so I can add more features like that and make it a bit more robust, however with SE 2 coming, I've put this on hold. Depending on how SE 2 scripting is implemented, I might write the new script for SE 2 then backport to SE 1, but this may take a while.
Desert Ice 25 Jan @ 2:36pm 
Regarding the "trigger timer block when arriving/ departing a floor" function; can that be made to trigger different timer blocks at different floors? As I read this it seems to say that there is one set of TB's being triggered at every floor?
darksouls 25 Oct, 2024 @ 12:11pm 
for the juggernaught ship that this mod needs i couldn't get the elevator to load in properly
Cicis 25 Sep, 2024 @ 9:11am 
Is it possible to use with workshop pistons? Like ganymede, etc.? Can't get it working. Thanks for good work
03dfa 16 Sep, 2024 @ 11:55am 
well,I had tried for 5 hours and just succeed once ,dont know whats wrong