Space Engineers

Space Engineers

432 ratings
Flight Assist
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
21.541 KB
17 Nov, 2015 @ 3:30pm
2 May, 2020 @ 7:33pm
39 Change Notes ( view )

Subscribe to download
Flight Assist

Description
Flight Assist
Formerly known as Auto Hover

Please leave a rating if you like the script! It helps me reach a broader audience!


Version 3.0 is a near total rewrite. Some features are missing. If you notice something is missing, or would simply like to request a new feature, please leave a comment here asking about it. All of the math is the same, so the script should mostly act the same, once you get the new version set up.

I will be working on making improvements to the control algorithms once I get the rest of the script working well.



What is Flight Assist?
Flight Assist is a program that allows you to precisely control your ship without having thrusters in all directions. While in gravity, you can use the hover module to stop all lateral motion, while only having upward thrust (like a helicopter). In space. you can use the vector module to automatically align your thrust vector with your prograde vector, bringing you to a complete stop without having to have thrusters in all 6 directions.


Setup Instructions
  1. Place programmable block, edit it, and select FlightAssist from the "Browse Workshop" menu
  2. Create a block group named "Flight Assist" and add your cockpit (or remote control block), gyroscopes, and optionally a text panel to the group. The names of these blocks do not matter, they just have to be in the block group.


After you compile the script, the programmable block's Custom Data field will be populated with a config. You can edit any of these variables and recompile the script. If you mess something up, just delete the entire CustomData field and recompile the program.

Ship Toolbar

FlightAssist is controlled by running the program from your ship's toolbar with various arguments. Drag the programmable block to your toolbar and select "Run" from the options.

Run Arguments:
  • Stop - Completely stops Flight Assist
  • Hover Disabled - Keeps the hover module on, so you can still see your speed and angles, but it won't rotate you at all.
  • Hover Smart - New experimental mode that automatically enabled/disables gyro override so you can fly normally, and the script will only take control when you stop moving your mouse or holding a movement key. If you add a number at the end of the argument, Flight Assist will maintain that speed moving forward.
  • Hover Smart # - Replace '#' with any integer 0 - 100 to set your target speed. Your ship will angle downward to build up speed, and then angle back up to maintain that speed. Works better with more gravity.
  • Hover Stop - Stops all lateral motion
  • Hover Glide - Keeps you level, but cancels sideways movement
  • Hover FreeGlide - Keeps you level, and doesn't cancel any movement
  • Vector Disabled - Keeps the vector module on, so you can still see your speed, but it won't rotate you at all.
  • Vector Brake - Points your thrust vector along your prograde vector and activates dampeners to bring you to a stop.
  • Vector Prograde - Aligns your heading to your prograde vector (forward)
  • Vector Retrograde - Aligns your heading to your retrograde vector (backward)

Problems/Questions
If you are having issues with the script, feel free to email me (Address is at the top of the script) for help.

You may use this script any way you want, including modifying it. Please just give me credit if you use or modify it.
Popular Discussions View All (2)
5
12 Jun, 2016 @ 4:23pm
Use with Digi's Realistic Thruster Mod
Engi
4
19 Feb, 2017 @ 8:09am
Orbit Assist idea
Engi
437 Comments
silverbluemx 2 Feb @ 7:16am 
For anyone interested, I've published a small update that I created for my own use a while ago.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3419652740

As identified in many comments, the original script fails when the block group with the required blocks (default group name : "Flight Assist") does not exist. This very simple fix throws an exception instead of crashing. You can now create or rename the group and recompile.
There are no other changes.
Warlocc 26 Jun, 2024 @ 4:22pm 
Anybody know a working alternative to this?
mint_me 6 Aug, 2023 @ 1:12am 
are we able to get a hold heading.. i know its like but the is vector prograde right.. yes, but if you are using a klang drive to move around you first have to get moving to have a prograde then hold it then u can use ur klang drive (unless you somehow have a perfect klang drive that does tilt ur ship in some way)... doubt.
condottiere 15 May, 2023 @ 7:09am 
The group name to edit in the code is on line 15, configOption BlockGroupName "Flight Assist". Replace the bit in the quotes with your custom group name.

This is useful when running Flight Assist on multiple ships that are sometimes connected on the same grid, to differentiate WHICH ship a certain flight assist group is controlling.

To help reduce overhead when not in active use, you can edit line 23 startCommand "hover smart" to "stop" instead. On every reload of the save game, the script will start in stopped mode by default.
condottiere 15 May, 2023 @ 7:00am 
@ChaosOrder: I'm not knowledgeable about scripting, but I know there is some outdated code in this script that throws the exception error. Here's how I successfully use Flight Assist all the time:

1) Delete existing pro block. Don't know why, but this exception error won't let you recompile in a pre-existing prog block once you screw up the steps here.

2) Add/build fresh new prog block.

3) MAKE SURE YOU ALREADY HAVE A GROUP with control seat and gyros. Default name "Flight Assist". If you use a different name, copy that group name for...

4) Edit prog block and add Flight Assist script. Near top of code, ADD YOUR GROUP name if not the default. I believe it's case sensitive. Click OK.

5) Profit. Everything should work at this point. Add Run argument commands to your control seat toolbar, per description above. Arguments are not case sensitive.
ChaosOrder 22 Apr, 2023 @ 6:32pm 
tried using but gave bunch of exception errors and wont let me recompile
condottiere 22 Mar, 2023 @ 10:33pm 
@TopSecretPorkChop: Subgrid thruster control is not a feature of this script. This script does nothing for your purpose.

You want to use Whiplash's Subgrid Thrusters script, or the new reworked Vector Thrust OS (based on the old well-known script by Vermilion).

IRL an Osprey primarily has two flight modes. Whiplash's script doesn't control rotors, so you'll have to set up a basic 2-position rotor setup using Reverse direction to switch rotor/thruster positions. Then per Whiplash's script page, LOCK rotors to avoid Clangy behavior. I'm using exactly this two-position rotor/thrust setup on my current mothership.

Bonus: This Flight Assist script WILL work with Whiplash's subgrid thrusters, since Flight Assist only uses gyros, not actual thrusters. (I'm using both together on my mothership)
condottiere 22 Mar, 2023 @ 10:22pm 
@Thunderhunt: Works fine for me, with some quirks.

@Waipa: Check comments further down: Req blocks (control and gyro) need to be in the "Flight Assist" group BEFORE editing and compiling the prog block, or else it'll throw an exception when it can't find the named group of blocks (if this happens, grind/delete the prog block, place a new one, and do it again).

Hover stop, hover glide, and hover freeglide have never allowed me to turn -- I'm locked into a single direction along with keeping level. But this has been true for several years.

OTher than these quirks of usage, I still consider this script a must-have on all my most important ships. In case it helps reduce system overhead, I make sure to run "stop" on each prog block AND turn off the block (b/c reloading a saved game with the block on will restart the script in hover smart mode) until I need to use the ship running the script.
[RM] Thunderhunt 29 Dec, 2022 @ 7:49am 
Is this still working properly?
Waipa 4 Sep, 2022 @ 2:28pm 
something seems to be a bit broke, would love to see some update anytime soon? :)