Space Engineers

Space Engineers

217 ratings
Thruster physics & Differential throttling
4
2
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script
File Size
Posted
Updated
373.384 KB
Apr 6, 2016 @ 7:16am
May 6, 2023 @ 8:02am
143 Change Notes ( view )

Subscribe to download
Thruster physics & Differential throttling

Description
This proof-of-concept (read: sloppily written) mod adds thruster torque, engine steering and automatic differential throttling to Space Engineers in a "no-nonsense, no-fakery, no-cheating" way.

Notes -- READ THESE FIRST
  • This mod has undergone only a minimal amount of testing on a LAN-based server. There is zero guarantee that it will function correctly in a real multiplayer session. And as of v1.130, ship movement is fidgety even on LAN,
  • Due to its intrusive and over-controlling nature as well as heavy reliance on thrust override, this mod is not compatible with stock autopilot*,
  • Do not use this mod alongside with Digi's Realistic Thrusters; otherwise you'll end up applying the same thruster torque twice,
  • On docked and landed ships, both inertia dampers and Rotational Damping should be switched off. Failure to do so may result in loss of control upon undocking or ship "flipping" slowly when there are no players nearby,
  • Hover engines (i.e. those meant to counter gravity) should have either Steering or Thrust Trimming disabled. Leaving them both ON may lead to complete loss of control on ships without thrusters on top when pitching down, raising up or flying with a very steep bank angle.
* ships under RC autopilot control do not experience torque.

Thruster modes
Steering switch selects whether this thruster is allowed to turn the ship. It will also actively try to stop rotation induced by asymmetric thrust as long as Rotational Damping in cockpit panel is enabled.

If Thrust Trimming is ON, then during turns the system will trim excess thrust as necessary to prevent uncommanded acceleration, usually resulting in reduced turn rate, whereas disabling it allows the ship to turn faster at cost of possibly drifting off. This switch is only relevant if Steering mode is enabled.

Checking Disable Linear Input will designate this thruster as a dedicated steering motor, preventing both inertia dampers and WSAD keys from firing it.

Thrust Limiter pre-calculates balanced thrust level to prevent the ship from spinning and swaying in the first place*, thus providing superior stability at cost of greater thrust loss. Toggling it OFF allows the ship to utilise rotational thrusters on other sides to offset imbalance and thus accelerate faster but often leads to worse handling and stability. Thrust Limiter is only available when Disable Linear Input is not checked and either Steering is disabled or Thrust Trimming is enabled.

* depending on chosen method (see Other cockpit modes below), calibration may or may not take changes in atmospheric influence into account. It is also possible for calibration to fail; the engine will assume Steering ON with Thrust Trimming OFF in this case.

In addition to the above switches, there is also Manual Throttle slider, which is useful for manual thrust overrides and autopilot scripts. Keep in mind that unlike vanilla "Thrust override", this will not set the desired output unconditionally; the system will still reduce thrust if it will cause the ship to spin. In order to rotate the vessel via script, gyroscope override sliders should be used, and the appropriate rotational thrusters will be fired accordingly.

System modes
Thruster steering can operate in 2 modes, selectable by Active Control Reference switch in a cockpit or RC block:
  • centre of mass (CoM) mode, which obviously uses ship's CoM as a reference point,
  • centre of thrust (CoT) mode -- uses 3 separate CoTs, one for each pair of opposite sides of the ship.
Both modes have their advantages and drawbacks.
CoM mode:
+ Fires thrusters in the most energy-efficient way,
+ Maintains a good balance between acceleration and turning when doing both simultaneously,
- Poor turn rate on unbalanced ships,
- Cannot handle vessels with thrusters only on one side of CoM at all.

CoT mode:
+ Superior turn rate,
+ In many cases, better acceleration and better stability on unbalanced ships (assuming that Thrust Limiter is disabled for all thrusters),
+ Can handle thruster arrangements that CoM-based mode cannot,
- Generally higher energy/hydrogen usage,
- Strongly favours rotation over acceleration, sometimes negating the latter entirely,
- In theory it's possible for CoT mode to send the ship into unrecoverable spin. Thus, and due to above reason, using CoT mode in gravity is not recommended.

Other cockpit modes
If Rotational Damping is not checked, then thrusters will no longer try and stop rotation of the ship. It's mostly useful for vessels which use hydrogen thrusters for RCS as it saves fuel. This switch affects thrusters only; gyroscopes need to be toggled separately.

Thrust Calibration Method selects wheteher to adjust the limit of each thruster individually (<Ind.>) or group thrusters into quadrants and then calibrate output of the whole quadrant at once (<Quad>). The former yields best possible performance but is computationally expensive and cannot include variations in atmospheric influence because of that. The latter, while generally suboptimal, is sufficiently fast to be done in real time and thus is able to account for changing air density.

Touchdown Mode is a special low-speed flight mode intended for soft hands-off landing on an uneven terrain. While in this mode, the ship will descend at 0.5 m/s. Upon settling, engines will disengage automatically.

Inertia Damper Overrides allow a player to selectively disable inertia dampers on a particular axis while keeping velocity cancellation on other axes operational.

Chat commands
The mod accepts the following case-insensitive commands:
  • /TPDT-TL: toggles thrust loss indication,
  • /TPDT-TL xx: sets minimum displayed thrust loss percentage, e. g. after entering
    /TPDT-TL 40 thrust loss will be displayed only if it is 40 % or more,
  • /TPDT-VS: toggles vertical speed readout.
All of these settings are saved locally and are shared across all worlds.

Programmable Block interface
Click here to see properties and actions this mod exposes to Programmable Block.

Acknowledgements
Special thanks to:
1wsx10, 5URG3, Acarii, Agnar, Berun, Blitz4532, bos187, bruin_o9er, busboy999, convict1103,
Creeping Wolf, DaMasta, Dan2D3D, deadok, DoktorDoraro, DreamAssembly!, Dwarf-Lord Pangolin,
Dynamite Knight, EtanchMouMout, EvanBaxter, Falnore [DSN], grimsage, Gusset_Tugger,
Idartacus [Farstar Gamer], IIN8II, izzik, KC Pilot, Lord Commissar, M3rchantOfD3ath, morty,
[MPW] ColTeH, Orcbow, Pyromaniac, Rabenschild, Rayne, Rayzon, Shirako1988, Space_Engineers7, Sparty, [ST-R] Solutech [ST], Tartaross Inc., trents2cool, Tristavius, TronicE, TumbleTV, Tyriosh, blu | w4stedspace and many others for providing an invaluable testing material.

Licence
This mod is distributed under terms and conditions of CC0[creativecommons.org] licence.
Popular Discussions View All (6)
26
Apr 26, 2016 @ 1:09am
Changes and improvements
Engi
4
Oct 31, 2018 @ 12:03pm
Add Gyro support Pls
KubiRemPL
4
Apr 12, 2016 @ 12:58pm
THR and STAT
Engi
115 Comments
Astro-Creeper Mar 11 @ 9:19am 
The kind of coding done here is bleeding edge of what any game can do. Ferram in KSP comes to mind. KSP doesn't scratch the itch like this does. I'm, at this point, battling nvidia driver crashes and SE is slowly dying. But I still love it. The flips and burns being so perfect with this mod and having to completely redesign ships just to be able to navigate gravity wells changes this game for the better x1000. Can't praise your skills enough!
Knsgf  [author] Mar 9 @ 11:21pm 
No, only ships under vanilla autopilot are excluded.
Astro-Creeper Mar 9 @ 7:23pm 
Did you happen to add an ignore grid feature to stop MES from using this? If so it would be nice to use alongside instead of abandoning this. It is absolutely the best mod for this kind of thing and is a huge amazing addition. I wish I could shovel money at you and Keen to get this as vanilla, or at least optional.
Knsgf  [author] Mar 8 @ 6:23am 
I don't see why it shouldn't. Thrust and aerodynamics don't depend on each other.
ostlandr Mar 8 @ 5:48am 
Does this mod work with the Aerodynamic Physics mod?
Astro-Creeper Sep 12, 2023 @ 8:28pm 
I can second that, The reavers are spinning out of control. It's wildly entertaining and they are impossible to aim at. Love the mod, great work.
geraveoyomama Jul 12, 2023 @ 11:12am 
Possible to ignore grids controlled by MES? Just like vanilla RC and AI blocks?
OwaniiChobanii Jul 6, 2023 @ 4:43am 
im just gonna press buttons and see what happens honestly
Priv[H]ate (͡ ͡° ͜ʖ ͡°) Jun 1, 2023 @ 8:52am 
enabling thrust limiter on linear dampeners greatly helps the ship staying stable e stopping from moving. also double tapping Z (off-on) seems to help stop the drift
Knsgf  [author] May 31, 2023 @ 8:56am 
This was never meant for multiplayer due to sim-speed hit issues.