Space Engineers

Space Engineers

评价数不足
(SFCS) Simplified Flight Controls Script v2
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
432.735 KB
2020 年 9 月 18 日 下午 5:35
2024 年 7 月 7 日 上午 5:38
15 项改动说明 ( 查看 )

订阅以下载
(SFCS) Simplified Flight Controls Script v2

描述


About the Script
This script aims to lessen the work load of the pilot by providing intuitive controls and a light degree of automation. In this latest update, pilot awareness is improved by providing support for WeaponCore, Water Mod, and Whip's Radar Script. Redundant or complicated features of the script were also removed to provide a more streamlined setup experience.

Features Overview
- Deploy airbrakes using SPACE or S key
- Auto Throttle and Cruise Mode
- Standard Indicators (Targeting, Altitude Warning, Missile Alert)
- Custom Indicators
**For more details, see Features Section**

Sample Build
F-16 Viper
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3247643183

Script Setup
1. In the ship, you should have at least 1 of the following:
- Seat (controller, not passenger types)
- A gyro
Optionally, you can have the following:
- Sound blocks with "SFCS" in the name
- Screen with "SFCS" in the name
- Subgrid forward thrusters with "SFCS" in the name
2. Add this script. That's it for the base setup. For settings and toggles, please see their sections.

Script Settings
General Settings
Name
Default
Details
Screen Tag
SFCS
Tag for LCD that the script will use.
User S for airbrakes
false
Set to True to deploy airbrakes using S. Useful for VTOLS.
Auto-throttle speed (m/s)
315
The script will maintain this speed except when cruising.
Auto-throttle activation time (s)
5
Number of secs W must be held to activate auto-throttle.
Auto-throttle minimum thrust percent (%)
15
The minimum thrust in % auto-throttle will use.
Cruise yaw multiplier
1
Affects how fast you turn with A and D keys when cruising.
Minimum cruise elevation
100
How close to the ground or Virtual sea level you must be before the script pitches up.
Auto-cruise trigger time (s)
10
Time (secs) since you got disconnected or ejected before auto-cruise kicks in.
Auto-cruise trigger altitude (m)
200
Minimum height (m) auto-cruise will trigger in case control is lost.
Auto-cruise trigger speed (m/s)
80
Minimum speed (m/s) auto-cruise will trigger in case control is lost.
Bingo fuel percent (%)
10
Percent fuel left before bingo fuel warning occurs.

Script and Mod Support Settings
Name
Default
Details
WeaponCore support
true
Enabled WeaponCore related features.
Radar I/F support (Whip's Radar)
true
Allow interface with Whip's Radar script.
Radar IGC tag (Whip's Radar)
IGC_IFF_MSG
Communication tag for Whip's Radar script.
Virtual Sea Level (m)
0
Set to have a custom Sea Level elevation. You can run "toggle_se" to show/hide the current sea level elevation of the ship.

Sound Settings
Name
Default
Details
Sound - Air Target
<sound name>
Sound to play for air contacts (grids that travel more than 60m/s). Requires WeaponCore.
Sound - Ground Target
<sound name>
Sound to play for ground contacts (grids that travel less than 60m/s). Requires WeaponCore.
Sound - Low Altitude
<sound name>
Sound to play when altitude is getting low.
Sound - Critical Altitude
<sound name>
Sound to play when altitude is dangerously low.
Sound - Caution
<sound name>
Sound to play on Low Fly mode and approaching the ground for more than 10 m/s.
Sound - Countermeasures
<sound name>
Sound to play when missile is dangerously near. Requires Weaponcore.
Sound - Missile Launch
<sound name>
Sound to play when missile is launched at your ship. Requires Weaponcore.
Sound - Bingo Fuel
<sound name>
Sound to play when bingo fuel is reached.

The default sounds of this script is from Consty's awesome mod [CAP] Consty's Aircraft Pack (Now with wings!):
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2758773086

Display
Values are using RGB (red, green, blue) and an opacity value Alpha. For example, a full green color would be 0,255,0,255.

Feature Details

Airbrakes
When using modded airbrakes such as ones from Consty's and Randa's aircraft packs, you can press Space or S (when configured) to apply airbrakes. For modders, as long as the type is IAdvancedDoor and has "brake" in its subtypeid, this script will detect those blocks.

Auto throttle
After holding W for "Auto-throttle activation time (s)" seconds, the script will hold throttle until "Auto-throttle speed (m/s)" is met when not in cruise mode, or the current speed when in cruise mode. Pressing Space or S will cancel auto-throttle.

Cruise
Cruise mode can be changed by running the commands "toggle_cruise", "cruise_on", and "cruise_off". During cruise mode, a standard status will be highlighted in the LCD and the script will maintain the altitude and keep the ship level. For turning, A and D keys must be used. Rolling or moving the mouse will cancel cruise mode.

Auto-Cruise
In MP, when you get disconnected, there is a big chance that your plane will be lost. Auto-cruise aims to reduce the probability of this happening by automatically entering the ship into cruise mode when "Auto-cruise trigger time (s)", "Auto-cruise trigger altitude (m)", and "Auto-cruise trigger speed (m/s)" are met. Rolling or moving the mouse will cancel auto-cruise mode.

Low Fly Mode
Low fly mode can be used when landing. It can be changed by running the commands "toggle_low_flight", "low_flight_on", and "low_flight_off". When in Low Fly Mode, low and critical altitude warning will not occur but a caution warning is played when below 100 meters and falling faster than 10m/s.

Standard Indicators
The script has built-in indicators (with display and/or sounds) for the following:
- Low and critical altitude
- Missile launch and missile critical (WeaponCore)
- Auto-throttle, Cruise Mode, and Low Fly display

Custom Indicators (aka Toggles)

The way toggles are created mostly stayed the same. To add a custom status, you must add the blocks to a group and name the group with the following format:

SFCS_<TYPE>_<TAG>:<CONDITION>

Example:

SFCS_VEL_L GEAR:-12
SFCS_FUNC_LIGHTS:True
SFCS_WRK_R ENG:False

TYPE can be any of the following:
VEL - On if one of the blocks in the group has velocity equal to condition (number).
FUNC - On if one of the blocks in the group has functional status is equal to condition (True/False).
WRK - On if one of the blocks in the group has working (ON and functional) status is equal to condition (True/False).


I would like to thank those who gave feedback on the script especially Alex for giving some really nice feature requests, Whiplash141 for sharing the scripts I used as reference and on some of the utility functions in the code, Consty and Randa for the awesome plane mods and Dark for letting me experiment as much as I want on mods in Dygamic :D.

---
Support
Do you like what I do and wanna support me? Send some coffee! I appreciate it! :)
https://buymeacoffee.com/gamerkhjin2
16 条留言
Khjin  [作者] 5 月 19 日 上午 2:29 
That script talks to Whip's Radar and shares target information, same as SFCS.
Vaygrim 5 月 18 日 下午 3:44 
I am seeking a visual radar style system. (Which just may not be possible with WeaponCore in place.)
Khjin  [作者] 5 月 16 日 上午 9:32 
If you just need the radar interface part, don't use this script. Try this instead:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2973216901
Vaygrim 5 月 16 日 上午 7:45 
Is there any way to disable the part of this script that interacts with gyroscopes? I'm using SFCS strictly for the part that makes Whip's RADAR work with WeaponCore. SFCS makes that function, buuut it interferes with any and all Gravity Aligner scripts.

Help?
Leconite 4 月 27 日 上午 4:30 
Thanks for looking into it.
Here are a couple of ideas to consider, as SFCS already interoperates with some of the WMI scripts.
1. Support the cockpit direction Reference tag from WMI Radar / AutoHorizons, so that the thrusters SFCS select are consistent regardless of the orientation of the cockpit one is in.
2. Support the Horizon sound block from WMI AutoHorizons as an alternative to the low altitude warning. If the Horizon sound block is set up and no SFCS sound blocks are set up, SFCS could just tell the Horizon sound block to play / stop.
Khjin  [作者] 4 月 26 日 下午 10:11 
Hello! Thanks for reporting these. I haven't done much testing with displays other than Consty's aircraft HUD so I'll see what I can do. Will also check about the tanks.
Leconite 4 月 26 日 上午 8:25 
Also noticed SFCS seems to be counting the onboard O2 tanks as fuel tanks.
Leconite 4 月 26 日 上午 8:11 
Was trying to replace the O.I.S. Flight Computer Script with SFCS.
Ran into these issues with SFCS on various display surfaces.

LG Corner LCD.
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3470889065
LG PB Top LCD.
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3470889577
Khjin  [作者] 3 月 18 日 上午 5:56 
It is possible but this is a flight control script and I don't want to add any offensive combat capability to it. That would be cool on a separate script though.
Based_Stickman 3 月 16 日 下午 5:33 
Just wondering since you know how to deal with weaponcore targeting dataand Whips Radar is it possible to use this to work as a compatibility layer to make lamp/wham turret targeting work with weaponcore