Jump to content

[1.12.x] IndicatorLights Community Extensions v1.6.2: Compatibility patches for IndicatorLights


Snark

Recommended Posts

21 hours ago, Beetlecat said:

I'll assume to need blender and/or unity to help with placement?

You don't need Unity, at all.  Technically, you don't actually need Blender-- as @DStaal points out,

21 hours ago, DStaal said:

For just the simple indicators, all you need is KSP and a text editor

...however, I've found that in practice, a bit of poking-around in Blender does save a lot of trial-and-error.  I've just now gone and edited the OP of this thread to add a "How to add indicators to a part" section, which describes my typical workflow for doing this.  You might want to give it a glance, in case you find it helpful.

Aside from describing how you can use Blender to streamline the process if you're so inclined, it also provides one super helpful tidbit about ModuleManager that a lot of folks don't realize, and that's that it has a debug menu UI (press Alt+F11 in KSC view), which allows you to re-load MM config without needing to exit and restart KSP itself.  Saves tons of time.  :)

19 hours ago, JH4C said:

As for what means what, I know that the second of the three co-ordinates are positive going from the centre to the front/top, and negative going from the centre to the rear (worked that out from my own Mk1Cabin patch and the one included in this) so that's Y... I'm gonna assume the first digit is X (left/right) and the third is Z (in/out).

Yes, that's correct.  See the "How to add indicators to a part" section I added to the OP here.

Link to comment
Share on other sites

Plugin link for others wishing to pursue the Blender method.

My eyes started glazing over at the mention of "cloning repos" (if they mean "download source files in a zip" why can't they just say that?), and the version of Blender I've just downloaded from their site doesn't have any folders for scripts or addons and my brain's just about melting and I think I accidentally flew an SSTO to Eeloo and back while trying to understand all this. I also don't understand how things work with the .cfg files, everything refers to MODULE but never with any form of identification so how does it know which module I'm trying to edit? I think I'm just gonna use some Sharpie highlighters on my screen instead...

Wait, I think I was looking at poorly structured files; now I've looked at the MKS patch and it explains things much more clearly. I'm still very confused by the Blender thing though. I may just try to brute-force a couple of simple parts just to get a feel for writing .cfg patches; I figure if I write a patch that adds a dozen lights in varying positions, I can tweak, trim, and tune based on a lot more datapoints in a single reload - a shotgun approach, rather than sniper-like precision, but it'll still get the job done maybe?

Link to comment
Share on other sites

1 hour ago, JH4C said:

My eyes started glazing over at the mention of "cloning repos" (if they mean "download source files in a zip" why can't they just say that?), and the version of Blender I've just downloaded from their site doesn't have any folders for scripts or addons and my brain's just about melting and I think I accidentally flew an SSTO to Eeloo and back while trying to understand all this.

Look at the OP of the Blender .mu import/export addon you just linked-- the steps are pretty straightforward.  Yes, I can see how "git clone" might be puzzling if you haven't used git before, but other than that one thing, it's all pretty straightforward.

The reason it doesn't say "download source files in a zip" is because that's not what it means.  It means clone the git repo.  That means "install the git tool, then go to this repo that's linked here so you have its address, then go to where you're putting your git's local directories and type "git clone " followed by the repo address, which causes git to go out to the remote site, download an entire directory tree file-by-file, and reproduce that directory tree locally.  Basically, you're not downloading a zip-- you're doing the exact opposite, and downloading an unzip;)

^ The above is just a quick summary of git-- the OP for the addon doesn't go into all these details because it's mainly aimed at modders, and git is a tool that basically all modders use, so it's something used without explanation.  If you'd like to learn about git, it's fairly googlable-- it's essentially how the entire open-source world stores and updates content such as source code.

1 hour ago, JH4C said:

I also don't understand how things work with the .cfg files, everything refers to MODULE but never with any form of identification so how does it know which module I'm trying to edit?

Depends whether you're working with a ModuleManager .cfg file, or with a regular on.  (If everything has a @ in front of it, it's ModuleManager.)

The module config language for KSP is documented in various places.   The identification is present, you just need to know what to look for.

In the case of a regular KSP .cfg file, the identification is in the "name" field.  e.g. suppose I have a part which has a ModuleFoobar on it.  Somewhere in the part's config file, there will be something like this:

MODULE
{
    name = ModuleFoobar
    other = stuff
    // blah blah blah ...
}

That "name = ModuleFoobar" is what tells it which module we're dealing with.

As I mention, the above syntax is what you typically see in "regular" config, e.g. defining the config for a part.  There's a somewhat different type of config file, which is for ModuleManager.  ModuleManager files are patches-- that is, they're not typically defining new config (e.g. for a part), but rather, are modifying some other config.  Thus the syntax is a little different in that case.  For example, let's say you've got a config file that's part of a mod, and what it wants to do is alter some of the values on some part's ModuleFoobar.  The config to do that would look like,

@MODULE[ModuleFoobar]
{
    // Changes the value of the "other" field on a ModuleFoobar
    // so that it's "more stuff"
    @other = more stuff
}

If you're trying to set up config for a part for this mod, probably one of the best things to do would be to just go look at the already-existing config for some similar part.  For example, let's say you're trying to add crew indicators for a 2-kerbal pod.  You could just fine the config for some other two-kerbal pod with crew indicators, and then just copy that and make the specific changes needed.  Also, the IndicatorLights config setup is documented in a fair amount of detail (see the OP of this thread for links).

Link to comment
Share on other sites

Well I did eventually get my copy of Blender to recognise that I'd installed the addon, but could not convince it in any way to load a .mu file. (I get that some things are more acceptable in free software when they're for the programmer's convenience, but when an app starts out by ignoring the system toolbar, fonts, and file loading dialogues for ones of its own invention I just find it really frustrating to deal with, especially if it ends up ignores my accessibility requirements in the process.) It's no longer installed because I set fire to that segment of my hard drive. I do feel like I'm gaining a better understanding of MM patch though, so I'm not throwing in the towel just yet.

Sorry to keep posting about what's essentially dev work in a release thread.

Link to comment
Share on other sites

18 minutes ago, JH4C said:

Well I did eventually get my copy of Blender to recognise that I'd installed the addon, but could not convince it in any way to load a .mu file.

If everything's installed properly, then the way this ought to work should be:  open Blender, then go to the "File" menu and choose "Import >".  In the list of supported file types there, "KSP .mu" will be one of the options.

19 minutes ago, JH4C said:

(I get that some things are more acceptable in free software when they're for the programmer's convenience, but when an app starts out by ignoring the system toolbar, fonts, and file loading dialogues for ones of its own invention I just find it really frustrating to deal with, especially if it ends up ignores my accessibility requirements in the process.

In this case, it's not just that it's free, but also that it's multi-platform.  They want Blender to run on Windows, and on Mac, and on Linux, yadda yadda.  Doing a full-fledged port of complex software to another OS is lots of work.  So, it's not uncommon (especially if you're free, and strapped for manpower) for such software to be built against some third-party UI model, which is then kept regardless of which platform it's running against.  This greatly simplifies the devs' lives.  The problem is that it's then more off-putting to customers, since they won't get the standard UI experience of their chosen OS.  ...On the other hand, there's also target audience.  This is not casual-use software-- it's highly complex modeling software that 99%+ of the population wouldn't understand, and the people using it tend to be uber-geeks.  So it may also be that the assumption is that uber-geeks will work around things at an expert level, so the software ends up confusing and intimidating to any non-guru.

23 minutes ago, JH4C said:

Sorry to keep posting about what's essentially dev work in a release thread.

Nah, not a problem-- an important part of this thread is to get people to contribute their own modlets, which means "help users with their problems" kinda boils down to "explain to users how to build stuff".  So I'd say you're right on target, here.  :)

Link to comment
Share on other sites

6 minutes ago, Snark said:

If everything's installed properly, then the way this ought to work should be:  open Blender, then go to the "File" menu and choose "Import >".  In the list of supported file types there, "KSP .mu" will be one of the options.

Well, it's gone to Silicon Heaven now, but it was installed according to the in-app Add-On list, yet not an option under Import, hence my befuddlement.

As for the other stuff about Git and Blender: Yeah, I know there's reasons within reasons, like everything; just being a grumpy Gus. Could say more, but this is not the time nor place. Your continued support and encouragement is definitely appreciated.

Edited by JH4C
Link to comment
Share on other sites

  • 4 months later...

Hi, uhm, I read the make-a-patch guide, and I made a patch for the MSP-3000 Material Science Pod by Tyko. I have no idea how to properly contribute this, so I've dropped the contents of the new 'MSP3000.cfg' here (just the new stuff, none of the code by Tyko).

I hope you guys like it, and if there is anything I can do to properly submit this, let me know.

Spoiler

jgzDYMo.png

Spoiler

@PART[MSP3000]
{
	//-------------------------------------------------------------------------
	// INDICATOR MESHES
	//-------------------------------------------------------------------------
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.5, 0.19, 0.5
		position = 0, 0.1525, -0.104
		rotation = 0, 180, 0
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.5, 0.19, 0.5
		position = 0, -0.1525, -0.104
		rotation = 0, 180, 0
	}
	
	//-------------------------------------------------------------------------
	// CONTROLLABLE EMISSIVES
	//-------------------------------------------------------------------------
	MODULE {
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp
		emissiveName = indicator
	}


	//-------------------------------------------------------------------------
	// CONTROLLERS
	//-------------------------------------------------------------------------

	MODULE {
		name = ModuleScienceDataIndicator
		emissiveName = indicator
		dataColor = $HighScience
		partialDataColor = $MediumScience
		lowDataColor = $LowScience
		emptyColor = ModuleScienceAvailabilityIndicator
		lowScienceThreshold = 0.25
		highScienceThreshold = 0.8
	}

	MODULE {
		name = ModuleScienceAvailabilityIndicator
		lowScienceThreshold = 0.25
		highScienceThreshold = 0.8
	}
}

 

 

Link to comment
Share on other sites

On 9/21/2018 at 1:31 PM, The-Grim-Sleeper said:

Hi, uhm, I read the make-a-patch guide, and I made a patch for the MSP-3000 Material Science Pod by Tyko. I have no idea how to properly contribute this, so I've dropped the contents of the new 'MSP3000.cfg' here (just the new stuff, none of the code by Tyko).

I hope you guys like it, and if there is anything I can do to properly submit this, let me know.

Oh hey, thanks!  :D

I've updated the mod and released v1.4 of IndicatorLights Community Extensions, now with MSP-3000 support.

Enjoy, everyone!  And a hearty thanks to @The-Grim-Sleeper.

(Also a shout-out to @Tyko, just so you're aware that IndicatorLights has now got your back, thanks to The-Grim-Sleeper here.)  ;)

Link to comment
Share on other sites

  • 4 weeks later...

@Snark, Nertea's Space Station Parts Expansion redux includes a reskinned Clamp-O-Tron Docking Port that seems to disable addition of, or overlay on top of, the Indicator Lights LEDs.  The controls for the LED on/off button still show up, but don't do anything.  @Nertea suggested I point you to the thread to take a look at the issue.

His comments are in the second half of this post here:

I'd try to help more but my code comprehension is only slightly above parrot-level....

 

Link to comment
Share on other sites

14 hours ago, KSPrynk said:

@Snark, Nertea's Space Station Parts Expansion redux includes a reskinned Clamp-O-Tron Docking Port that seems to disable addition of, or overlay on top of, the Indicator Lights LEDs.  The controls for the LED on/off button still show up, but don't do anything.  @Nertea suggested I point you to the thread to take a look at the issue.

Hey there, thanks for the heads-up!

I responded in Nertea's thread, and he acknowledged.  Sounds as though there may be a fix in the works (in SSPX) to take care of the issue.  :)

(Even if for some reason that eventually ends up not happening, it should be possible to add a fairly simple patch fix to IndicatorLights Community Extensions to address the matter.  However, hopefully Nertea will be taking care of this in SSPX itself and then it'll be fine.)

Link to comment
Share on other sites

I don't know how to officially add to a mod, but here are a couple patches I've written, consider them public domain. I wrote these as I use the mods in my game and needed them for myself. If someone else finds them useful, great. I hesitated to even post them as I absolutely have no patience for support, so don't come asking me to write an indicator lights patch for any mod you might want. Do it yourself and post the results here, I can't believe something so useful hasn't been more widely adopted.

Patches for the Taurus HCV mod in the SpaceTux Recycled Parts. Adds crew lights to crewable components and indicators for the combined SAS & battery. Behavior mimics the functionality Snark set in similar stock components. The only thing I might add would be to use some nubbin lights to mimic the cabin lights on  the HitchHiker and Science Lab in this mod. The models are old and don't have functional cabin lights. In game, I've been using some BL-01 Lights set to toggle with the light action group to mimic cabin lights and just haven't gotten around to working up a patch.

TAURAS HCV CONFIG IS NOW INCLUDED IN THAT MOD

Spoiler

@PART[TaurusHitchhiker] {
// Adds crew indicator and flash for crew report available


    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = 0.37, 0.15, 1.775
	rotation = 0, 0, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = 0.37, 0.05, 1.775
	rotation = 0, 0, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = 0.37, -0.05, 1.775
	rotation = 0, 0, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = 0.37, -0.15, 1.775
	rotation = 0, 0, 0
    }
    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = -0.37, 0.15, 1.775
	rotation = 0, 0, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = -0.37, 0.05, 1.775
	rotation = 0, 0, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = -0.37, -0.05, 1.775
	rotation = 0, 0, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = -0.37, -0.15, 1.775
	rotation = 0, 0, 0
    }

    //-------------------------------------------------------------------------
    // CONTROLLABLE EMISSIVES
    //-------------------------------------------------------------------------

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:0
	emissiveName = indicator0
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:1
	emissiveName = indicator1
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:2
	emissiveName = indicator2
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:3
	emissiveName = indicator3
    }
    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:4
	emissiveName = indicator4
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:5
	emissiveName = indicator5
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:6
	emissiveName = indicator6
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:7
	emissiveName = indicator7
    }

    //-------------------------------------------------------------------------
    // CONTROLLERS
    //-------------------------------------------------------------------------

    MODULE {
	name = ModuleCrewIndicatorToggle
	toggleName = indicatorToggle
    }
	
    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController0
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController1
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController2
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController3
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController4
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController5
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController6
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController7
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability0
        experimentID = crewReport
        lowValueColor = crewController0
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }

    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability1
        experimentID = crewReport
        lowValueColor = crewController1
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }

    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability2
        experimentID = crewReport
        lowValueColor = crewController2
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }

    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability3
        experimentID = crewReport
        lowValueColor = crewController3
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }
    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability4
        experimentID = crewReport
        lowValueColor = crewController4
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }
    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability5
        experimentID = crewReport
        lowValueColor = crewController5
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }
    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability6
        experimentID = crewReport
        lowValueColor = crewController6
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }
    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability7
        experimentID = crewReport
        lowValueColor = crewController7
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator0
	dataColor = crewController0
	emptyColor = availability0
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator1
	dataColor = crewController1
	emptyColor = availability1
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator2
	dataColor = crewController2
	emptyColor = availability2
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator3
	dataColor = crewController3
	emptyColor = availability3
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator4
	dataColor = crewController4
	emptyColor = availability4
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator5
	dataColor = crewController5
	emptyColor = availability5
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator6
	dataColor = crewController6
	emptyColor = availability6
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator7
	dataColor = crewController7
	emptyColor = availability7
    }


}

@PART[TaurusScienceBay] {
// add crew indicators
//	Slow blink when research is on, 
//	Fast blink for non-scientists in part


    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = -0.37, 0.10, 1.775
	rotation = 0, 0, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = -0.37, 0.00, 1.775
	rotation = 0, 0, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = -0.37, -0.10, 1.775
	rotation = 0, 0, 0
    }

    //-------------------------------------------------------------------------
    // CONTROLLABLE EMISSIVES
    //-------------------------------------------------------------------------

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:0
	emissiveName = indicator0
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:1
	emissiveName = indicator1
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:2
	emissiveName = indicator2
    }

    //-------------------------------------------------------------------------
    // CONTROLLERS
    //-------------------------------------------------------------------------

    // Master switch that turns all the crew indicators on/off.
    MODULE {
	name = ModuleCrewIndicatorToggle
	toggleName = indicatorToggle
    }

    // Evaluates to true when research is happening.
    MODULE {
	name = ModuleConverterIndicator
	converterName = Research
    }

    // Indicator for slot 0.
    MODULE {
	name = ModuleCrewIndicator
	controllerName = crew0
    }
    MODULE {
	name = ModuleBooleanIndicator
	emissiveName = indicator0
	input = hasCrewEffect(ScienceSkill, 0)
	activeColor = if(ModuleConverterIndicator, pulsate(crew0, 600, 0.5), crew0)
	inactiveColor = blink(dim(crew0, 0.7), 150, $Off, 650)
    }

    // Indicator for slot 1.
    MODULE {
	name = ModuleCrewIndicator
	controllerName = crew1
    }
    MODULE {
	name = ModuleBooleanIndicator
	emissiveName = indicator1
	input = hasCrewEffect(ScienceSkill, 1)
	activeColor = if(ModuleConverterIndicator, pulsate(crew1, 600, 0.5), crew1)
	inactiveColor = blink(dim(crew1, 0.7), 150, $Off, 650)
    }

    // Indicator for slot 2.
    MODULE {
	name = ModuleCrewIndicator
	controllerName = crew2
    }
    MODULE {
	name = ModuleBooleanIndicator
	emissiveName = indicator2
	input = hasCrewEffect(ScienceSkill, 2)
	activeColor = if(ModuleConverterIndicator, pulsate(crew2, 600, 0.5), crew2)
	inactiveColor = blink(dim(crew2, 0.7), 150, $Off, 650)
    }
}

@PART[TaurusHCV] {
// Add crew indicator and flash for crew report available

    // We have to re-specify the model for the stock part, because this is
    // an older part that uses the "mesh =" syntax in its .cfg file instead
    // of the newer "MODEL" syntax. The "mesh =" syntax doesn't allow having
    // multiple models as part of the same part, which would prevent this mod
    // from adding meshes for the indicator lights.
    MODEL
    {
	model = SpaceTuxIndustries/RecycledParts/RSCapsuledyne/Parts/TaurusHCV/model
    }

    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------

    MODEL {
	model = IndicatorLights/Meshes/squareLamp
	scale = 0.8, 0.4, 0.4
	position = -0.096, -0.28, 1.477	
	rotation = -30, 352.5, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/squareLamp
	scale = 0.8, 0.4, 0.4
	position = 0.0, -0.28, 1.485
	rotation = -30, 0, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/squareLamp
	scale = 0.8, 0.4, 0.4
	position = 0.096, -0.28, 1.477
	rotation = -30, 7.5, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/squareLamp
	scale = 0.8, 0.4, 0.4
	position = -0.134, -0.67, 1.712
	rotation = -30, 352.5, 0
    }
    MODEL {
	model = IndicatorLights/Meshes/squareLamp
	scale = 0.8, 0.4, 0.4
	position = -0.045, -0.67, 1.724
	rotation = -30, 352.5, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/squareLamp
	scale = 0.8, 0.4, 0.4
	position = 0.045, -0.67, 1.724
	rotation = -30, 7.5, 0
    }

    MODEL {
	model = IndicatorLights/Meshes/squareLamp
	scale = 0.8, 0.4, 0.4
	position = 0.134, -0.67, 1.712
	rotation = -30, 7.5, 0
    }

    //-------------------------------------------------------------------------
    // CONTROLLABLE EMISSIVES
    //-------------------------------------------------------------------------

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/squareLamp:0
	emissiveName = indicator0
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/squareLamp:1
	emissiveName = indicator1
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/squareLamp:2
	emissiveName = indicator2
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/squareLamp:3
	emissiveName = indicator3
    }
    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/squareLamp:4
	emissiveName = indicator4
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/squareLamp:5
	emissiveName = indicator5
    }

    MODULE {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/squareLamp:6
	emissiveName = indicator6
    }

    //-------------------------------------------------------------------------
    // CONTROLLERS
    //-------------------------------------------------------------------------

    MODULE {
	name = ModuleCrewIndicatorToggle
	toggleName = indicatorToggle
    }
	
    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController0
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController1
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController2
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController3
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController4
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController5
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleCrewIndicator
	controllerName = crewController6
        toggleName = indicatorToggle
    }

    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability0
        experimentID = crewReport
        lowValueColor = crewController0
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }

    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability1
        experimentID = crewReport
        lowValueColor = crewController1
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }

    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability2
        experimentID = crewReport
        lowValueColor = crewController2
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }

    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability3
        experimentID = crewReport
        lowValueColor = crewController3
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }
    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability4
        experimentID = crewReport
        lowValueColor = crewController4
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }
    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability5
        experimentID = crewReport
        lowValueColor = crewController5
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }
    MODULE {
        name = ModuleScienceAvailabilityIndicator
	controllerName = availability6
        experimentID = crewReport
        lowValueColor = crewController6
        mediumValueColor = highValueColor
        highValueColor = blink(lowValueColor, 200, $Off, 200)
    }
    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator0
	dataColor = crewController0
	emptyColor = availability0
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator1
	dataColor = crewController1
	emptyColor = availability1
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator2
	dataColor = crewController2
	emptyColor = availability2
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator3
	dataColor = crewController3
	emptyColor = availability3
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator4
	dataColor = crewController4
	emptyColor = availability4
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator5
	dataColor = crewController5
	emptyColor = availability5
    }

    MODULE {
	name = ModuleScienceDataIndicator
        experimentID = crewReport
        emissiveName = indicator6
	dataColor = crewController6
	emptyColor = availability6
    }

    //-------------------------------------------------------------------------
    // TWEAKS
    //-------------------------------------------------------------------------

    // This pod uses a ModuleColorChanger to handle its cabin lights, set up
    // so that by default it takes control of *all* emissives on the part.
    // Need to tell it not to tinker with the meshes that we're adding here;
    // otherwise, the crew indicator will just turn on and off with the cabin
    // lights instead of actually working as a crew indicator.
    @MODULE[ModuleColorChanger] {
	excludedRenderer = IndicatorLights/Meshes/squareLamp(Clone)
    }
}

 

DY8ZEKK.png

 

Crew Indicators for the Station Science Mod. Adds crew indicators to the 2 crewable components. Again it mimics the functionality Snark set for the stock science lab. 

Spoiler

// Adds occupancy indicators to the Station Science TH-NKR & Zoology Science Lab

@PART[StnSciLab,StnSciZoo]:NEEDS[StationScience]
{

    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------

    MODEL
    {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = 0.38, 0.15, -1.455
	rotation = 0, 180, 0
    }

    MODEL
    {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = 0.38, 0.05, -1.455
	rotation = 0, 180, 0
    }

    MODEL
    {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = 0.38, -0.05, -1.455
	rotation = 0, 180, 0
    }

    MODEL
    {
	model = IndicatorLights/Meshes/nubbinLamp
	scale = 0.7, 0.7, 0.9
	position = 0.38, -0.15, -1.455
	rotation = 0, 180, 0
    }


    //-------------------------------------------------------------------------
    // CONTROLLABLE EMISSIVES
    //-------------------------------------------------------------------------

    MODULE
    {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:0
	emissiveName = indicator0
    }

    MODULE
    {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:1
	emissiveName = indicator1
    }

    MODULE
    {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:2
	emissiveName = indicator2
    }

    MODULE
    {
	name = ModuleControllableEmissive
	target = IndicatorLights/Meshes/nubbinLamp:3
	emissiveName = indicator3
    }

    //-------------------------------------------------------------------------
    // CONTROLLERS
    //-------------------------------------------------------------------------

    // Master switch that turns all the crew indicators on/off.
    MODULE
    {
	name = ModuleCrewIndicatorToggle
	toggleName = indicatorToggle
    }

    // Evaluates to true when research is happening.
    MODULE
    {
	name = ModuleConverterIndicator
	converterName = #autoLOC_scilab_converter
    }

    // Indicator for slot 0.
    MODULE
    {
	name = ModuleCrewIndicator
	controllerName = crew0
    }
    MODULE
    {
	name = ModuleBooleanIndicator
	emissiveName = indicator0
	input = hasCrewEffect(ScienceSkill, 0)
	activeColor = if(ModuleConverterIndicator, pulsate(crew0, 600, 0.5), crew0)
	inactiveColor = blink(dim(crew0, 0.7), 150, $Off, 650)
    }
    // Indicator for slot 1.
    MODULE
    {
	name = ModuleCrewIndicator
	controllerName = crew1
    }
    MODULE
    {
	name = ModuleBooleanIndicator
	emissiveName = indicator1
	input = hasCrewEffect(ScienceSkill, 1)
	activeColor = if(ModuleConverterIndicator, pulsate(crew1, 600, 0.5), crew1)
	inactiveColor = blink(dim(crew1, 0.7), 150, $Off, 650)
    }
    // Indicator for slot 2.
    MODULE
    {
	name = ModuleCrewIndicator
	controllerName = crew2
    }
    MODULE
    {
	name = ModuleBooleanIndicator
	emissiveName = indicator2
	input = hasCrewEffect(ScienceSkill, 2)
	activeColor = if(ModuleConverterIndicator, pulsate(crew2, 600, 0.5), crew2)
	inactiveColor = blink(dim(crew2, 0.7), 150, $Off, 650)
    }
    // Indicator for slot 3.
    MODULE
    {
	name = ModuleCrewIndicator
	controllerName = crew3
    }
    MODULE
    {
	name = ModuleBooleanIndicator
	emissiveName = indicator3
	input = hasCrewEffect(ScienceSkill, 3)
	activeColor = if(ModuleConverterIndicator, pulsate(crew3, 600, 0.5), crew3)
	inactiveColor = blink(dim(crew3, 0.7), 150, $Off, 650)
    }
}

 

 

Link to comment
Share on other sites

  • 2 weeks later...

@Tonka Crash, thank you for taking the time and effort to add indicators to more mod parts!  :D

I'm sorry for the delay in replying-- I've been exceptionally busy IRL recently.  I'll add these in to the mod and release an update as soon as I have a chance.  Might be a little while longer, but just wanted to let you know that I'm not ignoring you.  ;)

Thanks for your public-spirited contribution, I appreciate it!

Link to comment
Share on other sites

  • 2 months later...

@Snark I have a fuel cell with non-functional lights as part of it's texture. What I want is are two lights one green and one red that indicate the state.

  1. Fuel Cell On the green light is on and the red is dim.
  2. Fuel Cell Off, the red is on and the green is dim. 

I'm having problems with the logical names using the $Name syntax. These are the controllers like I think they should work.

	MODULE { // Green Light
		name = ModuleConverterIndicator
		converterName = Fuel Cell
		emissiveName = fuelcellon
		activeColor = $On
		inactiveColor = dim($On,0.5)
	}
	MODULE { // Red Light
		name = ModuleConverterIndicator
		converterName = Fuel Cell
		emissiveName = fuelcelloff
		activeColor = dim($WarningColor,0.5)
		inactiveColor = $WarningColor
	}

What I get are two lights blinking red/green/blue/off over and over regardless of the fuel cell being on or off. If I change the $Name syntax and use explicit RGB strings #FF0000 and #00FF00 for red and green everything behaves like I want, but I'd rather use the logical names if possible

Link to comment
Share on other sites

1 hour ago, Tonka Crash said:

What I get are two lights blinking red/green/blue/off over and over regardless of the fuel cell being on or off.

That red-green-blue-off pattern is a deliberate warning signal-- it's IndicatorLights' standard output to let you know "the config is in error, something's wrong".  Any time you see that, it means that your config is invalid in some way and IndicatorLights can't process it.  Every time IL ever emits that error signal, it should always log an error message with very specific details about exactly what it doesn't like.  Have you checked your error log for details?

Also, in the list of supported logical colors here, I'm not seeing any "On" or "WarningColor".  Where are you getting those from?

The closest thing to a "logical 'on'" default color would be $ToggleLED (it's configured to bright green by default).  As for your "it's turned off" mode, there's a $Warning, but that doesn't really seem appropriate here-- that's the logical color for "watch out, something's wrong!" which is not really what you want here, I'd think.  Maybe $LowResource would come closest to the logical meaning of what you're trying to do.

Link to comment
Share on other sites

7 minutes ago, Snark said:

Have you checked your error log for details?

I have now that you explained what the blinking meant and that there should be log messages. ;)

Invalid color source '$On' specified for ModuleConverterIndicator...: Can't find a color source named '$On'
Invalid color source '$WarningColor' specified for ModuleConverterIndicator...: Can't find a color source named '$WarningColor'

It just confirms that the keywords I'd been using were incorrect. I'd guessed that since $Off works, would be a $On. It looks like $ToggleLED is what's serves as an 'on' color. And I needed $Warning from the DefaultColor.cs file instead of $WarningColor from the config.xml file where I'd originally looked. I got it working like I want.

Link to comment
Share on other sites

  • 1 month later...

I have seen some misplaces lights with "Restock" mod. Are you aware of that ?

 

Answer below, found in restock thread :

IndicatorLights: Some lights are in the wrong positions for replaced parts, working on a fix, no eta

Edited by chateaudav
Link to comment
Share on other sites

  • 2 months later...

(Conversation continued from the main IndicatorLights thread)

7 hours ago, VoidSquid said:

Sigh... I wish there's be a IL-config for the old K2 pod, but I guess nobody would be willing to make that efforts.

49 minutes ago, VoidSquid said:

Old 1.25m 2-Kerbals pod, but with the respektive MH pod, I doubt that anyone would still like to do the necessary work.

Well, you could, if you were so inclined.  ;)  The config files are pretty straightforward, you could just take (for example) the IndicatorLights config for Making History's Mk2 pod and then fiddle with (X,Y,Z) coordinates and such until it looks right.

It would take some finicky trial-and-error fiddling to get the coordinates just so, of course.  But it's not <ahem> rocket science, just tedium.  And if you did it, you could contribute it here and then everyone could get the benefit.

Just something to think about, if you really want it!

Link to comment
Share on other sites

You're tempting me, Snark, aren't you? :D
For the heck of it, I might actually try that.
Question: is there a simple key combination to reload the parts in-game (i.e. avoiding the loooong loading times when restarting the whole game)?

Edited by VoidSquid
Link to comment
Share on other sites

4 minutes ago, VoidSquid said:

You're tempting me, Snark, aren't you? :D
For the heck of it, I might actually try that.
Question: is there a simple key combination to reload the parts in-game (i.e. avoiding the loooong loading times when restarting the whole game)?

Yes and no...

Alt-F11 will reload Module Manager's database.  Possibly paired with an Alt-F12 to reload the main database.  Between the two you can reload the parts in-game - and it will take as long as restarting.  ;)  (Plus be slightly buggier than restarting.)

I'd recommend a paired-down install with just stock, the K2, and Indicator Lights for your testing/development.

Link to comment
Share on other sites

Slow down, mate, I haven't decided yet if I'll try ;)
But thanks for the tip :)

My main problems here:
I'm quite untalented.
I'm lazy :D 

 

Partially related:
I remember the time when I played WoW. Many people were upset and totally against buying in-game currency for real money, crying "cheating" was the least...

See, I work some 60 hours per week. In the end, I'm selling my time for money.
Take a student (or someone unemployed, etc.): not much money, but lots of time. They invest their time to farm mentioned in-game currency, essentially investing their time.
Now you tell me: I sell my time to my boss. Those people invest their time for farming in-game currency, which I buy. In the end, I sell my time to buy stuff other people invest their time for. Where is the problem?

I mean, let's say I want to buy a bread. In the end, I pay with the reward for the time I sell to my boss. I buy something other people have made by selling their time to their boss.
I call that economy, and where is the "cheating" here?

Tl;dr: anyone up to make that config for the K2-pod, let me know :)

Edited by VoidSquid
Link to comment
Share on other sites

40 minutes ago, VoidSquid said:

Tl;dr: anyone up to make that config for the K2-pod, let me know :)

Most people here have jobs and do this in our free time. We all consider our free time valuable. If it's important to you, you need to figure out how to do it for yourself. I don't see anybody going around volunteering to add indicators to random parts they don't use. I've done several patches for mods, but this starts with me wanting the functionality on parts I use, never because someone else wanted it. 

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