Space Engineers

Space Engineers

Whip's Artificial Horizon Redux
 This topic has been pinned, so it's probably important
Whiplash141  [developer] 23 Apr, 2019 @ 6:00am
Bug Reports
Please leave all your bug reports here so I can easily respond to them.

Always provide the code version number and a detailed description of the issue.

You can optionally attach a world or blueprint along with your report to help me diagnose the issue faster.

Thanks!
< >
Showing 1-11 of 11 comments
Micael Jarniac 29 Jul, 2019 @ 6:49pm 
V1.5.0

When using a cockpit with multiple displays to display the artificial horizon, this script automatically adds lines to the cockpit's 'custom data' so the user can configure which screens it should use.

The problem is, for cockpits with multiple screens, when trying to use another script on a separate screen, this script deletes the configuration that the other script added to the 'custom data', and thus renders the other script useless.

Practical example:
- Load this script into a PB (will be referenced as 'primary');
- Load another script (used Isy's Ship Refueler in my testing, the 'secondary') in another PB;
- Add the tag for the primary script to a cockpit's name (default 'Horizon');
- This script will populate the 'custom data' of said cockpit with its config;
- Add the tag for the other script to the same cockpit name (for the script mentioned, it's '!ISR-main');
- The secondary script finds the cockpit, renames it again (to remove the temporary tag and add the permanent one, the standard behavior of said script) and adds its configuration to the 'custom data' of that cockpit, just under the configuration of the primary script;
- Then, this secondary script works for a few moments, and stops working because the configuration it added to the 'custom data' was overwritten by the primary script;

I believe this behavior can be tweaked so this script becomes more 'friendly' with others.
The way it is now seems to make all the other screens on my cockpit useless while I have this script running.
Micael Jarniac 29 Jul, 2019 @ 6:55pm 
Originally posted by Micael Jarniac:
V1.5.0

When using a cockpit with multiple displays to display the artificial horizon, this script automatically adds lines to the cockpit's 'custom data' so the user can configure which screens it should use.

The problem is, for cockpits with multiple screens, when trying to use another script on a separate screen, this script deletes the configuration that the other script added to the 'custom data', and thus renders the other script useless.

Practical example:
- Load this script into a PB (will be referenced as 'primary');
- Load another script (used Isy's Ship Refueler in my testing, the 'secondary') in another PB;
- Add the tag for the primary script to a cockpit's name (default 'Horizon');
- This script will populate the 'custom data' of said cockpit with its config;
- Add the tag for the other script to the same cockpit name (for the script mentioned, it's '!ISR-main');
- The secondary script finds the cockpit, renames it again (to remove the temporary tag and add the permanent one, the standard behavior of said script) and adds its configuration to the 'custom data' of that cockpit, just under the configuration of the primary script;
- Then, this secondary script works for a few moments, and stops working because the configuration it added to the 'custom data' was overwritten by the primary script;

I believe this behavior can be tweaked so this script becomes more 'friendly' with others.
The way it is now seems to make all the other screens on my cockpit useless while I have this script running.

After doing some more testings, it seems it was just an odd coincidence that happened to me, because the default behavior of the primary script does try to keep the rest of the 'custom data' untouched.

In other words, my issue has been fixed and shouldn't actually have happened in the first place.
KentiTiger 5 Oct, 2019 @ 3:05pm 
v1.5.0

I found two issues which seem to be related to the script.

1) When using the Keen Industrial Cockpit (large grid; from the Decorative Pack DLC), the default will use the "Large Display" (top left corner display) for the AH.

If you enter into the Control Panel of the Industrial Cockpit, and select the "Large Display", the default script will be "None" (even though it is the AH script). A single-left-click on "Artificial Horizon" in the script section will revert instantly back to "None"; a double-left-click will cause SE to CTD.

2) When using the vanilla Cockpit (large grid), the default will use the "Top Center Screen" (bottom big central display) for the AH.

If you enter into the Control Panel of the Cockpit, and select the "Top Center Screen", the default script will be "None" (even though it is the AH script). A single-left-click on "Artificial Horizon" in the script section will revert instantly back to "None"; a double-left-click will cause SE to CTD.


If either of the above process is tried with the AH script removed or the programming block turned off, then "Artificial Horizon" in the script section can be selected with no (known) issue.

Configuring using the "Custom Data" works with no apparent issues.

I have found the CTD to be consistent in both the above cases. I have not tried the small-grid cockpits in either case. I also have not tested to see if this is an inherent conflict with any other mods or is consistent in a pure vanilla world; the mods I was using during testing (in the above two cases) was the same for #1 and #2.
Last edited by KentiTiger; 5 Oct, 2019 @ 3:06pm
Whiplash141  [developer] 5 Oct, 2019 @ 4:33pm 
Originally posted by KentiTiger:
If you enter into the Control Panel of the Industrial Cockpit, and select the "Large Display", the default script will be "None" (even though it is the AH script). A single-left-click on "Artificial Horizon" in the script section will revert instantly back to "None"; a double-left-click will cause SE to CTD.
That is a game bug and should be sent to their support site as I believe it happens with other LCD scripts.

Also, if you are using this script on a particular screen, do not change that screen to use the built in Artificial Horizon script. It needs to be set on "None" for in game scripts to work.

Edit: Just confirmed. I can replicate this with a 10 line script. It is certainly a game bug.
Last edited by Whiplash141; 5 Oct, 2019 @ 5:02pm
Peekofwar 3 Feb, 2020 @ 10:34am 
How does your script detect an obstacle? Because I've been getting so many false-positives. I'll be flying about a kilometer or so above the surface, and when I hear the sound block fire off, there's literally nothing in front of my aircraft. I'm flying forwards, and there is sky ahead. No terrain.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1987798544
She ship I'm flying in the screenshot is a VTOL space plane mainly flown in atmosphere by utilizing an aerodynamics mod. The screenshot was taken within a few seconds of hearing a false-positive.
Last edited by Peekofwar; 3 Feb, 2020 @ 10:35am
Whiplash141  [developer] 3 Feb, 2020 @ 4:25pm 
Originally posted by Peekofwar:
How does your script detect an obstacle? Because I've been getting so many false-positives. I'll be flying about a kilometer or so above the surface, and when I hear the sound block fire off, there's literally nothing in front of my aircraft. I'm flying forwards, and there is sky ahead. No terrain.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1987798544
She ship I'm flying in the screenshot is a VTOL space plane mainly flown in atmosphere by utilizing an aerodynamics mod. The screenshot was taken within a few seconds of hearing a false-positive.
It looks at the rate of change of your altitude and extrapolates several seconds in the future. This can result in false positives when you cross over say a pothole or steep incline. You can tweak that threshold in the custom data.

Siam 9 Nov, 2020 @ 10:20am 
Hello Whip, as I said in the general discussion my game crash a few seconds after the script is visible on the LCD.

The only mod interacting with the script is the seat I use on my ship but the screens is just a regular LCD screen on the wall

const string VERSION = "1.7.0"
Is it this version you are talking about?
Last edited by Siam; 9 Nov, 2020 @ 10:33am
Whiplash141  [developer] 9 Nov, 2020 @ 11:43am 
Originally posted by Way Siam:
Hello Whip, as I said in the general discussion my game crash a few seconds after the script is visible on the LCD.

The only mod interacting with the script is the seat I use on my ship but the screens is just a regular LCD screen on the wall

const string VERSION = "1.7.0"
Is it this version you are talking about?
Load up a world with absolutely no mods and try again. I'm relatively certain it isn't this script crashing your game.
hskensu 28 Feb, 2021 @ 9:35am 
Originally posted by Way Siam:
Hello Whip, as I said in the general discussion my game crash a few seconds after the script is visible on the LCD.

The only mod interacting with the script is the seat I use on my ship but the screens is just a regular LCD screen on the wall

const string VERSION = "1.7.0"
Is it this version you are talking about?

Not sure if this it the reason for you but seems like 'transparent lcd textures' crashes my game if Whiplash's radar or artificial horizon script(SIMPL is fine) is shown on a lcd or screen
I have tested in a new save with only 'transparent lcd textures' and a old save that has a lot of mods but only 'transparent lcd textures' removed

Edit: Checked the mod page and it seems like someone found a fix
Last edited by hskensu; 28 Feb, 2021 @ 9:37am
posthy 17 Oct, 2024 @ 3:36pm 
I think the 205 update changed something, i'm getting error when trying to compile this script. Image[ibb.co]
Whiplash141  [developer] 17 Oct, 2024 @ 4:47pm 
Originally posted by posthy:
I think the 205 update changed something, i'm getting error when trying to compile this script. Image[ibb.co]
Update.

Whenever there is a bug, check the Change Notes to see if I
ve already fixed it. I'm generally pretty quick about breakages because I personally use all my scripts.
< >
Showing 1-11 of 11 comments
Per page: 1530 50