Space Engineers

Space Engineers

906 ratings
Whip's Artificial Horizon Redux
2
2
4
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
497.735 KB
23 Apr, 2019 @ 5:48am
15 Feb @ 10:39am
17 Change Notes ( view )

Subscribe to download
Whip's Artificial Horizon Redux

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description
Whip's Artificial Horizon Redux


Updated the space orientation indicator to draw 3D arrow heads for better visual clarity



Howdy!

This is my rendition of an artificial horizon for use on the ship cockpit screens and regular LCDs and text panels; I wasn't satisfied with Keen's so I made my own. This script utilizes the new sprite based drawing API to allow the visuals to be much more crisp than my old pixel-based variant.

In atmosphere, the script will display a colored artificial horizon with graphical indicators for velocity, pitch, and roll as well as text displays of altitude, speed, and heading.


When you leave a planet's atmosphere, the horizon disappears and the screen functions as a graphical velocity indicator where speed and acceleration are displayed on screen. Also, the world XYZ axes are drawn to help you orient yourself in space.



  • Works with new cockpit LCDs
  • Prograde and retrograde velocity indicators that never go off screen
  • Fully configurable colors
  • Uses Custom Data for customization (No more need to modify the code!)
  • Uses new sprite drawing API to generate crisp visuals
  • PULL UP warning displays when the script detects that a collision with the ground is imminent
  • Works as a graphical velocity indicator in space
  • World XYZ axes are shown when in space to help you orient yourself


Required Steps
  1. Place this script on your ship
  2. Place one or more ship controllers on your ship (Cockpits, Flight Seats, or Remote Controls)
  3. Add Horizon to the name of text panels or blocks with text surfaces that you want the artificial horizon displayed.
    • Blocks with text surfaces include: Cockpits, flight seats, programmable blocks, and console blocks
    • Configure which text surface the horizon is displayed on within the block's custom data (You don't need to do this for text panels). The default config will be populated automatically.

  4. Enjoy!

Optional steps
  • Place the word Reference in the name of the ship controller that you want use to orient the the artificial horizon.
    • If you do not specify, the code will automatically detect and use the seat you are controlling the ship from.
  • Place the word Horizon in the name of any sound blocks you want to use for ground collision warnings.
    • Make sure to select a sound to play on the sound block. You can configure the loop interval in the custom data of the programmable block.

How to read the XYZ axes



You can change how the artificial horizon looks and behaves within the Custom Data of the programmable block this script is running from. Simply open the custom data, modify it, and click "Ok". The code will update to reflect these changes within 10 seconds at most.



Can I customize the colors?
Yes, in the custom data of this programmable block.

Does this work with the new cockpit LCDs?
Yes.

Can I have an Artificial Horizon and a Radar on different cockpit screens?
Yes, as long as they are configured to write to different cockpit screens, my scripts will not conflict.

Will this work with Configurable Auto LCDs 2?
Yes. Simply append the CAL2 configuration to the END of the Custom Data like so:
Artificial horizon configuration --- Auto LCD configuration
The three hyphens (---) need to go after everything else in the Custom Data, but before the Auto LCD configuration.

Do you have an Elite Dangerous color scheme that matches the Radar script?
Yes! Check out the presets below in the Color Schemes discussion!


Be sure to report any bugs below in the Bug Reports discussion. Hope y'all enjoy :)

(Do not reupload without permission, not even to mod.io)
Popular Discussions View All (3)
9
28 Feb, 2021 @ 9:35am
PINNED: Bug Reports
Whiplash141
7
5 May, 2021 @ 8:20pm
PINNED: Color Schemes
Whiplash141
0
27 Apr @ 3:57am
Feature Idea: In space "reference horizon" within "docking range".
Leconite
210 Comments
Whiplash141  [author] 4 May @ 5:28pm 
This is not a mod, it is an in-game script. You do not (and should not) need to add it to your server to use it. You only need to enable in-game scripts in the world options.
NiceGuy 4 May @ 8:33am 
Tried to add it to my Nitrado server but it cause an error and the server can not load the mod.
Whiplash141  [author] 2 May @ 3:36pm 
@IAmPaRedux_ed (AFO):
See step 3. Anything with text screens can have this on it.
VivaVii 2 May @ 3:16pm 
WHIP you always know how to knock it out of the park.

These 3d arrow heads make me think thered be a good way to implement a locked target's orientation and velocity being displayed on a screen.
Rikuhachima Aru 26 Mar @ 3:58am 
Hey! Awesome script btw! Is there any way for me to use this on custom ship control consoles? This script would be very helpful if it would be possible to allow it to be used by mod control consoles especially for larger ships as the command room would usually be inside the ship.
Sapioit 15 Feb @ 11:39am 
Or at least having lines every 45 degrees, which to get darker towards West and lighter towards East, to transmit the same message.
Sapioit 15 Feb @ 11:38am 
While true, having a 3-axis display for while in gravity would allow one to see how the vehicle is moving without having to read numbers. Because on small displays, like the one in the Industrial Cockpit, those numbers are difficult to read. Though one way to fix that in the current in-gravity display would be to change the color every 45 degrees, to be a different shade, lighter towards the East and darker towards the West (rising sun and setting sun in real life, even if not in-game). Or other colors instead of other shades. Or both. Your call, after all.
Whiplash141  [author] 15 Feb @ 11:19am 
Possible, but I'm not keen on adding that as the gravity and north vector is redundant information since that is already conveyed by the bearing and the horizon elevation ladder.
Sapioit 15 Feb @ 11:14am 
I know there is a mod which adds a compass on planets. Would it be possible to make it align an axis to point against the gravity and another axis to point towards one of the poles, for the following setting, please?
Show XYZ axes in gravity=True
Whiplash141  [author] 15 Feb @ 10:42am 
@maiku41: added in v1.12.7