Space Engineers

Space Engineers

57 arvostelua
Delta Steering
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Tiedostokoko
Julkaistu
Päivitetty
14.644 KB
17.8.2019 klo 15.14
25.4.2020 klo 11.22
8 muutosilmoitusta ( näytä )

Tilaa ladataksesi
Delta Steering

Kuvaus
The idea
This script implements an alternative steering method commonly found in modern space games. The farther you move your mouse from the center of the screen, the faster your ship rotates.

It stores the state of that rotation, so you can even leave cockpit or use alt-mouse to look around without disrupting your maneuver.

It adds some immersion and helps doing smooth turns, especially useful on big ships that are usually steered by keyboard arrows.

I've included visual indication either to cockpits' screens or dedicated LCD, up to your preference.

Gyro override is toggled by spacebar double tap, no toolbar setup needed.

Added setting to make fonts larger (interfaceUpscale), 2 is recommended for large grid LCD. Remember to include floating point literal if you are using those values (e.g. "interfaceUpscale = 1.7f").

Dead zone can be set by "deadZone = 0.00f". This is a percentage starting from dead center, so at 0.05 the dead zone would be 5% of panels' "radius".

Usage
  1. Paste the code
  2. Make sure you have needed blocks. "forward-gyro" is the gyro in control. You should have only one, other gyros will assist it automatically at full power. That gyro should be oriented correctly, it matters (the keypad should face forward of your ship) Now this is not needed, the rotation is determined by players' cockpit, all gyros will have correct overrides.
  3. Make optional adjustments (all config variables are found at the top part of the code with comments)
  4. Hop into cockpit. You should be able to see interface at one of the screens (changed by "currentScreenIndex" var). For external screen, name it "LCD delta steering" or change the name in the code ("priorityLcdName") according to your preference. Gyro override is toggled by spacebar double tap.

Variables
  • priorityLcdName = "LCD delta steering"; // have this LCD to ignore cockpits' screens

  • currentScreenIndex = 0; // will output to that screen if there are no dedicated LCD (set it to SCRIPT content and None in predefined scripts). This is the index of internal cockpits' screens. You can change it to 1, 2, 3 etc to use different cockpit (or control seat) screen.

  • swapRollYaw = false; // airplane-style steering

  • deadZone = 0.10f; // dead zone, from 0 to 1

  • interfaceUpscaleLargeGrid = 2f; // scaling the LCD output stuff on large grids

  • interfaceUpscaleSmallGrid = 1f; // scaling the LCD output stuff on small grids

  • quadraticDebuff = true; // x^2 control torque in the {0, 1} range. Change to false to have 1 to 1 linear input.

  • centerOffsetY = 0; // vectical offset in meters. Use -0.5f if you want Transparent LCD indication be aligned with crosshair.

  • tieToSpecificController = "Flight Seat Forward"; // adviced for big builds with lots of remcons/seats serving different purposes. Set this to your main cockpit/remcon. If this fails then the script would listen to all ship controllers.

  • inputDecayMult = 1f; // to have the control vector return to central position automatically set this value close to but less than 1 (0.99f works well, the less the value the faster it goes)
44 kommenttia
Kittamaru 31.8. klo 13.37 
Yeah, tried that. I'll give it a shot in SP just to play with it :)
cheerkin  [tekijä] 30.8. klo 5.26 
Checked today, seems to be working. Make sure you recompile the script if you add more gyros, it needs to know all of them so no gyros without override are left when you switch.
Kittamaru 29.8. klo 19.26 
Just wanted to ask if this was still usable - tried it out and when I double tap space, the LCD screen updates as expected, but the ship still moves like normal mouse controls and doesn't continue to rotate?
jglenn1562 22.4.2022 klo 11.47 
All good, it doesn't matter all that much, because now that I think of it, it would be pointless to have the HUD available in the battle bridge since it's buried and only possible to navigate in 3rd person hahaha!
cheerkin  [tekijä] 22.4.2022 klo 7.18 
Currently, no. You can use internal screens of the cockpits in this manner, but if you use LCD then it's single. I can do something about it in the next version.
jglenn1562 21.4.2022 klo 21.19 
Is it possible to output the display to more than one LCD? I got two bridges (battle and standard nav bridge) that I want to see the PB's output in.
DeltaWing 9.1.2021 klo 20.55 
thank you!
cheerkin  [tekijä] 9.1.2021 klo 5.32 
Find this line in the code:
UserCtrlTest.Cumulative += r;
Add this line immediately after:
UserCtrlTest.Cumulative.X = 0;
DeltaWing 6.1.2021 klo 14.28 
is it possible to disable one of the axis? (I have a boat and only wish to have yaw)
cheerkin  [tekijä] 25.4.2020 klo 11.27 
Looks not terribly useful imo but I added that in todays' update. Have fun.