Jump to content

0.21 Fully Controllable Lights (color,intensity,range)


DSSP

Recommended Posts

I always felt like there are not enough lights and missing colored lights.

so i started a project to control color,intensity and range of a light in-game.

this will also allow default colors to be set in the part.cfg.

so anyone could copy the part and create a range of colored lights.

Download here: DSSPLights.rar

License and Source included in archive.

Archive Contains Parts (as shown in image):

LightBulb (Small,Medium,Large)

LightBeam

below image is the actual working plugin ingame.

LightsPreview.PNG

now compatible with ksp's spot and flood lights.

FloodLights.PNG

Add below code to the part.cfg of spotLight1. (GameData\Squad\Parts\Utility\spotLight1\)

MODULE
{
//Module Name
name = DSSPLights
//the GameObject that holds the Animation Component
animGO = light1
//the animation path to the GameObject that represents the lightBulb (Material Animation) (path is relative to animGO)
animBulbPath =
//the animation path to the GameObject that holds the Light Component (on/off Animation) (path is relative to animGO)
animLightPath = spotlight
//min/max values
minIntensity = 0.5
maxIntensity = 1.0
minRange = 400.0
maxRange = 800.0
//Default values
valRed = 1.0
valGreen = 0.9620081
valBlue = 0.7910448
valIntensity = 1.0
valRange = 400.0
}

Add below code to the part.cfg of spotLight2. (GameData\Squad\Parts\Utility\spotLight2\)

MODULE
{
//Module Name
name = DSSPLights
//the GameObject that holds the Animation Component
animGO = light2
//the animation path to the GameObject that represents the lightBulb (Material Animation) (path is relative to animGO)
animBulbPath =
//the animation path to the GameObject that holds the Light Component (on/off Animation) (path is relative to animGO)
animLightPath = spotlight
//min/max values
minIntensity = 0.5
maxIntensity = 1.0
minRange = 15.0
maxRange = 30.0
//Default values
valRed = 1.0
valGreen = 0.9620081
valBlue = 0.7910448
valIntensity = 1.0
valRange = 15.0
}

sorry for the bad quality im still figuring out how to get good quality on videos.

Edited by DSSP
Added floodlights compatibility
Link to comment
Share on other sites

If you're using electric charge (which I assume) do you expose the variables or methods required to query charge used maximum and actual usage (if they differ) and whether the light is currently on or off?

this plugin is written in cooperation with the standard ModuleLight KSP uses.

which means all the normal light functionality is kept aswell as the cunsumption fields in the origional ModuleLight in part.cfg.

as we speak i am uploading the files for download.

try it and tell me if anything could be added or changed.

Link to comment
Share on other sites

this plugin is written in cooperation with the standard ModuleLight KSP uses.

which means all the normal light functionality is kept aswell as the cunsumption fields in the origional ModuleLight in part.cfg.

as we speak i am uploading the files for download.

try it and tell me if anything could be added or changed.

Thanks for the answer, that's great. If you are using ModuleLight Fusebox will pick your parts up without any changes :)

Link to comment
Share on other sites

im sorry this is my first release i am creating a license and adding source.

untill this is done i will remove the download link.

my appologies

doesnt every coder wants to hide his code ;)

but i understand, im just new to this (adding licenses etc.).

Edited by DSSP
Link to comment
Share on other sites

A plugin without source is very suspicious. While there is nothing malicious in your code, it still creates the impression that you want to hide something. Don't do this, post the source.

Maybe to you, but in context with the rest of this thread, it looks to me much more like he's making this up as he goes along and just hasn't gotten around to it yet.

I understand your concerns, but perhaps you could try some tact first, before jumping to the accusations?

Link to comment
Share on other sites

on liscense and source. they let u post the mod withotu it long as u add it to them asap.

add the souce to it as seprate download is also fine. on the liscense make sure u get it asap but make a note on first post till u get it so moderators dont lock the thread.

Link to comment
Share on other sites

Maybe to you, but in context with the rest of this thread, it looks to me much more like he's making this up as he goes along and just hasn't gotten around to it yet.

I understand your concerns, but perhaps you could try some tact first, before jumping to the accusations?

I'm just very cautious when it comes to closed-source add-ons.

Link to comment
Share on other sites

I'm just very cautious when it comes to closed-source add-ons.

if thats your argument i would say dont download ;).

but no discussion about it i will add the required stuff because those are the rules.

Link to comment
Share on other sites

This is a very handy plugin. Thanks for sharing. However, it would be much easier to use if you could create a user interface that let me type in values and save presets for rapid setup. What I could really use are adjustable spot and flood lights as well. Any chance it's possible to extend this to handle that?

Link to comment
Share on other sites

This is a very handy plugin. Thanks for sharing. However, it would be much easier to use if you could create a user interface that let me type in values and save presets for rapid setup. What I could really use are adjustable spot and flood lights as well. Any chance it's possible to extend this to handle that?

i personally dislike using windows in my plugins they are very messy with multiple parts.

and without windows there is no way to have such an interface.

custom lights can be used with this plugin just follow the instructions in any part.cfg included.

as for the standard spot/flood lights this will not work.

i could create an alternative module just for those if you'd like .

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...