Jump to content

[Minimum KSP version 1.11] Surface Mounted Lights v1.19


IgorZ

Recommended Posts

@IgorZ If you've taken this up, have you considered merging it with:

That's a lighting parts mod as well that benefited from the addition of the color plugin from this mod. (I once made a MM.cfg to change ALL lights to this mod's plugin module.) ASET's mod used to have a color change dependency plugin, but that one stagnated (hence why SIL never updated past 0.90).

Just a thought for your consideration. I find how BRIGHT SIL parts are to greatly reduce the number of lighting parts I needed on a vessel (part count being an enemy back in the 1.0.x days.)

Link to comment
Share on other sites

13 hours ago, StahnAileron said:

@IgorZ If you've taken this up, have you considered merging it with:

That's a lighting parts mod as well that benefited from the addition of the color plugin from this mod. (I once made a MM.cfg to change ALL lights to this mod's plugin module.) ASET's mod used to have a color change dependency plugin, but that one stagnated (hence why SIL never updated past 0.90).

Just a thought for your consideration. I find how BRIGHT SIL parts are to greatly reduce the number of lighting parts I needed on a vessel (part count being an enemy back in the 1.0.x days.)

Thanks for the reference. Inline lighting mod looks nice but it's not exactly what this mod is about. Though, if author of ASET implements similar light parts I will not object :)

Link to comment
Share on other sites

  • 1 month later...

Awesome - I love this mod, main source of beautification for me.

2 hours ago, IgorZ said:

New release.

1.3.1 (December 1st, 2016)

  • [Enhancement #3] Support lens color in the stock lighting parts.

You think you could add a bit beefier surface mounted spotlight in the future? No rush at all :)

EDIT: Or let me check the new effect on the other stock lights...maybe it's not needed :)

Edited by DrScarlett
Link to comment
Share on other sites

@IgorZ Would you mind making the color sliders available in flight? A few lines do it for me:

--snip
/// <inheritdoc/>
  public override void OnAwake() {
    base.OnAwake();
    Fields["lensBrightness"].OnValueModified += (x => UpdateLightTextureColor());
    Fields["lightR"].OnValueModified += (x => UpdateLightTextureColor());
    Fields["lightG"].OnValueModified += (x => UpdateLightTextureColor());
    Fields["lightB"].OnValueModified += (x => UpdateLightTextureColor());

    Fields["lensBrightness"].guiActive = true;
    Fields["lightR"].guiActive = true;
    Fields["lightG"].guiActive = true;
    Fields["lightB"].guiActive = true;

  }

  /// <summary>
  /// Updates the emissive color of the material so that it matches the light color.
  /// </summary>
  public virtual void UpdateLightTextureColor() {
    var newColor = GetLightTextureColor();
    lightMaterial.SetColor("_EmissiveColor", newColor);

    // change light color
    for (int i = 0; i < lights.Count; i++)
    {
        lights.color = newColor;
    }

  }

--snip

Link to comment
Share on other sites

3 hours ago, KortexM said:

@IgorZ Would you mind making the color sliders available in flight? A few lines do it for me:

--snip
/// <inheritdoc/>
  public override void OnAwake() {
    base.OnAwake();
    Fields["lensBrightness"].OnValueModified += (x => UpdateLightTextureColor());
    Fields["lightR"].OnValueModified += (x => UpdateLightTextureColor());
    Fields["lightG"].OnValueModified += (x => UpdateLightTextureColor());
    Fields["lightB"].OnValueModified += (x => UpdateLightTextureColor());

    Fields["lensBrightness"].guiActive = true;
    Fields["lightR"].guiActive = true;
    Fields["lightG"].guiActive = true;
    Fields["lightB"].guiActive = true;

  }

  /// <summary>
  /// Updates the emissive color of the material so that it matches the light color.
  /// </summary>
  public virtual void UpdateLightTextureColor() {
    var newColor = GetLightTextureColor();
    lightMaterial.SetColor("_EmissiveColor", newColor);

    // change light color
    for (int i = 0; i < lights.Count; i++)
    {
        lights.color = newColor;
    }

  }

--snip

Well, at some point I was thinking about this feature which is especially useful when used with OSI and KIS. Though, then I doubted if it would be realistic. In real world you cannot give an arbitrary color to the light source, you need to use different bulbs/LEDs/lens to achieve it. It sounds OK when you're designing a rocket but where will you get the spare parts in space? :)

What was your use case for the in-flight color change?

Link to comment
Share on other sites

13 minutes ago, IgorZ said:

Well, at some point I was thinking about this feature which is especially useful when used with OSI and KIS. Though, then I doubted if it would be realistic. In real world you cannot give an arbitrary color to the light source, you need to use different bulbs/LEDs/lens to achieve it. It sounds OK when you're designing a rocket but where will you get the spare parts in space? :)

That sounds reasonable, indeed..

 

13 minutes ago, IgorZ said:

What was your use case for the in-flight color change?

well, when i had my 1.0.5 carrer running i would have loved to switch my lights colors on my sats to indicate their "final" position and stuff. But i'm sure people would find ways to use it (or not) once that option would be present.

Anyway, it's your decision, it was just an idea.

Link to comment
Share on other sites

  • 3 months later...
On 3/15/2017 at 5:54 AM, Kenny Kerman said:

Hello, great work! But is it possible to add a "blink rate" edit box or button and a "all on/off" action on the multidirectionals?

Not sure if I get the idea. On the video you do have a part that allows you making lights blinking. Why would the surface lights need an extra support?

Edited by IgorZ
Link to comment
Share on other sites

6 hours ago, IgorZ said:

Not sure if I get the idea. On the video you do have a part that allows you making lights blinking. Why would the surface lights need an extra support?

Because I need 2 AG for that and I can't turn off the lights, as said on the video. Strange question. "You can do that with two hammers so why do you need a screwdriver?" :P

Edited by Kenny Kerman
Link to comment
Share on other sites

@IgorZ I'm trying to get this to replace the stock light module for all my lighting parts as well as integrate it into the mod I mentioned long ago. It didn't work with an old patch I had. Looking at the new configs in your release, I realized you changed a number of things. The module name is different (ModuleStockLightColoredLens vs. SurfaceLight) and the color values have been made independent. Are there any other features/changes I should be aware of for a generic MM config affecting all parts?

Link to comment
Share on other sites

8 hours ago, StahnAileron said:

@IgorZ I'm trying to get this to replace the stock light module for all my lighting parts as well as integrate it into the mod I mentioned long ago. It didn't work with an old patch I had. Looking at the new configs in your release, I realized you changed a number of things. The module name is different (ModuleStockLightColoredLens vs. SurfaceLight) and the color values have been made independent. Are there any other features/changes I should be aware of for a generic MM config affecting all parts?

It's hard to tell the difference between the old and the current modules. The current module is descendant of the stock ModuleLight, and the only new field is lensBrightness. That said, configure your part as you would do with a stock light module.

Link to comment
Share on other sites

  • 1 month later...
On 2016-12-2 at 7:01 PM, IgorZ said:

Well, at some point I was thinking about this feature which is especially useful when used with OSI and KIS. Though, then I doubted if it would be realistic. In real world you cannot give an arbitrary color to the light source, you need to use different bulbs/LEDs/lens to achieve it. It sounds OK when you're designing a rocket but where will you get the spare parts in space? :)

What was your use case for the in-flight color change?

I know this was months ago but I just wanted to comment on this as it was something I felt was needed a few years back due to the fact I do configure my lights to not use the default colour balance so white light is warmer. Then when adding lights with KAS / KIS I was left with no option but to use the horrible white light of stock. However, even back then there was a mod that did exactly what was being asked for and fortunately, it still exists...

 

So, at least for now, BULB has this feature covered should anyone desire it.

 

Oh and a belated thank you for keeping these lights alive.

Link to comment
Share on other sites

2 hours ago, Manwith Noname said:

Then when adding lights with KAS / KIS I was left with no option but to use the horrible white light of stock.

This was my issue too. However, I decided to have it fixed (one day) via KIS. There are many parts that allow configuring in the editor, and in space they all get the default settings. It would be great if KIS could access at least some of the editor adjustable settings. This approach doesn't break the realistics more than KIS does, so it's a fine solution :) 

Edited by IgorZ
Link to comment
Share on other sites

I appreciate the concern about maintaining a certain amount of realism and not making some sort of cheat mode. The way I see it with the lights particularly is, if I was actually running a space program and I want or needed to attach more lighting to a station in space, the lighting would be configured to fit those needs before launch. Also, there are actually lights that can have their colour defined in situ and even have aspects remotely controlled.

Anyway, I resurrected my old module manager patch, did some editing and have added BULB functionality to the lights in my install. I can post it if anyone want's it. I would do it anyway but I'm trying to decide which thread it would be most applicable in.

 

Link to comment
Share on other sites

2 hours ago, Overland said:

Thankyou

Makes the perfect class illumination light and having the fog lights yellow looks awesome :)

Q4mwW7c.png

Out of curiosity, how do you joint the vehicles in your "train"? Have you tried the tow bar from KAS 1.0 for this purpose?

Link to comment
Share on other sites

 

Hello there, I REALLY like this mod and want it, But I do not use CKAN. I install my mods manually and know HOW to do it. Can you post a download link for us that do not use CKAN?

Many thanks in advance.

Link to comment
Share on other sites

35 minutes ago, Damaske said:

 

Hello there, I REALLY like this mod and want it, But I do not use CKAN. I install my mods manually and know HOW to do it. Can you post a download link for us that do not use CKAN?

Many thanks in advance.

The link is in the OP under the heading titled "Manual".

Link to comment
Share on other sites

5 minutes ago, Merkov said:

The link is in the OP under the heading titled "Manual".

... Oh so it WAS there, that's what i get from just looking over it for a normal and very apparent download here link.. 

 

 

Link to comment
Share on other sites

18 hours ago, Damaske said:

... Oh so it WAS there, that's what i get from just looking over it for a normal and very apparent download here link.. 

 

 

Lol, no worries. It certainly isn't a giant button like some mod pages have. I would have just pasted the link in my reply but my mobile phone and I don't really have the greatest success doing anything more than type simple messages on this forum.

Link to comment
Share on other sites

SurfaceLights v1.4.0

@ihsoft ihsoft released this 12 minutes ago

Changes:

  • KSP 1.3 support.

This release has two non-critical issues:

They will be addressed in the next version according to the priorities on the other mods.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...