Space Engineers

Space Engineers

Solar Panel Alignment Script [BROKEN]
 This topic has been pinned, so it's probably important
mezzodrinker  [developer] 19 Nov, 2015 @ 6:58pm
How To: Using the Script with Solar Panel Mods
How To: Using the Script with Solar Panel Mods
If you ever noticed your next-gen solar panels which are capable of producing 200MW not getting aligned correctly, this is the correct place for you!

The general description of this script says that solar panel mods are compatible with it. That's right. But if you don't configure the script correctly (that is, replace the value of one! variable), your solar panels/collectors/whatever won't get aligned correctly.

That is because the script uses a variable named TargetPowerOutput to determine whether it should hibernate or not. By default, this is set to the maximum output for solar panels on large ships/stations minus one (119 kW).

What you need to do first is to calculate the average maximum output of the solar panel(s) that are being accessed by the script.

Example 1
The script should access two Vanilla solar panels which have a maximum output of 120kW each. The average maximum output here is - obviously - 120kW.

Example 2
Two wide solar concentrators from XPAR Elegant Solar are being accessed by the script, each has a maximum power output of 3MW (3000kW). The average maximum output is:
(3000kW * 2) / 2 = 3000kW

Example 3
The setup contains three basic solar concentrators (240kW), one wide solar concentrator (3MW = 3000kW) and five Vanilla solar panels (190kW), which are all being accessed by the script. The average maximum output is:
(240 * 3 + 3000 * 1 + 190 * 5) / 9 = 518.88888888 = approx. 519

Example 4
You have a solar tower with multiple wide solar concentrators (3MW each) as well as some Vanilla solar panels (120kW) and use one of the concentrators in the script to align the whole setup. The average maximum output is:
(3000kW * 1) / 1 = 3000kW

Then you simply set that value (or that value less 1) as the value for TargetPowerOutput. Find the line that looks like this
public const int TargetPowerOutput = 119;
and replace it with
public const int TargetPowerOutput = <average maximum output>;
(of course you replace <average maximum output> with the value that you calculated).

If you've done all of this, your script should align your modded solar panels perfectly (unless you're on a dedicated server, but that's not my fault *cough cough*).
Last edited by mezzodrinker; 2 Dec, 2015 @ 2:22am