Space Engineers

Space Engineers

37 人が評価
Planet To Space Launch Script
   
アワード
お気に入り
お気に入り
お気に入りから削除
ファイルサイズ
投稿日
更新日
4.085 KB
2016年7月1日 10時10分
2016年8月30日 14時28分
5 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Planet To Space Launch Script

解説
WORKS ON THE LASTEST STABLE VERSION
Not tested on the development branch!

UPDATE:
August 30th
- Now the script can start a timer upon leaving the planet gravity
- Changed default Remote Control name to "(Main Controller)" tag

July 5th
- Added graphical LCD display

July 4th
- Added support for multiple thrusters
- Added auto speed adjustment based on estimated sim speed (useful on dedicated server)

BREAKING CHANGES
Warning! Naming conventions of blocks has changed in this new version to support multiple thrusters. Now the script searches by default the "(Main)" tag. All thrusters having the tag in the name will be used by launch control script.

Please rename your thrusters accordingly.

Description
This is a very simple script that tries to optimize fuel consumption while launching from a planet.
It actually for ships with one or more backward thrusters.

Requires:
1 x Programmable Block
1 x Timer Block
1 (or more) x Hydrogen Thruster
1 x Remote Control

Setup:
1) Place your timer and programmable block as you like. Be sure to have your remote control placed.
2) Configure the timer to run the programmable block with default arguments every second.
3) Change the script configuration parameters as described below.
4) Place an LCD and add the "(Launch LCD)" tag to its name (if you changed the tag in configuration use the appropriate one instead)
5) Start the timer.
6) In your cockpit configure an action to run the programmable block with argument "run" (without quotes) to start the launch sequence
7) (Optional) Configure another action to run the programmable block with argument "stop" (without quotes) to stop the script

The script will do the following actions:
1) Turn off inertial dumpeners (needed on dedicated servers)
2) Turn on main thruster if off
3) Launches the ship trying to reach the configured speed
4) If speed threshold is reached, gradually reduces thruster power while trying to maintain the target speed
5) If speed drops under the threshold, gradually increases thruster power
6) when outside of natural gravity field, turns off main thruster and shuts down
7) (Optional) Starts a timer upon leaving the planet gravity field

Configuration Options:
m_mainThrusterName - Change this value to the tag you applied to your main thrusters (Default: "(Main)")
m_mainRemoteControlName - Change this value to the name of your main remote control block (Default: "(Main Controller)")
m_lcdName - Change this value to the tag you applied to your LCD (Default: "(Launch LCD)")
m_debugTextPanelName - Change this value to the tag you applied to your debug LCD (Default: "(Launch Debug)")
m_speedLimit - Change this value to change the target speed (Default: 98.0)
m_thrusterPowerStep - Change this value to change the percentage step at which the script increases or decreases thruster power (Default: 5)
m_triggerTimerUponExitGravity - Enables/Disables running a timer block after leaving the planet gravity field
m_timerToTrigger - Name (or partial name) of the timer to trigger

Launch LCD
The launch LCD will display a graphical rapresentation of the launch status with:
- current speed indicator
- target speed indication
- action indicator (thust up, thrust down, launch, waiting)
- launch progress (both numerical percentage and graphical view)

Debug LCD
If you want to view some detailed informations about the launch control, just place down an LCD (or Text Panel) and add the "(Launch Debug)" tag to the name (if you changed the default config value, make sure to use the one you choose).

Future Enhancements:
Add support for multiple thrusters - DONE
Support for starting a timer block after leaving the gravity field - DONE
Refine the speed alignment algorithm
Any other idea? :)

Color codes have been taken from:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=627416824
33 件のコメント
A Very Stoned Frog 2019年4月15日 15時17分 
is this working now?
ronon_dex 2018年11月25日 16時30分 
and after a while,for no reason,it triggers an exeption at void Main() sandbox entities (I think)
ronon_dex 2018年11月20日 12時42分 
I have all the stuff correct,but when I click RUN with argument run ,the (Main) thruster only increases to 100n and stops,I cant even get off the launch pad,and I shake at like 0.03 m/s,please help.
Garith 2018年2月21日 14時45分 
can you make it so it will deploy parachutes if it fails to make it into space?
SRXcraft 2017年12月6日 13時31分 
Does this work in the actual version ?
flopp 2017年6月5日 11時35分 
i got it. add to the timer setup timer start. the timer will not stop and onl lael (Main) on your thrusters that make you go forward, while facing the sky. (i think)
flopp 2017年6月5日 11時19分 
when i got it set up, ran it, nothing happend. than i decided to try changing making so the timer wouldent stop running. all the thrusters i labeled (Main) went on. is it only the backwards one?
M0rsla 2017年5月15日 18時37分 
After labelling Engines, Remote Control, and LCD the script would run. Unfortunately the script did not actually work. My ship just sat on the launch pad. It appears that the script is not working with the current builds.
SpetS 2016年11月21日 18時00分 
it doesn't work in DEV?
caught exception under execution of script:
Index was out of range
Must be non-negative and less than the size of the collection
Parameter name: Index
CheekyHusky 2016年11月14日 2時54分 
"It actually for ships with one or more backward thrusters" , is what confused me :P, i thought the ship would point its nose up for me, but it seems you need to have the nose up like the nasa rocket launches.

As you asked for suggestions, mine would be that :P, to make it align "up" automatically. I wonder if that would simply be changing something in the hover script?