Space Engineers

Space Engineers

Not enough ratings
Zephyr Industries Light Profiles
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
6.287 KB
17 Aug, 2019 @ 12:57am
17 Aug, 2019 @ 1:19am
2 Change Notes ( view )

Subscribe to download
Zephyr Industries Light Profiles

Description
Living in the Future(tm)

Ever wanted to change your lights to a new colour scheme, but don't want to lose all your old settings?

Zephyr Industries has what you need, I'm here to tell you about their great new product: Zephyr Industries Light Profiles.

Save your existing light configurations with a press of a button! Configure them to something new! Switch them back and forth! Life has never been so good, that's what Living in the Future(tm) means!

Instructions:
  • Place on a Programmable Block.
  • Run the script with the name of a profile as the argument to switch to that profile.
  • When you switch profile, the current light settings are saved to the old profile for that light. (In the case of messing around with subgrids and docking and other stuff, this should "do the right thing".)
  • If the light is new to the script, it will save under the "original" profile.
  • Scans for new lights every 300 game updates. ~30-60s.
  • Saves and restores radius, intensity, falloff, blink interval, blink length, blink offset, light offset, colour and on/off state.

Notes:
  • Messes with CustomData on the light, other scripts that mess with this may clash.
  • Try the "Capac" profile for some fun times and the inspiration to finally get around to writing this script.
  • Set your light profiles to different intensities and put them on a button bar: you now have a dimmer switch.
  • Use sensors to change to an "alert" profile when intruders are detected, and reset again afterwards.

Contributing:

Zephyr Industries Light Profiles is open source, under an MIT license. You can contribute to or copy the code at https://github.com/illusori/space-engineers-zi-light-profiles.
17 Comments
Illusori  [author] 11 Sep, 2019 @ 8:40pm 
Thank you for all your help in trying to figure this out, I'm sorry for the inconvenience it caused. Hopefully if there's some edge case I've missed then someone else will trip over it and report it too, so I can piece together the puzzle. It absolutely looked like you were using the script correctly!
Splitsie 11 Sep, 2019 @ 8:20pm 
I hadn't made any changes to it that I recall, unless I accidentally modified some of them as I was using build vision, but then I normally change it back. If I come across the problem again I'll see if I can nail down anything that I think might have contributed to it
Illusori  [author] 11 Sep, 2019 @ 6:16pm 
Thank you, that's really useful information.

Unfortunately, falloff still seems to be being saved and restored correctly when I test in SP and MP. This is baffling.

Did you manually change the falloff in the lights at any point? Those changes would be saved to the current profile next time you switched profile, and restored when you switch back. I maybe haven't made it clear enough in the docs that the "original" profile is just a name, and that perhaps counterintuitively it will save change you make, rather than permanently being the pre-install state.

I admit, I'm clutching at straws here, I still can't manage to break it myself. :D
Splitsie 11 Sep, 2019 @ 5:19pm 
So I did a little more investigation, the lights were all on, the only setting that hadn't been stored properly was the falloff, while they were originally set to 1 (I checked an older save) the custom data had stored it at 0 so while the rest of the values were correct there was almost no light being emitted.
Illusori  [author] 11 Sep, 2019 @ 4:24pm 
OK, I'm having no luck reproducing this, including in multiplayer. One thing you could do if you have time is to go into the Custom Data section of one of your lights (any light will do) and copy-paste the contents to me here. Place it between [noparse] [/noparse] tags so that the formatting doesn't go wrong. I might be able to do some forensics and figure something out from that.
Illusori  [author] 11 Sep, 2019 @ 3:41pm 
So, that didn't appear to be the problem. Whichever combination of profiles I start with from a clean install is remembering settings correctly when I test. Going to have to dig further on this.
Illusori  [author] 11 Sep, 2019 @ 3:20pm 
I've looked at the video and it looks like you did everything right. However I'm wondering if activating the original profile first is the issue. It might not be saving correctly, because you're switching from original TO original - if it then tried to read the profile which was blank, it would end up loading default values for the lights.

That's not a very clear explanation, but it's something I can test.
Splitsie 11 Sep, 2019 @ 3:02pm 
I think I mostly cut out the process sadly, but all the lights had custom settings before I pressed the 'original' button, which I thought would have preserved those settings
Illusori  [author] 11 Sep, 2019 @ 2:27pm 
Oooh, I hadn't checked youtube today, I know what I'm watching next. I might also have a clearer idea once I've watched it.

It sounds like what you did should have worked, unless you'd changed the lights settings manually before you switched. I've not tested in multiplayer... from my understanding that shouldn't have had an effect, but it's possible there's some issues there I'm unaware of.

I'll watch the video and see what I can figure out from that.
Splitsie 11 Sep, 2019 @ 2:18pm 
This was in multiplayer though, so I wonder if that had an effect - I used this script in the most recent Escape Unlikely and Capac greatly enjoyed its effects :)