Space Engineers

Space Engineers

27 ratings
ShipMainProgramMk2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
486.211 KB
7 Aug, 2017 @ 7:13am
12 Feb, 2022 @ 11:53am
48 Change Notes ( view )

Subscribe to download
ShipMainProgramMk2

In 2 collections by Elfi Wolfe
O.I.S. Programing Division
14 items
O.I.S. Ship Main Computer Mk2
35 items
Description
Main ships computer Mk 2

Guide at https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1103890032


Hello,
This is a general purpose program. It covers:
Airlocks
Airpressure
Holding airtanks between two states of fill, giving space for depressurization.
Filling H2 tanks. if this runs it will fill the o2 tanks as well.
Hanger Bays
Giving a basic power reading
Locking landing gear if a connector is locked
Turns lights green or white if a landing gear is locked
Auto level in gravity field.
Orbit holding code (can be used to launch from surface of planet)
(Altitude base can be use to launch and land, only supported 1.153 or newer)
Can use GravDrive in orbit.
Sun chaser (can be use in orbit to get under sun)
(can be use to align toward sun in orbit)
(can be used to align a ship front/side/top towards sun in space)
(to be removed, has it's own script now.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1478436331
)

While in an atmosphere greater than 5% O2 both airlock doors and hanger doors can be opened.
If in world with O2 or Pressurization disabled, airlock, airpressure, hanger all set to not run.

Last Inspected 1.199.020
Last Updated 1.199.020

READ THIS: Programmable blocks and in-game scripts are now in "Experimental mode" in game that you need to turn on in game options.

To set up.
1. Install script in programable block.

Program designed to update LCD once a second.
Program runs each 10 tics.

Arguments:
**can be passed in terminal window, storage, CustomData of the Proggraming block

autolevel = on/off
autolevelon = on
autolevel6 = on/off
autolevel6on = on
RocketGyro true //sets autolevel in rocket mode (back of RC/chair towards gravity)
timerName Time Name 3
shipStatusLCDName [Alphastatus]
o2TankLow 20 //sets the O2 turn on at 20%
o2TankHigh 90 //sets the O2 turn off at 90
h2TankLow
h2TankHigh
orbitalrebuild
rebuild
lcdrebuild
solararrayon
solararrayoff

Orbital commands:
goland
godeepspace
gohover
orbitaloff
gravity
altitude
hover
currentgravity
currentaltitude
currenthover
targetaltitude 100
targethover 25
targetgravity 0.20
changealtitude 100
changehover -10
changegravity 0.01
GravityEmergency 0.3
EmergencyThrusterName [EmergencyThrust]
velocitylimit ## //speed limit of the orbital code

To do:
Improve the Guide.
Popular Discussions View All (2)
1
24 Jan, 2019 @ 1:26pm
reported bugs
Elfi Wolfe
0
15 Apr, 2018 @ 6:24pm
Suggestions
CTH2004
61 Comments
Elfi Wolfe  [author] 15 Feb, 2022 @ 5:08pm 
Will check on it. There was some changes to the H2 thruster systems that are causing problem all voer.
astroninja221 15 Feb, 2022 @ 11:56am 
Seems like autolevel is broken. Keeps randomly flipping my ships. Even tried some of your blueprints and it's still not working
Feramance 7 Feb, 2022 @ 11:27am 
The enter GasTank method was rewritten, a new class was added, and a number of new variables (mainly lists/dictionaries). In added the ZoneConstruction method was altered slightly to allow the changes to function properly
Elfi Wolfe  [author] 7 Feb, 2022 @ 11:00am 
I can always take a look at it.
Feramance 6 Feb, 2022 @ 5:37pm 
Successfully got the script to work with a theoretical unlimited number of gasses that it can individually handle (check tanks and turn on and off generators for). If you'd like me to share it with you maybe you'd consider adding the changes, let me know and I'll link it to you
Feramance 6 Feb, 2022 @ 12:53pm 
I thought of locking out deuterium but I'm a developer myself and wasn't happy with that. I'm working on a way for the script to automatically adjust to any amount of gases and their levels and generators with custom levels controlled through the custom data of the PB. I think I'm around half way done, if you want I can send you the script after and if you want add the changes
Elfi Wolfe  [author] 5 Feb, 2022 @ 8:12am 
I just tested the program in flight mode and dampener are not stopping it.
keen dampeners if one side has thrust override, the thruster opposite will not try to stop it.
Not sure how it triggered for you.
Elfi Wolfe  [author] 5 Feb, 2022 @ 7:58am 
Harder lock out because you need the name right.

for (int j = 0; j < list.Count; ++j) {
if (list[j].SubtypeId.ToString() == "Deuterium") return false;
if (list[j] == OxygenGasId) return true;