Space Engineers

Space Engineers

107 ratings
Solar Panel Alignment Script [BROKEN]
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
5.346 KB
Mar 7, 2015 @ 3:06pm
Jan 9, 2016 @ 6:44am
9 Change Notes ( view )

Subscribe to download
Solar Panel Alignment Script [BROKEN]

In 1 collection by mezzodrinker
mezzo's Space Engineers mods collection
56 items
Description
Current revision: Solar Panel Alignment Script rev8

IMPORTANT This script was broken by a change in the Ingame Programming API. Once I find the time, I'll work on an update that fixes several compile and runtime problems. Until I find the time, knowledge and inspiration to do this, please feel free to use Isy's alignment script.

IMPORTANT This script (and similar ones) seem to be incompatible with dedicated servers! This is apparently an issue on Keen's side, so there's nothing I can do about it.

This is a basic in-game script I have created for aligning solar panels for maximum output power. Ratings and (constructive) comments are welcome!

Check out my other files: http://steamcommunity.com/id/mezzodrinker/myworkshopfiles/?appid=244850

Requirements
This is a vanilla in-game script, so no mods are required at all. You need some blocks, though:

- 1 Programmable Block
- 1 Timer
- at least 1 Rotor/Advanced Rotor
- at least 1 Solar Panel that can be aligned with the Rotor/Advanced Rotor

Mod compatibility
I can not guarantee that this script works with all custom Solar Panels that have been added by other mods but if they use the same information syntax as the vanilla ones, they should work. Below you can see a list of tested and compatible Solar Panel mods.

If you find any other compatible solar panel mods, please let me know by posting a comment! A link to the mod would be greatly appreciated.

Compatible solar panel mods
- Solarpanels by Eikester
- Large Solar Panel (+25%) by WingTsunLee

Localization options
Please read this post.

How to use
Please read this GitHub wiki page[github.com].

Issues
If you experience any issues with this script, please report them to the GitHub issue tracker[github.com]. This requires a free account which can be registered at GitHub. If you do not own an account there and don't want to create one, you can also use the respective discussion. Issues which were reported there will be added to the issue tracker on GitHub manually.

Comments on the item's overview page which contain complaints about issues are discouraged for better lucidity but will be answered anyway.

Frequently Asked Questions (FAQ)
Please read this post.

License
This Space Engineers in-game script is licensed under a BSD 3-clause License whose terms can be reviewed here[github.com]. By using and/or subscribing to the script, you agree with the terms of that license, so make sure to read it. It's not that long or complex anyway.

Special thanks
sigurdh and his script Stop Rotor on High Solar Power Output which inspired me to write my own solar panel alignment script

gandur and his script Battery Manager which made me notice that "Max Output" does not stay the same in different languages
Popular Discussions View All (15)
57
Aug 11, 2016 @ 1:07pm
PINNED: Issues
mezzodrinker
24
Jun 14, 2016 @ 7:01pm
PINNED: How To: Setting up the Script (one rotor per axis)
mezzodrinker
21
Feb 5, 2016 @ 10:41am
T rotor setup?
iamdrew
358 Comments
mezzodrinker  [author] Oct 9, 2017 @ 11:34am 
@Nicoleise Now that I am once again on my Windows installation, first of all, thanks for your effort of finding a way to run my script! It would be even greater if you could open an issue [github.com] with your improvements or create a pull request [github.com] on the GitHub site. That way, I'd have the code at hand and update the script accordingly :)

However, please do note that I am not trying to force you into doing that. Also, if you do decide to contribute to the code, please be aware that all code you contribute will be published under the project's license, which is currently a BSD 3-clause [github.com].
Nicoleise Sep 25, 2017 @ 5:39am 
There's a pretty agressive character limit on comments, so I'll elaborate in a second comment, that the portion of the script that we can comment out has the following purpose (in my understanding):

If you enter an incorrect component name, usually compilers will give you real useful stuff like "An instance is not set" or "Something went wrong". To increase user friendliness, the author of this script has made sure his script searches through the available groups. If the correct is found, all is well. If not, it outputs a more useful message like "The script cannot find your group name."

Points for useablity, but when the game then goes and breaks it, I feel the better option for the time being, is to simply comment out those lines of code, so that the script actually works - because it does a good job, once it's allowed to. :)
Nicoleise Sep 25, 2017 @ 5:36am 
We downloaded this yesterday and implemented it on our planet base. Here's the fix:

The problem is with the way the script searches for groups of components. But we don't actually need that functionality. So set the property that the solar panels is a group to false, and point to the rotors individually rather than as a group name (like "Rotor 1","Rotor 2").

Then click Check Script and it'll give you four lines with errors. In those lines, the script searches for groups with the name you entered, to give you useful information about why the script fails. Simply comment out these two entire blocks of code (every line) including the full {} containers they are in, and presto - script runs and works.

The only functional loss of not using a group for solar panels, is that the power output will be listed for one panel. To mend this, just multiply your variable by the number of panels.
mezzodrinker  [author] May 31, 2017 @ 9:51am 
@YrriNoTherapy It's a combination of Keen's updates and my perfectionism. They work hand in hand to bring me maximum enjoyment while writing scripts.
The_Yrri May 28, 2017 @ 9:53am 
@mezzodrinker - is that something with new Keen updates that keep breaking it apart? No rush or attempts to push here, just a dedicated fan wants to know the future of the project.
mezzodrinker  [author] May 20, 2017 @ 3:47am 
Time to plunge myself into despair. I'm reworking the whole script... again. *sighs*
mezzodrinker  [author] May 9, 2017 @ 7:21am 
@YrriNoTherapy I am planning to pick it up again once I get the time to read into Space Engineer's nice programming API again. I'm lovin' it.
The_Yrri May 7, 2017 @ 6:03pm 
I wonder will this be updated or should it be considered abandoned. Love this one somehow.
Nikolas March Mar 26, 2017 @ 3:13am 
might work with the older compatibility version
Cronos.exe Dec 1, 2016 @ 12:41pm 
This script currently broken