Space Engineers

Space Engineers

Not enough ratings
Custom Plane Controls (Beta)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
424.469 KB
6 Oct, 2021 @ 9:42am
18 Aug, 2022 @ 6:35am
12 Change Notes ( view )

Subscribe to download
Custom Plane Controls (Beta)

Description
This script can be used to control rotors which in turn will control custom control surfaces. This script is written with the help of a couple of cups of coffee. If you find bugs, kindly report them in the bugs discussion. Thanks!

Please note this is still in beta so bugs are still possible and a lot of testing is still needed.


To use:
1. Set all rotor limits
2. Add a seat to the plane. Script will search for a controlled seat.
3. You can specify the seats to use by adding the seats to the "Pilot Seats" group.
4. Add Roll related rotors to "Roll" group.
5. Add Pitch related rotors to "Pitch" group.
6. Add Yaw related rotors to "Yaw" group.
NOTE: You may add a single rotor to up to 3 groups (roll, pitch, yaw).
7. Add forward thrusters to "Forward Thrusters" group IF you want the script to manage them
- The script caps the thrust based on your plane's max speed and automatically sets it to 0 when max speed is reached.
8. If the rotor turns the wrong way, add the rotor to a corresponding invert group.
- "InvertRoll" to invert the rotor direction during roll.
- "InvertPitch" to invert the rotor direction during roll.
- "InvertYaw" to invert the rotor direction during roll.
9. Script supports Plane Parts airbrakes. Add the PP airbrakes to the "Airbrakes" group. Press SPACE to use.
10. Script support Custom Airbrakes! Add the rotor/hinge to the "Airbrakes" group. Press SPACE to use.
- If the airbrake opens the wrong way, add the rotor to the "InvertAirbrake" group.
- Setting useReverseForBrakes will use S instead of SPACE to use airbrakes.
11. Open the script if you want to fine tune the configs.
12. Recompile the script if you add or remove blocks/groups.

Fine tuning individual rotors:
Besides the global settings, the script allows for the fine tuning of each individual rotor.
To do this:
1. Add the rotors to customize to "Custom" group.
2. Recompile the script. The script will add customizable stats to the rotor's Custom Data.
3. Adjust each stat accordingly:
useCustomSettings=False <---- Set to true to use custom settings
controlSpeed=15 <---- Roll, Pitch, or Yaw speed
resetSpeed=15 <---- Reset speed
resetAngle=-3 <---- Reset angle or trim
resetAngleAtMaxVelocity=-3 <---- Reset angle or trim when plane's foward velocity reaches max velocity
maxVelocity=100 <---- Velocity where resetAngleAtMaxVelocity is used instead of resetAngle
4. Recompile the script again. This should apply the custom settings.

Commands:
You can now run some command/s:
reset_rotor_settings = script will reset settings to all rotors to default.
thrust_standby_on = script releases control of thruster output.
thrust_standby_off = script gains control of thruster output.
thrust_standby_onoff = toggles thrust output control.

Special Thanks:
Thanks to Klime for providing the API for naval airspeed, Randa for the proportional pitch/yaw controls, Lee for the awesome feature suggestions that should actually be there by default but I forgot somehow, and Consty for allowing me to use the great guide he made. Cheers guys!

Popular Discussions View All (1)
5
14 Feb, 2023 @ 3:40pm
Bug Reports
Khjin
5 Comments
anzellott 13 Oct, 2024 @ 4:00pm 
I've been trying to find a script like this for so long, thank you!
Overclock 10 Aug, 2023 @ 6:07am 
huh.... this doesnt seem to work for hinges?
Пустой Звук 26 Feb, 2023 @ 11:14pm 
No problem. With this script, you can create a much more harmonious-looking aircraft than using a mod for parts from an airplane. And I also just realized that the roll is assigned to Q/E because in the game itself, the roll works on the Q/E keys. The fish (that is, I) really thinks for a long time)
Khjin  [author] 26 Feb, 2023 @ 4:16pm 
Nice suggestion. I'll consider that one and include it when I release the fixes. I would tell you how to edit the script but roll and a/d controls are from separate sources, it'll be hard to explain what to do without being a wall of text. Thanks for trying out the script! :steamhappy:
Пустой Звук 26 Feb, 2023 @ 1:15pm 
A very good script, but could you reassign the Roll to A/D? Or explain how to do it yourself?