Space Engineers

Space Engineers

Soft Landing Manager
14 Comments
Leconite 9 Jun @ 10:49am 
Yeah, the breaking burn would accomplish a good deal of the automated asteroid landing.

Obviously, in gravity, "down" is set by the environment, a pilot could start landing upside down, and the script would fix it.
In space, we don't have that luxury. The simplest way of initializing terrain avoidance might be to set "down" to the ship's downwards direction on landing activation..
It's up to the pilot to orient the ship correctly before initiating an automatic landing.

It may be a good idea to make space landing activation dependent on having a radar lock "altitude" to the landing target; and auto abort the landing if lock is lost.
silverbluemx  [author] 9 Jun @ 5:57am 
1. Is easy, will do.
2. Maybe. The notion of "landing" could be adapted reasonably easily (manage a breaking burn to reach a very small speed when contacting the asteroid). But terrain avoidance is built around the notion of "down" and "horizontal". It would be complex to adapt, and won't fit in what little I have left before hitting the 100 000 characters limits (I don't want to have to minify, this is what I learn C# with so I want to produce somewhat readable code 😉). Other scripts such as Sam's Autopilot Manager may be a good option for you if that's what you want.
3. Multi display as in cockpits and such ? Sounds reasonable.
Leconite 6 Jun @ 7:15pm 
Some feature ideas,
1. Commands to turn the radar on/off in mode 0. Use case, to get/display the "altitude" when manually landing on an asteroid in space.
2. A mode for landing with terrain avoidance in zero gravity. Use case, automatically landing on an asteroid in space.

Useful when the ship is ~ 100m square and masses 14K tons empty & ~ 85K tons loaded.
Even at 0.1 m/s that thing is going to land / impact with a lot of force.

3. Support multi display blocks.
Leconite 5 Jun @ 1:48pm 
OK, cool, I thought it would not work unless Real Orbits was used.
silverbluemx  [author] 5 Jun @ 12:59pm 
@Leconite : well to test it out you can always subscribe to Real Orbit and not add it to your world 😉. I just did a test with a new world in pure vanilla, and it freaks out here and there but because world speed limit is 100m/s, it's not so bad, and close to the surface it gets better. So, to get a taste for what it does and see the terrain avoidance function in action, go for it !
For the next version, I'll try to make it work somehow in vanilla, and take your advice on naming.
Leconite 4 Jun @ 3:44pm 
Is it possible to not require the Real Orbits mod.
I would love to test this out in vanilla. :-)

Also, setting the ship's directional reference via the WMI convention of choosing a controller with "Reference" in it's name might be a good idea.
silverbluemx  [author] 30 May @ 4:27am 
New version released with Aryx-Lynxon Drive Systems support built-in !
Check it out with the new terrain avoidance function ! (don't expect perfection from it just yet...)
silverbluemx  [author] 19 May @ 10:01am 
@xxxZohanxxx : could you tell me more (ship type, grid size, what's on it etc.) Share screenshots if you can. One quick troubleshooting advice is to look at what the script says (in the programmable block window) when you compile it. Does it say "Found a ship controller:" or "Using configured controller:" and if so, is the controller name the one you expect ? The script only detects and uses thrusters that thrust upward from the point of view of the ship controller. You can add "SLMref" in the name of the block to make sure the script uses the one you want.

@Schmoobledeedoo : I've seen it featured, I'll definitely check it out ! (Space Engineers definitely benefits from more engineering and I'm a big KSP fan !)
xxxZohanxxx 17 May @ 2:36pm 
Hi. I have a problem: the script doesn't see any vanilla thrusters (Found 0 h2/ion/aero lifters). There are no modified thrusters in the grid.
Schmoobledeedoo 19 Apr @ 11:00am 
@silverbluemx, I've made a really good KSP simulacrum in SE, dm me to check it out!
silverbluemx  [author] 18 Apr @ 12:39pm 
@ArtificialAI
Yes, at the moment to properly classify thrusters (hydro, ion, atmo), the script looks at the block name. Support for modded thrusters must be added individually.
I have a significant update in the works, close to be complete but needs a bit more polishing and testing. Based on your suggestion it will support Aryx-Lynxon Drive Systems out of the box.

In the meantime, you can make it work for you with this simple change. Make a copy of the script and go to line 592. (this one : https://github.com/silverbluemx/SE_SoftLandingManager/blob/main/Script.cs#L592)

Look for:
if (name.Contains("Hydrogen")) {

Replace by :
if (name.Contains("Hydrogen") || name.Contains("Epstein") || name.Contains("RCS Thruster")) {
ArtificialAI 17 Apr @ 3:41pm 
Doesn't work with modded thrusters like Epstein from my testing. Perhaps add a tag to manually select thrusters?
silverbluemx  [author] 11 Jan @ 2:01pm 
I've uploaded today a new version of the script with a more refined computation of the speed vs altitude landing profile, and a video illustrating how it works.

The video includes succesfull landings on Pertam with two different ships (one with very marginal thrust-to-weight ratio on Pertam, and one with a ton of atmospheric thrust).

By default the script tries to be on the safe side and doesn't rely on atmo thrusters, but it's possible (and for Pertam, recommended) to tell it that there will be an atmosphere, and even possible to explicitly tell it that it's Pertam.

As a reminder, this heavily relies on the planet gravity extending away to a long distance from the surface and following an inverse square law, which is not what the game natively does, hence why the mod Real Orbit is required (and a speed mod to make things even more interesting).

I haven't tested it with the vanilla game.
Survival Ready 6 Jan @ 1:07pm 
Have you tested landing on Pertam?