Space Engineers

Space Engineers

110 ratings
[VSI] Emissive Controls
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script
File Size
Posted
Updated
551.187 KB
12 Apr, 2018 @ 2:54pm
7 May, 2020 @ 7:25pm
19 Change Notes ( view )

Subscribe to download
[VSI] Emissive Controls

In 1 collection by Darkmist
Void Star Industries mods
5 items
Description
Here is another Void Star Industries gem: Emissive Controls. No more blinding white light for beacons or Azimuth Open Cockpits only the color you desire.

With this mod you can disable the base emissive color (using the "Emissive" layer) on any terminal block. For reactors, beacons and cockpits new terminal controls were added to help with your recoloring, but modifying the CustomData section for any other terminal block works too.

Adding the "[NoEmissive]" tag to the name of a terminal block will disable its base emissive layer. Removing the tag will try to restore the original emissive color.

NOTE: functional emissive layers (emissive0, emissive1, etc.) are not modified, so the different working states of blocks should still be displayed correctly. Also the red emissive for non working blocks is also shown even if you otherwise modified the emissive color.

Technical Information
Unfortunately despite how SE works inside, it is not possible to add terminal controls for the base TerminalBlock type, so I had to do them one by one hence the limited set of block types that have them. I thought these three that I added were either the most modded ones (reactors, cockpits) or the most troublesome (Azimuth Open Seat Cockpit or the vanilla beacon). If enough people want me to add controls for some other block type I will consider adding them.

The bright light emitted by the vanilla beacon is not controlled by the emissive color, so I added a separate change there. If enough people want it back (I doubt it though :)) I will remove it or make it configurable.

The format of the CustomData controlling the emissive color override is the following:

[Emissive] 255/0/0 0.95 True

The name is case sensitive, so it should be written exactly like this and each parameter should be on their own line. The first value is the new emissive color (0-255/0-255/0-255) followed by the emissivity value (0.0-1.0), followed by a boolean value (True or False) telling the mod if you want the color to overwrite the original one (I guess this will be True in most cases).

UPDATE 2018-04-15
I have added specific logic to make Cryochambers, Sensors and Jump Drives work. Enjoy!

UPDATE 2018-05-26
I have refactored the code so the mod is way less intrusive now. I hope this will greatly decrease those unforeseen and weird issues some of you have been encountering with some other mods. If there are still problems let me know.

UPDATE 2019-02-28
Updated for 1.189

UPDATE 2019-03-31
The last update adding the controls to any terminal block seems to have cause some confusion, so I added restrictions as to which blocks will have emissive override controls and logic. As of this update, only the following types of block will have the controls: Beacon, Reactor, Cryo Chamber, Jump Drive, Converyor Sorter, Cockpit, Interior Lights (for the bulb), Spotlight (see interior lights), Decoy, Gyro, Gravity Generators (both types), Space Ball, Upgrade Modules and Artifical Mass. Upgrade modules currently don't show the yellow "not connected" color on their empty ports if their emissives are overridden. It would need a lot of work to fix it (again because of the very restrictive Mod API) and I am not sure it's worth it. If enough people needs it I might take a look at it in the future.
Popular Discussions View All (1)
17
25 Sep, 2019 @ 1:10pm
Severe issues with this mod's gamelogic hijacking
Digi
119 Comments
FormulaZR 2 Jul, 2020 @ 2:17pm 
@darkmist I mean the color the neon armor skin emits. What I mean is: for example currently you cannot make a silver armor block emit any color other than white. I'd like a silver block with purple emissive.
Darkmist  [author] 2 Jul, 2020 @ 12:00pm 
You mean the neon tubes or the armor skin? You can change the color on the armor skin I believe. I haven't really tested the neon tubes...
FormulaZR 1 Jul, 2020 @ 7:16pm 
Could you provide control over the emissive color of the new Sparks of the Future DLC neon skinned block?
Darkmist  [author] 7 May, 2020 @ 7:28pm 
Thank you! I added a check for what I think might be null in there. Can you try it with this change? I loaded the previous version in a dedicated server but being the only player I couldn't reproduce the problem.
Death666Machine 6 May, 2020 @ 4:23pm 
15:20:26.0005 [FATAL] Initializer: System.NullReferenceException: Object reference not set to an instance of an object.
at DarkVault.EmissiveControl.EmissiveControlGridLogic.OnPlayerEnteredCockpit(String entityName, Int64 playerId, String gridName)
at Sandbox.Game.DoubleKeyPlayerEvent.Invoke(String entityName, Int64 playerId, String gridName)
at Sandbox.Game.Entities.MyCockpit.AttachPilot(MyCharacter pilot, Boolean storeOriginalPilotWorld, Boolean calledFromInit, Boolean merged))
Darkmist  [author] 6 May, 2020 @ 1:47am 
Where do you get the null reference exception? Can you show me that part of the log?
Death666Machine 5 May, 2020 @ 4:19pm 
Latest update causes null reference exception in torch server, had to remove mod for now.
Darkmist  [author] 5 May, 2020 @ 8:56am 
Ok, so this was a real comment and I was able to talk to FilCoN. It seems that currently (I don't think that was the case originally, but I do not remember exactly) events for players entering/leaving cockpits can happen concurrently, and I was not prepared for that. I have pushed an update that is using a concurrent data structure, so it should now be ok. I will try to test this on MP but in theory this should only happen when players are entering or leaving cockpits on the same grid at the same time, so if anyone still finds the game crashing please let me know.
Darkmist  [author] 5 May, 2020 @ 8:20am 
WTH is that comment?
filcon  [developer] 4 May, 2020 @ 1:35am 
Hi,
We don't recommend using this mod. There is issue how it's implemented and crashing game.