Space Engineers

Space Engineers

Drone/Utility Ship Manager
This topic has been locked
ZerothAngel  [developer] 8 Feb, 2016 @ 11:01am
Docking Manager
The Docking Manager enables/disables certain blocks when docking or undocking from a mothership. In particular, it assumes you will dock with a connector and perhaps landing gear(s). Docking that involves merge blocks is not supported with this version of the Docking Manager.

To use the Docking Manager, you must run the programmable block with certain arguments. This is the only supported way of docking or undocking (don't use the 'P' key!)

The two arguments are:
  • undock -- This will start a sequence of events. First it will power up all necessary systems (thrusters, gyros, reactors) and switch on-board batteries to discharge-only. Then it will power up any configured systems (see the TOUCH_* settings at the top of the script).

    After 1 second, it will unlock all connectors and any landing gear.

    After another second, it will disable all connectors (making it easy to pull away).

  • dock -- This will start another sequence of events. It assumes the ship is already up against the mothership's connector.

    First, it will enable all connectors.

    After 1 second, it will attempt to lock any connector. If no connectors successfully lock (maybe you're too far), nothing else will happen. You can use this to preemptively enable your connectors before approaching, if you wish (and aren't afraid of the connector magnetic pull!)

    If a connector successfully locked, after 1 second, any landing gear that is ready to be locked will be locked. Any batteries will be switched to recharge. The thrusters and gyros will be disabled. Then any configured blocks (see TOUCH_* settings) will be disabled as well.
While docked...

While the ship is docked, the script will periodically (every 10 seconds) check if it is still connected. If it finds the ship is no longer connected anywhere, it will perform the undock wake up sequence (thrusters, gyros, reactors, etc.)

This guards against accidental separation and ensures the ship will at least have its flight systems enabled to keep from drifting away.

For this to work, the ship must have a power source other than on-board batteries. A backup reactor works best, and needless to say, it must be enabled and have fuel (the script will never turn reactors off -- only on, if they happen to be off on undock).
Last edited by ZerothAngel; 14 Feb, 2016 @ 2:30am