Space Engineers

Space Engineers

34 ratings
Zeppelin Control System
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
3.862 KB
6 Nov, 2017 @ 6:47pm
21 Mar, 2018 @ 2:49pm
4 Change Notes ( view )

Subscribe to download
Zeppelin Control System

Description
Introduction

Have you ever been frustrated at just how difficult it is to get a desired altitude using zeppelin cells? If your answer is yes, then this script is for you. This script, using an advanced algorithm, can detect precisely what percentage of the zeppelin cells must be filled in order to be stable at your desired altitude, and is able to take you to that altitude with precision and safety. It works just about everywhere, currently supporting earth, mars, and the alien planet, and support for the moons possibly coming in the future. In terms of mod support, it can handle either the weaker or the stronger versions of the zeppelin cell mods, although it defaults to the weaker version.

For an example build using this script, check here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1193941121

Quick Start Instructions

1. Place a remote control, make sure it is upright and facing in the forward direction. Add to its name, "[rc]"(Without quotations).

2. Place however many balloons as you wish, making sure they are in the same conveyor network. Make sure they are all in a group called "balloon"(Without quotations).

3. Place your desired amount of oxygen generators. These will be used to fill up the balloons when needed, so, if you are in survival, make sure they are well stocked with ice! Make sure they are on the same conveyor network as the balloons. Make sure they are all in a group called "oxyGen"(Without quotations)

4. Place a few hydrogen thrusters facing upward. These will be used to dispose of excess hydrogen in the balloons. Put them in a group called "exhaust"(without quotations).

5. Place down a programming block. Open its terminal, click edit and import the script. Now, in the programming block's terminal you will see a text box going by the name of "arguments". This is where you will input all of your configuration. Here the most important arguments are "sea" or "ter". The "sea" argument will allow you to set your altitude based on the sea level. However, the "ter" argument will allow you to set your altitude based on your altitude relative to the ground, this is the altitude that you see on your HUD. So, for example, if you would like to go to an altitude of 3km relative to the ground, you would enter into the arguments section "ter 3"(Without quotations).
IMPORTANT: The script defaults to support the weaker version of the zeppelin mod. However, if you would like to use the stronger version, you must input the argument "bforce 6000"(Without quotations) in addition to your other arguments. For example, if you wanted to achieve an altitude of 3km relative to the terrain below you, and were using the stronger version of the zeppelin mod, you would use the argument "ter 3;bforce 6000"(Without quotations).

(OPTIONAL) I strongly advise you to obtain a gravity alignment script. This script will work without one running, but your experience flying will be worse. To add one of these onto your craft, consult the instruction for the gravity alignment script of your choosing.

7. To start the script, simply click "run" in the programming block's terminal.

8. Happy flying! Keep in mind that once you reach the correct filled ratio(as indicated on the left panel in the programming block's terminal), you do not need to continue running the script any longer, and may deactivate it and you will conserve your altitude(unless you change your ship's mass, as this affects the filled ratio needed to achieve a certain altitude)

Necessary components

Component
Naming
Notes
Remote Control
Has in its name "[rc]"(Without quotations)
Make sure it is upright and facing forward.
Zeppelin Cells(Balloons)
In group called "balloon"(Without quotations)
You may have as many as you wish.
Oxygen Generators
In a group called "oxyGen"(Without quotations)
Used to fill the balloons when needed. You may have as many as desired.
Hydrogen Thrusters
In a group called "exhaust"(Without quotations)
Must be pointing upwards. Used to drain the balloons when needed. You may have as many as you wish.
Text Panel(LCD, Wide LCD, etc.)(OPTIONAL)
Has in its name "[lcd]"(Without quotations)
If present, the script will output information to this display.

Arguments

To input arguments, you must separate each argument with a semicolon(;). You must refrain from adding additional spaces, as if you do, the program will fail to read your argument.

Argument
Valid input
Definition
Additional Details
sea [number]
Any number. Ex: "sea 3"
The script will set this altitude above sea level as its desired altitude.
This is NOT the value you see on your HUD. This value must be in km. Default is 6.
ter [number]
Any number. Ex: "ter 0.5"
The script will set this altitude relative to ground as its desired altitude.
This is the value you would see on your HUD. This value must be in km. Not used by default.
maxspeed [number]
Any number. Ex: "maxspeed 0.5"
Craft will refrain from exceeding this speed.
The lower this number, the safer and less bouncy the change in altitude will be, however the slower it will ascend. Default is 5.
planet [name]
earth, mars, alien. Ex: "planet alien"
Script will use atmospheric and gravitational configuration for this planet.
Necessary if you wish to use the script in planets different than the earth. Default is earth.
bforce [number]
Any number. Ex: "bforce 6000"
Script will set this as the force in kN exerted by each balloon.
Necessary to use the stronger version of the zeppelin mod, in which case you would use the value 6000. Default is 200.

Example of a correct argument: "ter 2.5;maxspeed 2;planet mars;bforce 6000"(Without quotations)

If you want to clear all arguments, use ";"(Without quotations) as your argument.

Feedback

If you have any suggestions, ideas, or questions, don't hesitate to contact me.
35 Comments
Pych 5 Jan @ 4:30am 
I checked the code, it seems there was an error on line 218. I remove the few lines for the if condition LCD=null and recompiled. It is now working.

For anyone wanting to fix it: in the code, line 218, remove:

if (lcd != null)
{
lcd.WritePublicText(printout);
}

And recompile.
Pych 5 Jan @ 4:24am 
Not sure if this is supposed to still be working. I couldnt make it work at all. The script keeps saying "Assembly not found. Please compile script."

I compiled, rebuild the test ship / groups many times. Nothing
NoQuiche  [author] 2 Oct, 2020 @ 11:20pm 
@Fish The idea is quite similar, but this mod uses a few constants related to each of the solar system's planets. You would have to investigate what these constants are in relation to the water. In particular, the upward forces exerted by the hydrogen tanks and the downward force exerted by gravity while in water. One thing that makes this easier in water is that gravity does not change. If you're able to make something that works in water based on my code you're free to publish it as your own.
Zaƒlow 2 Oct, 2020 @ 8:28pm 
@Fish I think if you use control find and replace all instances of the block names in question with the desired block names you'll be close, but the other issue is the use of hydrogen thrusters as exhaust. if you are making a submarine I would use vents and oxygen tanks to go up and down with a group of vents working to control the pressure. then I would replace all the hydrogen controls with vent controls. lastly there is the issue of controlling it via arguments. if you would rather control it with c and space I would go about it differently. I would use a timer block trigger driver and set up my timerblocks to control the vents based on c and space buttons. that should work, but this script would allow you to set the desired depth via argument if that's how you'd rather control your craft.
Fish 29 Sep, 2020 @ 8:10pm 
i wonder if it would be possible to modify the variables to make it work with the water mod and hydrogen tanks
FifthPegasus 10 Mar, 2020 @ 3:59pm 
Is there a way to make this use hydrogen tanks to drain the cells?
Greedy me wants to keep all my hard stolen hydrogen.
NoQuiche  [author] 10 Feb, 2019 @ 9:23am 
Hello, Josh. This was most likely caused by an API change in some recent update, and as you say will cause the script to act incorrectly. I don't currently have access to a Space Engineers installation but will fix this as soon as I am able. Thank you for reporting this problem.
Borgernaut 8 Feb, 2019 @ 12:08am 
secondsElapsed is returning zero resulting in current velocity returning infinity
Borgernaut 7 Feb, 2019 @ 9:08pm 
current vertical velocity is just switching between -infinity and NaN? how to fix
NoQuiche  [author] 21 Jan, 2019 @ 6:47pm 
Unless something changed, this should work in both survival and creative.