Space Engineers

Space Engineers

597 个评价
Whip's Automatic Drop Pod Script
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
28.183 KB
2017 年 5 月 22 日 下午 4:13
2019 年 12 月 20 日 上午 5:33
17 项改动说明 ( 查看 )

订阅以下载
Whip's Automatic Drop Pod Script

在 Whiplash141 的 1 个合集中
Whip's Scripts
22 件物品
描述
ATTENTION: This script triggers itself automatically. No timers needed!



This code allows you to make automatic drop pods that will safely land themselves. This is a much more user friendly variant of the code that I designed for my Hunchback Planetary Dropship.

My standard Infantry Drop Pod can be found HERE!


  • Drop pods using this code will automatically orient themselves to burn off any unwanted lateral velocity which makes low altitude drops possible!

  • If you have a large ship and you don't wish to actually touch down, you can change the "attemptToLand" variable to false and the code will make your ship come to a stop right above the ground!

  • Additionally, the drop pod does not need to be manned in order to land! The code can land just fine without a pilot!
  • You can use ANY thruster type. The code is able to compensate for thruster efficiency and cargo mass to ensure a smooth landing!
  • Code variables can be changed without needing to open the program!
  • You can use the same code on every drop pod without any issues or need for renaming!


Necessary Blocks
  • A cockpit, remote, or flight seat of any type
  • A programmable block
  • At least 1 gyroscope
  • At least 1 upwards braking thruster (you should test if your drop pod has enough thrust to land!)
Optional Blocks
  • A text panel
  • A merge block, connector, and/or rotor
  • A timer (Not required anymore!)
Setup
  1. Load this script into a programmable block


  2. Add "Drop Pod" to the name of the cockpit or remote control on the drop pod. The code will align the bottom of the ship controller to gravity, so plan accordingly!

  3. Make sure that you have at least one gyroscope and enough braking thrust to come to a safe landing!


  4. (Optional) Add "Drop Pod" to the name of the merge block, connector, or rotor used to attach
    your drop pod to the drop platform. If you dont have any of these, you can skip this step!

  5. (Optional) Add "Drop Pod" to the name of the text panel that will be used to display drop pod information. If you dont have a text panel, you can skip this step!

  6. When you are ready to drop, run the program with the argument "drop". This argument can be bound to a timer or ship toolbar!



Changing Variable Values
Open the programmable block's Custom Data to change variables without needing to mess with the code!


Using Multiple Drop Pods on the Same Ship
You do NOT need to rename anything if you want to drop multiple drop pods from the same ship! You can just copy and paste the SAME drop pod without any additional setup!

Variable Definitions
Variable Name
Function
referenceName
Name tag of the drop pod ship controller
mergeConnectorOrRotorName
Name of the drop pod merge block, connector, and/or detachment rotor (optional)
shipName
Name of the drop pod. This name is displayed on the status screens if present.
statusScreenName
Name tag of drop pod status screens (optional)
landingTimerName
Name tag of timer to trigger on landing (optional)
maxSpeed
Max in-game speed. Script is configured for vanilla by default. (in meters per second)
descentSpeed
Speed the drop pod will attempt to descend at (in meters per second)
useDriftCompensation
Determines if the drop pod should attempt to compensate for lateral drift when landing.
requireAttachmentBlock
Whether or not the code should require an attachment block (connector, merge, or rotor) to function. This is set to off by default, but I like this function so I kept it for myself :P
attemptToLand
Determines if the code should attempt to make the drop pod land on the ground. If set to false, the drop pod will come to a complete stop above the ground and give the user back control of the vessel.
disableThrustOnLanding
If the braking thrusters will turn off after a successful landing. This is only considered if attemptToLand is TRUE.
shutdownTime
This is the time in seconds that the drop pod should be stationary in order for the code to shut down.
altitudeSafetyCushion
This is the distance (in meters) that the code will add on to the minimum computed braking altitude. You can use this to come to a full stop above the ground.

(Do not reupload without permission, not even to mod.io)
热门讨论 查看全部(1)
36
2022 年 4 月 23 日 上午 3:28
置顶: Bug Reports
Whiplash141
414 条留言
Myst Leissa 10 月 12 日 上午 7:04 
It could be, multiple small inset connectors were on either side of he drop pod, and the programmable block wasn't centered (this was a simple ore recovery pod, for retrieving ore from near mars orbit, using atmospheric thrusters...) Another problem I ran into is I'm not sure why but the thrusters didn't activate properly, once i got it working the pod just kinda sat there for a minute then dropped too fast (probably because I was using a speed mod, which raised the maximum speed on small grids (which this was) to 750., but I didn't have the exact float for the calculation.
Whiplash141  [作者] 10 月 12 日 上午 2:59 
That seems... dubious. The location that the command runs should not matter :confusedkarlach:

Reading through my code I am horrified at my sins. The script picks the merge connector and rotor with the name tag "Drop Pod" that is closest to the programmable block at the time of detaching. Could it be that the closest was being selected from a different drop pod?
Myst Leissa 10 月 10 日 下午 12:32 
Oh I see what my problem was...I had used a remote control but I was triggering the programmable block from the cockpit of the actual drop ship instead of the pod's remote...apparently rerouting the command through the remote was enough to fix it.
Myst Leissa 10 月 10 日 上午 8:08 
Also is the drop command supposed to auto-unlock the connector that's labelled with "Drop Pod"? Because it doesn't seem to for me but that may be because I'm using small inset connectors or because I've got two of them (one on each side of the pod)
Myst Leissa 10 月 10 日 上午 8:06 
Gotcha ty.
Whiplash141  [作者] 10 月 9 日 下午 6:27 
Yes. You are free to use this script in your creations and upload those creations. What I do not want is 10+ out-of-date mirrors of this script confusing users.
Myst Leissa 10 月 9 日 下午 3:06 
You say "Do Not Reupload" but what about including the script in our blueprints programmable blocks, is that permissible?
Whiplash141  [作者] 7 月 21 日 上午 11:08 
not yet, i need to rewrite it
Bunkerman 7 月 21 日 上午 11:04 
is Posible to use a Cockpit screen?
Whiplash141  [作者] 2024 年 11 月 29 日 下午 12:08 
The linked hunchback has 3 types of drop pods i designed for this script inside of it: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=883186115