Space Engineers

Space Engineers

189 ratings
Last second landing (Suicide Burn)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
7.859 KB
22 Sep, 2016 @ 5:03am
9 Apr, 2018 @ 7:06am
7 Change Notes ( view )

Subscribe to download
Last second landing (Suicide Burn)

Description
This script enables you to save a lot of hydrogen when landing on a planet

Features
- It now supports both, STABLE and DEV branch
- automatically aligns the ship perpendicular to the planet to ensure optimal accuracy
- support modded hydrogen thrusters
- support speed mods
- trigger timers when entering gravity, landing, etc...
- trigger timers at a specified altitude
- you can choose the altitude at which the ship will stop (useful if the surface is not flat)
- save a lot of hydrogen during landing because thrusters will activate at the last second
- script automatically disable autopilot after landing
- you can easily disable autopilot manually

Update 1
- You can now use start argument outside natural gravity, the script will wait for you to enter the gravity field instead of crashing.
- Added setting: AutoFall. useful for automated drop pods. by using this setting your ship will not need you to run the programmable block argument fall, instead it will run automatically when inside a gravity field (if you have already used start argument).
- Added setting: StopSpeed. useful for troubleshooting some situations where your ship will fly to the sky. more info about this inside the script.

Update 2
- Added smart deactivation feature (forget ship flying up to the sky if you set DisableMargin correctly)
- Added Timer triggering feature when ships gets inside natural gravity, starts the suicide burn and lands.
- Changed the behaviour of DisableMargin setting, check inside the script to see how to set it up now.
- Updated the descriptions of most of the settings, check them out.

Update 3
- You can now trigger timers at a specified altitude, more info inside the script.

Update 4
- Ship alignment is now 4 times faster, I introduced a rotation speed limit setting to prevent the wiggliness during alignment. More info inside the code.

Set up & use
- it's easy to set up and use, just read the instructions in the top part of the script or follow this instructions by @Zyreal

How to set up this script:
1) Put this script in a programmable block, check code and remember and exit.
2) Place a timer block. In the timer block setup 3 actions as follows: 1. Run the programmable block with this script 2. Trigger-now the timer block itself. 3. Start the timer block itself. Set the timer block to a 1 sec delay
3) Create a group of ground facing HYDROGEN thrusters named THR (name is customizable below/in the script)
4) Place a cockpit or a remote control named reference (name is customizable below/in the script). This block must face the sky/space/opposite of your ground facing hydrogen thruster group. (If you want to place your cockpit facing where you want add a remote control as well and name it reference)
5) Add to the toolbar the timer block - trigger now
6) Add to the toolbar the programmable block set to run with the argument: start
7) Add to the toolbar the programmable block set to run with the argument: stop
8) Add to the toolbar the programmable block set to run with the argument: fall
9) Modify the MANDATORY settings below/in the script. Otherwise you will most likely crash.
10) Make sure to have ownership of all blocks

OPTIONAL FEATURE: If you want to trigger a timer block when the ship enters gravity wells, lands, or hits a certain altitude, you just have to put a prefix in front of the name of the timer block you want to trigger. All 3 supported prefixes are below/in the script.

If you use start argument outside natural gravity the script will just wait for the ship to enter the gravity field and then will automatically start the auto alignment feature if you want it to be completely automatic (for a drop pod for example) you have to set AutoFall setting to true.

How to use this script:
1) Turn on and trigger now the timer block.
2) Position your ship above the landing zone
3) Run the programmable block with start argument.
4) (If you do not use AutoFall setting) When you are ready to drop, run programmable block with fall argument. If you are landing on a flat surface I suggest to disable inertial dampeners.
5) When near the ground (50 meters) you will think you are going to die, but don't worry, it will be ok as long as you set the script up correctly.
6) If something goes wrong you can use the stop argument to get back the control of the ship. Stopping the script or timer from running is not enough, because you will have to turn off overrides manually.
7)When safely landed, turn off the timer block.

Explanation of script arguments
- "start": will enable the automatic alignment feature, but will not start the free fall. This enables you to get your ship above your landing zone more accurately because you will be aligned perpendicularly to the gruond.
- "fall": this will enable a workaround (explained in limitations section) and will make your ship fall. it will not disable inertial dampeners, it's up to you to choose if you want to keep inertial dampeners enabled, more specifically i suggest to use inertial dampeners when you are not planning to land on the ground (stop at a specific altitude), if you want instead to land on the ground choose a flat landing zone and disable dampeners so that your ship will not waste fuel by hovering some centimeters above the ground.
- "stop": disables autopilot

Limitations
During the creation of this script i had to use a lot of workarounds because ModAPI was missing some features and also because of some bugs in the game. Because of this:

- Until next STABLE branch update this script will only work on DEV branch
- You can only use hydrogen thrusters (cause their thrust do not depend on atmospheric pressure).
You can still place atmo and ion thrusters on your ship, but make sure they are not firing while you use this script.
- One of your hydrogen thrusters will waste a tiny amount fuel because the script needs to set its override to something greater than 1% (i set this to 1.001%). This is because there is a bug that lets your ship go faster than speed limit if you are free falling in natural gravity without dampeners, by setting the override of your thrusters your ship speed will jump back to the speed limit as soon as the script decides that this is the last second to brake, and this in the end will lead to the destruction of your ship. By setting the override of 1 thruster to 1% your ship speed will never exceed the speed limit and you will land safely.
This workaround is enabled when you decide to run the programmable block with the argument "fall", That is why it's important to run it before it's too late.
- I have not tested this, but it's very likely this script will not work if you are using an atmospheric drag mod.
This script will not work on a planet with atmosphere IF you are using an atmospheric drag mod (The ship will stop too early).

Examples
- Check out what i think is the smartest vanilla drop pod in the workshop, it's completely automatic, and will help you set up this script. Author: Kiyashi.

Credits
- I used the AdvGyro interface by Cheetah to control gyroscopes more easily (link)
- The drop pod in the video is by VanuBaguio (link)

LINKS to my other worth to check scripts
- Easy action sequencer (link)
- Advanced action sequencer (link)
175 Comments
⎝⧹Greedynuf⧸⎠ 25 Jul, 2023 @ 8:11pm 
this is so satisfying
Brock 6 Jun, 2023 @ 10:20am 
Ah, my apologies, I can't edit my comment, but here is the corrected URL.
https://steamproxy.net/sharedfiles/filedetails/?id=1394434299
Shoku 'Jetwash' Silverfall 12 May, 2023 @ 3:08pm 
@brock There's a typo in your URL that causes Steam to think it's a redirect attack, but I was able to get there after fixing it.
Brock 10 Feb, 2023 @ 5:52am 
Thanks @TheWarMaster97, this script is great! I've used it several times now on planets up to 3G gravity. There is nothing on the workshop that has a landing script like this that is able to land on a planet without having to first visit it and set a GPS location. I thought it would be a nice fit if this script could also launch to space, but I understand you're busy. I ended up finding another script that can launch to space called "Launch Assistant" (see below).
(ttps:/steamproxy.net/sharedfiles/filedetails/?id=1394434299
TheWarMaster97  [author] 26 Jan, 2023 @ 9:54am 
@Brock yes, it still needs timer blocks, I know it is no longer needed by the game, but unfortunately I am to busy too update the script. Regarding your second question, this script is meant only for landing on a planet while saving as much fuel as possible.
Brock 26 Jan, 2023 @ 8:33am 
Can this script also take off from the planet and go to space?
Brock 26 Jan, 2023 @ 8:24am 
Does this still need a timer block, scripts stopped needing them quite some time ago?
TheWarMaster97  [author] 23 Aug, 2022 @ 11:01am 
@Farinhas Sorry for the delay, you should use "run with default argument".
sv_memes 1 7 Aug, 2022 @ 11:49am 
Nevermind, got it... We're supposed to put the entire controller name, not set up a tag. My other question stands, though: Which argument should the timer block be running?
sv_memes 1 7 Aug, 2022 @ 11:12am 
For some reason, the script doesn't recognize any kind of reference tag I add, not even the default one. I get an error message telling me this.
Also, when you say the Timer Block should run the script, do you mean I should add the "run with default argument" function or "run" with the start argument?