Space Engineers

Space Engineers

评价数不足
Thrust Limiter (Retired)
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
412.941 KB
2021 年 4 月 24 日 上午 8:30
1 项改动说明 ( 查看 )

订阅以下载
Thrust Limiter (Retired)

描述
Thrust Limiter Script (Retired)

RETIRING THIS AS EXACTLY THE SAME THING CAN BE DONE THROUGH EVENT CONTROLLERS NOW.

This script will limit thrust when you reach max velocity so you use the minimum fuel to maintain that speed. This will save vast amounts of fuel and energy when travelling long distances.
It works both horizontally and going up/down.

E.g. Hydrogen Thruster ship to orbit on the Earth Like planet.

Description
Fuel Usage
Holding down up key to orbit
33%
With Thrust Limiter to orbit
3%

It will stop limiting thrust as soon as you stop providing input or are going at less that 99m/s. The job of the script is to stop you wasting fuel when you've hit the world speed limit but are still holding down the thrust keys. Not to slow you down in other circumstances.

Instructions

Simply build a programmable block, Edit it and copy this script into it using the Browse button. (If you can't figure out how to do this, see the Q&A section at the end).
The ship does need a control seat/cockpit of some kind even if unmanned. If the cockpit has a screen then it will display info on it.

Advanced Usage

You don't need to do any of these if you don't care, the script will just work out the box with no additional configuration.
The script also has autopilot modes for getting into space (by going straight up) and returning from space (by going straight down), both using minimal fuel.

Run with argument:

Argument
Description
Just runs the script in whatever mode it was last in, default is freeflight
off
Turns the entire system off and disables all thrust overrides
ascend
Start auto ascent, will turn off once out of gravity. Will trigger any timer block containing the tag "#TLA" when complete. e.g. named "Timer Block #TLA"
descend
Start auto descent, needs to be in gravity when triggered. Will trigger any timer block containing "#TLD" when complete. e.g. named "Timer Block #TLD"
Will cutoff at 2000m above ground by default - can be changed by setting descentShutoffHeight.
freeflight
Normal user controlled flight with thrust limiting. Only really needed if you set ascend or descend before and want to turn it off

You can disable the use of cockpit screens by setting useCockpitScreen to false.
Alternatively, you can use an LCD screen instead of a cockpit screen by tagging the screen with #TL
The world top speed is hard coded - you can change it if you have a modded top speed and want to be able to go that fast. See maxSpeed at the top of the script.

Questions

Q: I can't edit or run scripts in Programmable blocks?
A: You need to enable "Experimental Mode" in Options->Game and then enable "In-game scripts" in your world (under Advanced).
Q: Does it support subgrid thrusters?
A: No, it could, but it would make no sense as normally to use them you'd be running another script which is expecting to set the thrust override itself.
Q: Does it support the vanilla autopilot?
A: No, there is a bug in the API that prevents us reading what the autopilot is trying to do. Additionally scripts such as SAM's autopilot already throttles thrust just as efficiently as this script. Having said that, you could hook this script in as part of a vanilla autopilot setup using the ascend/descend functions.
Q: Does it work with wheels?
A: No, the clue is in the name!


7 条留言
Unruly 3 月 4 日 上午 10:59 
Some sort of bug prevent ascent from going straight up. Things start out ok, but eventually it goes way off vertical. Also, on some (admittedly not vanilla) worlds, TL declares itself outside gravity WAY before it P-Gravity is actually 0. It still works fine for thrust limiting, though. I haven't found another script that beats it in that respect. 4/3/2025
-Data- 2023 年 1 月 8 日 下午 4:40 
1: You need settings to choose which lcds to display stats on. Believe it or not, people use their main cockpit lcd for other things than your stats.
2: In freeflight, there should to be a way to change what speed the vehicle is limited to, and not just 100m/s all the time.
Unruly 2022 年 3 月 9 日 下午 12:43 
How about a 'cruise' mode, where backwards thrusters are disabled? I have multiple kinds of thrusters in different groups, so the on/off toggling leads to some unexpected combinations.
Unruly 2021 年 10 月 8 日 下午 3:27 
> No, there is a bug in the API that prevents us reading what the autopilot is trying to do.

And I just figured out why TL "wasn't working" on a number of my ships - I had taken to using the remote control all the time so that I only ever had one shortcut bar to maintain. I've melted two ships so far though, so I guess i'll go back to NOT using this trick.
Bystander  [作者] 2021 年 9 月 1 日 下午 12:17 
@BloodAngel099 it will use whatever thrusters are active and knows how much thrust they generate the whole time. Atmo thrusters will stop generating thrust as they approach the threshold so this script will push up the contribution from the H2/Ion thrusters automatically.
To answer the question though - it won't favour any type of thruster over another, it just looks at how much they are pushing.
BloodAngel099 2021 年 8 月 8 日 下午 7:23 
When using the Accend is it possible to have it prioritize use of electric thrusters over hydrogen?
Unruly 2021 年 4 月 30 日 上午 11:26 
So, I think you mean 'Thrust Limiter'? I only noticed because I subscribed and then searched locally for 'thrust' and couldn't find it. Either way, thanks for this script.