Jump to content

[Lua] [Script] Basic space-only autopilot


Recommended Posts




This is a basic autopilot script that can accelerate your construct towards a planet and later apply brakes to stop. Vertical space engines are used to control drift.



  • Space brakes, 1.5+ g.
  • Vertical space engines (pointing down), 0.3+ g.
  • A remote controller or a separate hovercraft seat.


  • No manual piloting. Use another script to get to space and to land.
  • No collision avoidance. Make sure there are no planets, moons, asteroids, space stations or pirates between you and the destination.
  • Planet positions are stored in the script. If NQ moves the planets, the script will have to be updated.


With an auto-configuration schema (recommended)

  1. Download this file to Game\data\lua\autoconf\custom in your Dual Universe installation directory. By default it's C:\ProgramData\Dual Universe\Game\data\lua\autoconf\custom
  2. Right-click the control unit (a remote controller or a hovercraft seat) and select "Update custom autoconf list". This needs to be done only once.
  3. Right-click the control unit and select "Actions for this element", "Run custom autoconfigure", "Basic Space Autopilot".

With a pasteable script configuration

  1. Open this link and copy everything to clipboard.
  2. Right-click the control unit (a remote control or a hover seat) and select "Actions for this element", "Paste Lua configuration from clipboard".
  3. The game should display a "Lua script loaded" message. If it did not, restart the game and copy the script configuration again.
  4. Link the core (required) and fuel tanks (optional) to the control unit.


Many planet positions were provided by @meigrafd from Hyperion.

The script was bundled (amalgamated from multiple .lua files) using amalg.


Change log

2020-09-23. Fixed heavy constructs not accelerating past 29997 km/h. A radar widget will be displayed if a PVP radar is linked (not available on remote controllers). Tested in r0.22.2.

2020-09-16. Posted the first version outside the NDA forums section. Tested in r0.21.6.

Link to comment
Share on other sites

26 minutes ago, realMod said:

Hi, sounds great. Is there also another LUA script available for on planet autopilot, i.e. atmospheric flight?

Many autopilot scripts exist, but most are not shared publicly. You may have to script it yourself :)

Link to comment
Share on other sites

@hdparm -- Love it.  


On a return flight to Sanctuary Moon, I noticed it still showed 100km to Sanctuary, however I was 30km from the surface.  The difference caused me to be a bit high on speed as it didn't slow early enough. Is this user error, or is it possible the coordinates for Sanctuary Moon are off slightly? 



Link to comment
Share on other sites

It's possible. What planet were you flying from? Could you record a video next time it happens? Also check the Lua chat tab for errors.
EDIT: adding more vertical space engines apparently fixed this for Sunfyre.

Link to comment
Share on other sites

8 hours ago, Keimond said:

do you think it's possible to make this work with a gravity engine ?

This script stops your construct 80 km above a planet and holds it there with brakes. You lose less than 0.3 km of altitude per hour, so you can AFK for a day or two :) The script could be modified to use an AGG, but would it be useful?

Link to comment
Share on other sites

  • 5 months later...
  • 1 year later...
On 10/11/2022 at 1:30 PM, AtroKahn said:

My favorite AP... Does this work with the release version of DU?

It should still work, but not well. There have been many DU changes since the last script update. Speed limit now varies with construct mass, construct mass is no longer relativistic, planets are different. I plan to update the script this week or next.


EDIT: script update will take somewhat longer than expected.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...