Space Engineers

Space Engineers

Not enough ratings
Advanced Liftoff Control
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
51.389 KB
3 Mar, 2016 @ 1:45pm
9 May, 2020 @ 2:12pm
21 Change Notes ( view )

Subscribe to download
Advanced Liftoff Control

Description
General Description
This script allows for automated override management for planetary liftoff to save hydrogen and power.
Capable of controlling arbitrary set of thrusters, it will by default automatcally find thrusters that make sense to be controlled together and use those to lift off.
Requires a programmable, a ship controller and of course thrusters

How it works
Normally, if you just press, lets say "Up" to ascend, all thrusters will always burn at their maximum output, regardless of whether you need that power or not.

The script uses the override feature to precisely set thrust output. It has multiple "stages":
It will try to use/optimize Atmospherics, Hydrogens and Ions in that order. So it will use Atmospheric thrust as long as possible, joining in Hydrogen as late as possible. Then it will start using Ions as soon as possible to reduce hydrogen consumption.

Example Blueprint
Example Ship
note: This example might not run the most up to date version of the script

Setup
Basic: (autogenerate==1, default)
  1. Build Your ship.
  2. Claim ownership on all blocks
  3. Take control of a ship controller that contains the "controlBlockName" string, defined below (default "_liftoff") in its name. Make sure this controller is the MAIN COCKPIT
  4. Have more than 0 hydrogen thrusters, make sure their display names contain directions (e.g. 'Up'). This is ensured by correctly following step 3.
    Note that the direction tag is relative to the seat/control you are in.
  5. (Run script to start.)

To manually stop, run the script with the argument "STOP" (case sensitive).
Note that if dont have it set to (re)enable Inertias when doing that your ship might make a uncomfortable landing.

To reset the script, run it with the argument "INIT" (case sensitive). This will reset all data and generate all listings again, just like a recompile would.

Setup LCDs
LCD setup is done via two ways. The first is a group that is named as specified in the script. The second and more precise way is block custom data.
The below code example will write the main information to screen 0, so the first screen, of the block this data is set on. Note that LCDs only have one screen to begin with. Cockpits however have multiple.
[liftoff] 0=main
This code example would write the main output to the 2nd screen, and thelog to the 3rd. Note that the log wont fit on cockpit screens, this is just for demonstration.
[liftoff] 1=main 2=log


Additional setup (neither required nor dependent)
  1. do all the steps from the basic setup (except for the run xD)
  2. Put thrusters you want to control in a group whichs name is specified below (see ascentHydroGroup, ascentAtmosphericGroup,...)
  3. If you have more than one control block and want to use a specific one, set its name below.
  4. Have blocks named as specified in TriggerOnStart, TriggerOnFinish and TriggerMidFlight, which will be trigger at specific stages.
  5. have a display named as specified below, have which text the script should write to,
    and have the display set to display the correct text(probably)
  6. adjust all settings to your linkings. (no warranties at all if settings are changed)

Additional Information for gravity drive users:
if you want to use your gravity drive after some height has been reached (aka artificial gravity is a thing again)
  • set the gravityTreshold to a value where your gravity drive can lift the ship
  • set enableDampenersOnStop to false (otherwise your ship will start braking)
  • set TriggerOnStop to the name of a Timer block which you use as a relay to enable your gravity drive.
  • set said timer block to turn both generators and masses on)
  • fly using magic.

known issues/bugs
none?

planned features
  • remove the requirement of hydrogen thrusters, so you could build a atmo and/or ion only ship.
  • add the option to have different ion and hydro/atmo thrust vectors, and setup the script so it will automatically turn if ions are present and could be used instead
  • let the script control the angle, so we get maximum efficiency.
    (lower prio)
Popular Discussions View All (1)
9
9 Mar, 2017 @ 3:33pm
Bug Reports
Iye
27 Comments
Iye  [author] 21 May, 2020 @ 5:10pm 
That actually is an interesting idea. I suppose one would need to do a bit of curve fitting of recorded data onto the gravity formula SE uses and then calculate the distance it would take for gravity to stop you, as well as the distance in which the gravity cuts off. Should be doable.

Cant promise i will really get around to doing it though.
Flatfoot 21 May, 2020 @ 7:50am 
Are there any plans to have this script slow down once approaching the gravity edge? Currently, it sounds like ESCAPE GRAVITY-->BRAKE AND DRIFT,. Would it be feasible to have it be able to coast to a short distance outside of the gravity well?
Re-Evaluated 10 May, 2020 @ 8:39am 
Tested and confirmed, thanks a lot!
Iye  [author] 9 May, 2020 @ 2:14pm 
No, thats not really intentional, just a result of how the script works/developed over time. I think i fixed that now tough. Just moved a single line around :)
Re-Evaluated 9 May, 2020 @ 12:58pm 
thanks for the mod, it works like a charm - almost! When I give the STOP command halfway through the ascent, the program turns off the liftoff thrusters. While it takes me only a single press of the button to turn them back on again, I'm still wondering if this is intentional, and if it is, how I can turn the function off.
Mograth 16 Apr, 2020 @ 7:14pm 
Awesome, thanks.
Iye  [author] 16 Apr, 2020 @ 5:22pm 
Yes, you can set the target speed in the config section at the top. Even if you dont it will still work, assuming the new max speed is larger than the default.
Mograth 16 Apr, 2020 @ 5:06pm 
Is this compatible with mods that increase the max speed?
This one for example: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=382695527
Iye  [author] 16 Apr, 2020 @ 4:55pm 
Ok, im my recent attempts to improve the script i seem to have optimized out the case where atmospheric thrusters are too weak. I didnt notice because my test ship has enough thrusters. I think i fixed it now.
Vorg 16 Apr, 2020 @ 3:02pm 
New problem, It turns the H2 thruster on for just a sec and then shuts it off trying to use just the atmo thrusters. but when the ship is loaded, the atmos have a hard time lifting. Really need H2 also to get up to speed. Before it left the H2 on until it reached 100ms.