Jump to content

[1.12.x] IndicatorLights v1.8.3: Small, convenient, informative.


Snark

Recommended Posts

Just now, Beetlecat said:

Yeah, it's pulling me away from TR/TRR in favor just simpler skybox or suit replacements. I *do* like being able to take the helmet off my Kerbals from time to time, though. ;)

(I know this is off-topic, but I have to share in the utter bafflement at that particular situation. Not to mention Sigma replacements, etc. ;) )

Sometimes there can be perfectly legitimate reasons for multiple forks of a mod to exist.  And I'm certainly not dissing anybody about TR.

Just, given that there are multiple forks out there, as a modder I am now going to make absolutely zero effort to stay on top of TR when I'm updating my mods.  Because you can't hit a target if you're seeing double.

It might not be a problem if I were a player, because as a player, you don't necessarily have to care about the existence of multiple forks.  You just pick whichever one works for you and use that one.  Problem solved.  But as a modder who's trying to maintain compatibility, the question arises "compatibility with which one?"-- it becomes an impossible task.  So, yeah, not gonna go there anymore.

Link to comment
Share on other sites

@Snark I'm having a small problem. I'm adding lights to the old Taurus HCV mod and it has a combined battery and reaction wheel part. In the photo these are the pairs of green lights on the reaction wheel between the capsule and hitchhiker parts. 

The upper lights in each pair are battery and lower lights are for reaction wheel.  I copied the format you had for a squad battery and reaction wheel to set up my patch. The indicators change colors correctly, but the intensity of the reaction wheel lights are much dimmer than the battery lights. They appeared to be the same intensity in the VAB but get dimmer on the launchpad. All reaction wheel colors are dim for the different modes. The patch for the part is below the photo.

Edit to Add: I went back and looked at stock components and reaction wheels are just dimmer than other lights.

Any ideas?  

DY8ZEKK.png

Spoiler

@PART[Size3SASBatt] {
	@description ^= :(.)$:$0 Indicator lights show the reaction wheel's status.:
	
	// 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/SASBatt/model
	}
	
	//-------------------------------------------------------------------------
	// INDICATOR MESHES
	//-------------------------------------------------------------------------

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.8, 0.4, 1
		position = -1.326, -0.02, 1.326
		rotation = 0, -45, 0
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.8, 0.4, 1
		position = 1.326, -0.02, -1.326
		rotation = 0, 135, 0
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.8, 0.4, 1
		position = 1.326, -0.02, 1.326
		rotation = 0, 45, 0
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.8, 0.4, 1
		position = -1.326, -0.02, -1.326
		rotation = 0, 225, 0
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.8, 0.4, 1
		position = -1.326, 0.02, 1.326
		rotation = 0, -45, 0
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.8, 0.4, 1
		position = 1.326, 0.02 -1.326
		rotation = 0, 135, 0
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.8, 0.4, 1
		position = 1.326, 0.02 1.326
		rotation = 0, 45, 0
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.8, 0.4, 1.
		position = -1.326, 0.02 -1.326
		rotation = 0, 215, 0
	}


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

	MODULE {
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp:0,1,2,3
		emissiveName = SASindicator
	}
	MODULE {
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp:4,5,6,7
		emissiveName = BATTindicator
	}
	

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

	MODULE {
		name = ModuleReactionWheelIndicator
		emissiveName = SASindicator
	}


	MODULE {
		name = ModuleResourceLevelIndicator
	}

	MODULE {
		name = ModuleResourceEnabledIndicator
		enabledColor = ModuleResourceLevelIndicator
		disabledColor = blink(ModuleResourceLevelIndicator, 900, $Off, 300)
		emissiveName = BATTindicator
	}
}

 

Edited by Tonka Crash
Link to comment
Share on other sites

1 hour ago, Tonka Crash said:

I went back and looked at stock components and reaction wheels are just dimmer than other lights.

Yep, that's by design.  The idea is that the indicators on the reaction wheel have three brightness states:

  • Off:  the reaction wheel is disabled or has no electricity
  • Dim:  the reaction wheel is functional, but not currently "running" (e.g. you're not applying torque via the controls, and SAS is turned off)
  • Bright:  the reaction wheel is not only functional but currently in active use

Try toggling SAS on while you're sitting on the pad-- you should see them light up brighter.

Link to comment
Share on other sites

1 hour ago, Tonka Crash said:

@Snark thanks, that's it. I'd never noticed before. I use MechJeb's SmartASS much more than the stock SAS. WIth MechJeb they don't change brightness, but that's probably something you can't capture.

Yeah I notice that, too, with MJ. I use to use Smartass a lot, but I use Stock more now.

Link to comment
Share on other sites

On 10/25/2018 at 9:25 PM, Beetlecat said:

Dropped an Issue on the github re: Mk-1 Inline.

Yep, I never happened to get around to adding an indicator to that particular part.  A combination of having trouble making up my mind where to put it (that part's a little awkward, nowhere I tried looked quite "right" to me), plus I was just getting tired with the tedium of adding indicators painstakingly to a bazillion different crewed parts.

Thanks for calling my attention to it; had forgotten that I had never gotten around to that one.  I'll try to get to it at some point.  No promises about schedule, though.  ;)

Link to comment
Share on other sites

Hi all,

I've released IndicatorLights version 1.4.1, now with a crew indicator for the Mk1 inline cockpit.

MkVLBEb.png

Thanks to @Beetlecat for pointing it out!

Other than the new indicator on this part, this version also updates IndicatorLights to the latest ModuleManager, 3.1.0.

Enjoy!

Link to comment
Share on other sites

Is it possible to make the indicator lights consume EC?

Like by adding
 

		%resourceAmount = 0.1
		@resourceAmount *= #$/mass$
		%useResources = true

to a module, like the ModuleControllableEmissive or the ModuleToggleLED ?

This works for HAS[@MODULE[ModuleAnimateGeneric]:HAS[#animationName[*Light*]|#defaultActionGroup[Light]]] btw

Edit:

I will test it with this one. I hope I can see a difference in EC consumption if it works - it will be 0.002 EC/s for a Clamp-O-Tron Docking Port Jr.:

@PART[*]:HAS[@MODULE[ModuleToggleLED]:HAS[#defaultActionGroup[Light]]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleToggleLED]
	{
		%resourceAmount = 0.1
		@resourceAmount *= #$/mass$
		%useResources = true
	}
}

 

Perhaps this one?

@PART[*]:HAS[@MODULE[ModuleControllableEmissive]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleControllableEmissive],*
	{
		%resourceAmount = 0.1
		@resourceAmount *= #$/mass$
		%useResources = true
	}
}

Or - if it's even possible - do I have to patch the indicator modules, like ModuleCrewIndicator, ModuleScienceContainerIndicator etc.?

Edited by Gordon Dry
Link to comment
Share on other sites

Or better (or worse?) it could even be this one:

Spoiler

@PART[*]:HAS[@MODULE[ModuleBiomeScannerIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleBiomeScannerIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleBooleanIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleBooleanIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleConverterIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleConverterIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleCrewIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleCrewIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleCustomBlink]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleCustomBlink],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleDataTransmitterIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleDataTransmitterIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleDockingCrossfeedIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleDockingCrossfeedIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleDockingStateIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleDockingStateIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleOrbitalSurveyorIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleOrbitalSurveyorIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleReactionWheelIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleReactionWheelIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleReactionWheelIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleReactionWheelIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleResourceEnabledIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleResourceEnabledIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleResourceLevelIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleResourceLevelIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleResourceScannerIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleResourceScannerIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleScalarIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleScalarIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleScienceAvailabilityIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleScienceAvailabilityIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleScienceContainerIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleScienceContainerIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

@PART[*]:HAS[@MODULE[ModuleScienceDataIndicator]]:NEEDS[IndicatorLights]:FINAL
{
	@MODULE[ModuleScienceDataIndicator],*
	{
		%resourceAmount = 0.001
		%useResources = true
	}
}

 

Which fixes each instance of an indicator light to consume 0.001 EC/s (1 W). When it works. And when it only consumes when the light is on ...

Edited by Gordon Dry
Link to comment
Share on other sites

26 minutes ago, JH4C said:

As there's no way to turn these lights off, I'm loathe to see them using any significant amount of charge. LEDs use infinitesimal amounts of power anyway, even assigning 1W per light is overkill.

Most of them can toggle off through the right click menu of the parent part.

Gordon can do whatever he wants in his own game, but I'm against power requirements stock as these are really about visually providing information that is otherwise lacking without digging through right click menus. I also think a flat rate would be incorrect, it should be viewed based on the size of the light. For example I added lights to the KOOSE mod to number the pod bays that took 21 indicators on one part. As implemented it's really 6 small panels made up of clusters of lights to label bays. This would be a case where any power draw should be based on x6 not x21 as the equivalent area covered by lights are 6 times the largest of the lights. Indicator lights are generally enormously oversized for playability where in real life similar indicators would probably be too small to see easily for the view distances common in the game.

For some comparisons:

Common LED's are around 20mA at 12V so .024 Watts 

Aviation formation lights "Slime Lights" : https://utcaerospacesystems.com/wp-content/uploads/2018/04/09_0022-Formation-Lights-2LA005094-XX-and-2LA006608-XX.pdf  The smallest of the lights 420x90mm 115 VAC@ 7 mA = .8 Watt for a light larger than most indicator lights except maybe some of the Dock SR. lights. 

 

Link to comment
Share on other sites

14 hours ago, Gordon Dry said:

Is it possible to make the indicator lights consume EC?

I'm sure it's possible with appropriate ModuleManager sleight-of-hand.  It's not something whose steps I've ever investigated myself, since it's not something I would do in my own gameplay (and therefore not something I plan on ever adding to the mod).

But if you can get it to work in your own game... more (ahem) power to you.  (So to speak. /rimshot )  :cool:

1 hour ago, JH4C said:

As there's no way to turn these lights off, I'm loathe to see them using any significant amount of charge. LEDs use infinitesimal amounts of power anyway, even assigning 1W per light is overkill.

Yep.  In real life, LED indicator lights use vanishingly tiny amounts of electricity.  Especially when you bear in mind that an actual real device with an LED light on it would likely have a little lamp a few millimeters across, not these huge things in IndicatorLights that are multiple centimeters across.  I made 'em that huge size in the game because, well, it's a game, where the player's camera view of the ship is often from dozens of meters away at least, so it needs to be big enough to show up on the player's screen.

Also, IRL, if the LEDs were in a situation where power consumption were of even the slightest concern, presumably they'd be implemented to just briefly flicker the LED once every few seconds or something, rather than being continuously lit.

So... IRL, the power consumption of LED indicators simply isn't an issue.  At all.  Just as an example-- stick a single 9V battery in a smoke detector, for example, and  it'll flicker the "I'm working" LED for years.

So that's my "plausibility excuse" for not having the LEDs drain power.  But it's actually not my real reason.  My real reason is simply that they don't drain power because I don't want them to.  It's not something I would enjoy, it's not something that I would feel would add "realism" or interesting challenge to my game when I'm playing KSP, and as far as I'm concerned the purpose of IndicatorLights is information management, not power management.

It's just not what I want the mod to do.  So, they don't drain power, and they never will.  ;)

32 minutes ago, Tonka Crash said:

I'm against power requirements stock as these are really about visually providing information that is otherwise lacking without digging through right click menus.

^ Yep, pretty much this.  No worries, IndicatorLights indicators will never drain power in "stock", since it's not what I want from the mod.

However, if folks such as Gordon Dry want to ModuleManager-tweak their own games to make it do so-- good for them, not everyone wants the same thing.  ;)

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Hi all,

Just a note that I've released IndicatorLights 1.4.2, for KSP 1.6 compatibility. ;)

This update adds crew indicators to the revamped Mk2 lander can:

Mk2Can.png

Also, this release updates ModuleManager to the latest version, 3.1.2.

Enjoy!  :)

Link to comment
Share on other sites

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