Space Engineers

Space Engineers

Ikke nok vurderinger
Large Grid Lander Script
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Filstørrelse:
Offentliggjort:
Opdateret:
94.155 KB
6. mar. 2016 kl. 20:34
11. aug. 2020 kl. 13:56
22 ændringsbemærkninger ( vis )

Abonner for at downloade
Large Grid Lander Script

Beskrivelse
2017-11-17 Update: No longer needs a timer block. If you had one before, I recommend you "disconnect" it from the prog block (remove all its actions) to reduce surprises.

ZerothAngel's Large Grid Lander Script

This script is primarly for "lander"-type ships or even planet-bound ships in general. It incorporates features from my other scripts as well as a "Vertical Takeoff, Vertical Landing" (VTVL) module to aid in planet launches and re-entries.

It will work on small grid ships, but the door & airlock features won't be usable of course. I have a separate lander script for small grid ships/drones (basically a beefed-up version of my Drone/Utility Manager script), currently unpublished. (Actually, the small grid version has been published in a way - see my Passer-class Utility Shuttle and just grab it off its prog block.)

(And if you got here from one of my landers, here's how to update the script in any of my published landers.)

For a ship that demonstrates all/most features of this script, see my Hamerkop Mk2, especially the toolbar descriptions.

Features

New features created for this script:
  • Assisted launches. Aligns you by pointing the configured facing toward the ground. Thrusts up using ion/atmo or all 3 thruster types, using only enough thrust to maintain near-max speed (and thus saving power/hydrogen). Upon leaving natural gravity, it will automatically re-engage all thrusters and relinquish control of the ship.

  • Assisted descents. Thrusts you forward (or whatever direction you want) allowing you to line up for re-entry. Upon hitting natural gravity, it will take control of the ship and align the ship so its bottom is facing straight down (also configurable). Shuts off bottom thrusters so the ship drops like a rock for the ~40km or whatever to the surface.

    Allows you to manually initiate braking to slow to 50 m/s using either ion/atmo or all 3 thruster types

    Optionally performs automatic braking and stops at a set altitude.

    Note the auto-braking feature is meant to stop the ship safely above the ground at a certain altitude. It is not a full autopilot or replacement for the remote control autopilot.

    However, as of a recent stable release (01.153), it is now possible to read the ship's elevation directly. Touching down and landing is now possible... even at a specific location.

  • "Orbiting." When the orbit feature is enabled, your ship will periodically align itself with the gravity of the planet (1/6ths of a second every 3 seconds). Since the alignment is only done periodically, you retain near-full control of the ship and are able to adjust its heading.

    You can then use cruise control to move forward at a fixed speed or manually thrust (if that's your thing :P).

    Really useful when cruising rapidly over the surface of smaller planets.
A few features from my Ship Manager script:
  • Automatic door closing

  • Simple airlock (i.e. 2 consecutive doors) management

  • Oxygen manager, air vent manager (those things eat up 330 kW!)

  • Timer kicker/reactor manager for docked ships (if the lander happens to also be a "carrier")

  • Redundancy manager

  • Damage control (highlights any damaged blocks using "show-on-HUD")
A few features from my Drone/Utility Manager script:
Finally, it also incorporates two of my standalone scripts:
Setup

Load the script into the programmable block.

There is one option you absolutely must set: VTVLHELPER_REMOTE_GROUP

Set it to the name of a block group that contains a Remote Control block that is properly oriented with respect to your ship. This remote control is used both for orientation and natural gravity detection.

The other VTVL options are described below and should be set according to the configuration/performance of your particular ship:
  • VTVLHELPER_BURN_DIRECTION & VTVLHELPER_BURN_SPEED -- When beginning the drop/re-entry procedure, the ship will cruise in this direction and speed as long as it is still out in space.

  • VTVLHELPER_BRAKE_DIRECTION -- This is the ship facing that should be directed toward the planet surface while dropping and braking.

  • VTVLHELPER_BRAKING_SPEED -- When braking, this is the speed to slow down to.

  • VTVLHELPER_LAUNCH_DIRECTION & VTVLHELPER_LAUNCH_SPEED -- The direction & speed to use when launching. When direction is set to "Up" it means the ship will align horizontally and boost straight up. When direction is set to "Forward," the ship will line up vertically (i.e. rear thrusters pointing toward ground) and boost that way.

  • VTVLHELPER_ORBIT_DIRECTION -- The facing of the ship to keep pointing downward when the orbit function is enabled.
Basic Usage

See the VTVL module documentation for the primary features of this script.

For the other features, see my other scripts.

Source

For the bleeding edge, as well as a more readable and modular version of the script, go see GitHub[github.com]. I usually only update the workshop version when things break or major features are added.
41 kommentarer
halfeatenmonkey 5. feb. 2022 kl. 12:40 
Ever since the newest update any new grids I build that use this script take of and land at an angle. My old grids running this script all work fine. Not sure what's happened.
SewerRat5150 17. jan. 2021 kl. 0:02 
I just loaded your code into a programmable block and received this error:
184,28 Unreachable Code Detected
2481,0 Unreachable Code Detected
SewerRat5150 16. jan. 2021 kl. 23:40 
I just came across your script and I have a small grid. In your description you put a link for a script for small grid, (Passer-class Utility Shuttle). That link no longer works. Would you be willing to update the link or publish the script itself? TY
Fendralor 16. apr. 2020 kl. 12:19 
Hey, I know that this hasn't been updated for a looong time now, but I just stumbled over this script. Parts of it are broken now (unreachable code, some API-changes etc.) Is there any chance you might update this again? :O
Mattacon 30. jan. 2018 kl. 19:25 
Bah, silly me. I got the Remote group syntax wrong. The script works perfectly after correcting the error.
Shoku 'Jetwash' Silverfall 26. okt. 2017 kl. 0:05 
This is an excellent script, you deserve a lot more exposure.
ZerothAngel  [ophavsmand] 28. juni 2017 kl. 10:46 
Cool, cool. I added the option anyway, but I'll have to test it out before releasing it (and by default, it will continue to use all thrusters for alignment, so there shouldn't be any surprises).

And yeah, I think that's the reason why I set it up this way. In the upper atmo, ions are still somewhat useful... But, for example, if your power is on a budget, I suppose you'd want to restrict it to just hydrogen.
ConTaGious 27. juni 2017 kl. 23:44 
Thanks for the quick reply man, and i think you're right in that it's just the gps alignment that uses the ion thrusters (or rather, all thrusters). I'd have to load up the game and run it again and pay attention to know for sure, but being as i haven't payed attention to it at the end during actual braking, i'd say its safe to say its working as intended. My bad, i should've done a bit more lookin first.

That being said, i actually prefer to have ions help align it to gps as im sure most of the aligning needed is during the beginning of the drop phase (where ions are still useful). Either way, im happy w/ alignment using all. Thx again
ZerothAngel  [ophavsmand] 27. juni 2017 kl. 22:23 
Do you mean sideways & forward/reverse facing ions?

I've tested it a bit with my lander and it seems to behave as I expect it to. When it starts braking, it only uses hydrogen. Downward-facing ions are disabled, however sideways/forward/reverse ions (& atmo) thrusters are used to align over the GPS point. In fact, it will use all thrusters for alignment.

So the 2nd thruster-spec in "drop auto" is just for the braking thrusters.

If that's the problem, I can probably add a script option to apply the same thruster-spec to alignment thrusters as well. (I don't really want to add anymore arguments to the "drop auto" command.)
ZerothAngel  [ophavsmand] 27. juni 2017 kl. 21:52 
Sounds like a bug. But I'm not seeing anything obviously wrong in the code yet.

Does it behave correctly if you leave out the GPS coords?