Jump to content

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


Snark

Recommended Posts

Hi all,

I'm pleased to announce the release of IndicatorLights Community Extensions v1.5, with support added to the following mods:

Thanks to our public-spirited contributors!

(And many apologies to Tonka Crash, who submitted his patch way back in October and I then somehow managed to lose track of until now, because I suck.)

Link to comment
Share on other sites

On 6/4/2019 at 8:07 PM, Snark said:

Well, I'll tell ya, there's one thing that I know would be in high demand.  Be warned that it would be a huge job, but by the same token, would be an extremely valuable service to the community and I expect hundreds, if not thousands, of users might benefit (dunno the numbers):  ReStock.

[...]

But if someone wanted to take one for the team and go down in legend and song for making these two mods play nice together, that's the one big "compatibility hole" that I'm currently aware of.  Just sayin', is all.

Legend and song, you say? Best get the bards to work...

I've cobbled together a compatibility patch to make ReStock and Indicator Lights play nicely together. This was tedious, repetitive, boring, thankless work that took far, far too long. But, due to having a bit of time off work and sheer bloody-mindedness, I persevered. I've tested the functionality of all the parts, and I'm quite happy with the results, so I thought I'd share.

List of patched parts:

Spoiler

Antennas:
Communotron 16
Communotron 16-S
Communotron 88-88
Communotron DTS-M1
Communotron HG-5
Communotron HG-55

Note: I didn't add lights to the RA-2, RA-15 and RA-100 relay antennas, as in ReStock they have variants that use models with different heights. It might be possible to get the lights to appear on those variants using GAMEOBJECTS, but it didn't seem worth the effort of figuring it out.

Batteries:
Z-100 radial battery
Z-200 battery bank
Z-400 radial battery
Z-1K battery bank
Z-4K battery bank

Note: Many ReStock batteries have a green emissive glow that does not change colour along with the indicator lights. It's not really very noticeable (check the screenshots), but if it is bothersome, it can be fixed by modifying "GameData\ReStock\Assets\Electrical\restock-batteries-1-e.dds" and "restock-batteries-2-e.dds" to remove the glow in those places. Replacing those files with textures that are all black would probably also work. Deleting those files will not work: the entire part will be white. It is not possible to distribute modified versions of those files, as the licence for ReStock does not permit it (which is entirely fair enough, obviously).

Crewed parts:
PPD-10 Hitchhiker Storage Container
PPD-12 Cupola Module
Mk1 Command Pod
Mk1-3 Command Pod
Mk1 Lander Can
Mk2 Lander Can
Mobile Processing Lab MPL-LG-2

Docking ports:
Clamp-O-Tron Docking Port Jr.
Clamp-O-Tron Docking Port
Clamp-O-Tron Docking Port Sr.

SAS:
Small Inline Reaction Wheel

Note: the Advanced Inline Stabilizer and Advanced Inline Reaction Wheel, Large had functioning lights already and did not require patching.

Science:
2HOT Thermometer
Atmospheric Fluid Spectro-Variometer
Double-C Seismic Accelerator
Experiment Storage Unit
GRAVMAX Negative Gravioli Detector
Mystery Goo Containment Unit
PresMat Barometer
SC-9001 Science Jr.

Note: the Surface Scanning Module already had a well-placed light and did not require patching.

 

If I've missed any parts, people are free to let me know. I may go and add lights to those parts. Equally, I may just say "you know what, I don't care", as this was incredibly tedious work that I would have given up on if I wasn't so stubborn.

If anyone notices any lights that they think aren't lined up right, feel free to fiddle with the positions yourselves. They're good enough for me. :P

The patches:

Spoiler

//---------------------------------------------------------------------------//
// Compatibility patches for IndicatorLights and ReStock                     //
//---------------------------------------------------------------------------//

//---------------------------------------------------------------------------//
// Antennas                                                                  //
//---------------------------------------------------------------------------//
// RA-2 Relay Antenna, RA-15 Relay Antenna, RA-100 Relay Antenna:
// No indicator lights for these parts, as they have variants with different height models.

// Communotron 16
@PART[longAntenna]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		position = 0, 0, 0
		scale = 1.6, 1.6, 2.5
		rotation = -90, 0, 0
	}
}

// Communotron 16-S
@PART[SurfAntenna]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = 0, 0.065, -0.003
		scale = 1.6, 0.5, 0.7
		rotation = 0, 0, 0
	}
}

// Communotron 88-88
@PART[commDish]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		position = 0, 0.17, 0
		scale = 5.7, 5.7, 6
		rotation = -90, 0, 0
	}
}

// Communotron DTS-M1
@PART[mediumDishAntenna]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = 0, 0.061, -0.5
		scale = 1.8, 0.5, 0.5
		rotation = -25, 0, 0
	}
}

// Communotron HG-5
@PART[HighGainAntenna5]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = -0.162, 0.036, -0.007
		scale = 1, 0.5, 1.15
		rotation = 0, 0, 90
	}
}

// Communotron HG-55
@PART[HighGainAntenna]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = 0.045, 0.121, 0.1
		scale = 2.5, 1, 0.8
	}
}


//---------------------------------------------------------------------------//
// Batteries                                                                 //
//---------------------------------------------------------------------------//
// ReStock batteries have a green emissive glow that doesn't change with the
// colour of the lamp. Fixing this requires modifying
// GameData\ReStock\Assets\Electrical\restock-batteries-1-e.dds and
// restock-batteries-2-e.dds, but the ReStock licence doesn't permit this.
// Deleting those files will not work. Replacing them with plain black will work.
// (I think - not tested.)

// 0.625m battery bank
@PART[batteryBankMini]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Electrical/restock-battery-0625-1
		position = 0.0, 0.0, 0.0
		scale = 1,1,1
		rotation = 0, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.6, 0.6, 1
		position = -0.141, -0.003, -0.245
		rotation = 0, 207, 0
	}
	@MODULE[ModuleControllableEmissive]
	{
		@target = IndicatorLights/Meshes/nubbinLamp
	}
}

// 1.25m battery bank
@PART[batteryBank]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Electrical/restock-battery-125-1
		position = 0.0, 0.0, 0.0
		scale = 1,1,1
		rotation = 0, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = 0.49, 0.03, -0.34
		rotation = 0, 130, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1.1
		position = 0.554, 0.03, -0.22
		rotation = 0, 120, 0
	}

	@MODULE[ModuleControllableEmissive]
	{
		@target = IndicatorLights/Meshes/nubbinLamp
	}
}

// 2.5m battery bank
@PART[batteryBankLarge]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Electrical/restock-battery-25-1
		position = 0.0, 0.0, 0.0
		scale = 1,1,1
		rotation = 0, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = 0.815, -0.028, -0.88
		rotation = 0, 130, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = 0.775, 0.027, -0.92
		rotation = 0, 135, 0
	}

	@MODULE[ModuleControllableEmissive]
	{
		@target = IndicatorLights/Meshes/nubbinLamp
	}
}

// Small radial battery
@PART[batteryPack]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Electrical/restock-battery-radial-small-1
		position = 0.0, 0.0, 0.0
		scale = 0.5, 0.5, 0.5
		rotation = 0, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/z100lamp
		scale = 0.35, 0.35, 0.35
		position = 0.021, 0.106, -0.05
		rotation = 270, 0, 0
	}
}

// Large radial battery
@PART[ksp_r_largeBatteryPack]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Electrical/restock-battery-radial-med-1
		position = 0.0, 0.0, 0.0
		scale = 1,1,1
		rotation = 0, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		position = -0.0225, 0.2725, -0.115
		scale = 0.58, 0.58, 0.58
		rotation = 180, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		position = 0.0225, 0.2725, -0.115
		scale = 0.58, 0.58, 0.58
		rotation = 180, 0, 0
	}
}


//---------------------------------------------------------------------------//
// Crewable                                                                  //
//---------------------------------------------------------------------------//

//Cupola
@PART[cupola]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.25, 0.5
		position = 0, -0.147, -1.37
		rotation = 0, 180, 0
	}
}

//Hitchhiker
@PART[crewCabin]:AFTER[zzzzStationParts]:NEEDS[IndicatorLights&ReStock]
{
  MODEL
  {
	  model = IndicatorLights/Meshes/nubbinLamp
	  scale = 0.7, 0.7, 0.9
	  position = 0.37, 0.16, -1.185
	  rotation = 0, 155, 0
  }
  MODEL
  {
	  model = IndicatorLights/Meshes/nubbinLamp
	  scale = 0.7, 0.7, 0.9
	  position = 0.37, 0.06, -1.185
	  rotation = 0, 155, 0
  }
  MODEL
  {
	  model = IndicatorLights/Meshes/nubbinLamp
	  scale = 0.7, 0.7, 0.9
	  position = 0.37, -0.04, -1.185
	  rotation = 0, 155, 0
  }
  MODEL
  {
	  model = IndicatorLights/Meshes/nubbinLamp
	  scale = 0.7, 0.7, 0.9
	  position = 0.37, -0.14, -1.185
	  rotation = 0, 155, 0
  }
}

//Mk1-3 pod
@PART[mk1-3pod]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.6, 0.6, 0.5
		position = -0.272, 0.825, -0.736
		rotation = -160, 15, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.6, 0.6, 0.5
		position = -0.2875, 0.745, -0.764
		rotation = -160, 15, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.6, 0.6, 0.5
		position = -0.303, 0.665, -0.793
		rotation = -160, 15, 0
	}
}

//Mk1 Lander Can
@PART[landerCabinSmall]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.25, 0.5
		position = 0, -0.215, -0.85
		rotation = 0, 180, 0
	}
}

//Mk1 Pod (v2)
@PART[mk1pod_v2]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1.15, 0.25, 0.5
		position = 0, 0.25, -0.435
		rotation = -160, 0, 0
	}
}

//Mk2 lander can (V2)
@PART[mk2LanderCabin_v2]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.24, 1, 0.5
		position = -0.185, 0.325, -1.378
		rotation = 0, 180, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.25, 1, 0.5
		position = -0.245, 0.745, 0
		rotation = -90, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.25, 1, 0.5
		position = 0.17, 0.325, -1.378
		rotation = 0, 180, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.25, 1, 0.5
		position = 0.245, 0.745, 0
		rotation = -90, 0, 0
	}
}

//Large science lab
@PART[Large_Crewed_Lab]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.25, 0.5
		position = 0, -0.225, -1.3
		rotation = 0, 180, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.25, 0.5
		position = 0, -0.225, 1.3
		rotation = 0, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.25, 0.5
		position = 0, 0.21, -1.3
		rotation = 0, 180, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.25, 0.5
		position = 0, 0.21, 1.3
		rotation = 0, 0, 0
	}
}


//---------------------------------------------------------------------------//
//Docking                                                                    //
//---------------------------------------------------------------------------//
// No docking port lights were functional unless I deleted all the MODEL and light-related
// MODULE nodes from the parts and recreated them.

//Large docking port
@PART[dockingPortLarge]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	-MODULE[ModuleColorChanger]{}
	-MODULE[ModuleControllableEmissive]{}
	-MODULE[ModuleToggleLED]{}
	-MODULE[ModuleDockingCrossfeedIndicator]{}
	-MODULE[ModuleDockingStateIndicator]{}

	MODEL
    {
      model = ReStock/Assets/Coupling/restock-docking-25-1
    }
    MODEL
    {
		model = ReStock/Assets/Command/restock-hatch-common-round-white-1
		position = 0.0, -0.085, 0.0
		scale = 0.821,0.821,0.821
		rotation = 180, 0, 0
    }
    %rescaleFactor = 1
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 2
		position = -0.0125, 0.26, -1.09
		rotation = 0, 90, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 2
		position = 0.946, 0.26, 0.535
		rotation = 0, -30, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 2
		position = -0.946, 0.26, 0.535
		rotation = 0, 30, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 0, 0.18, -1.3
		rotation = 0, 180, 90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 1.117, 0.18, 0.6475
		rotation = 0, 60, 90
	}
	MODEL
	{+
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = -1.117, 0.18, 0.6475
		rotation = 0, -60, 90
	}

	MODULE
	{
		name = ModuleColorChanger
		shaderProperty = _EmissiveColor
		animRate = 0.8
		animState = false
		useRate = true
		toggleInEditor = true
		toggleInFlight = true
		toggleInFlight = true
		unfocusedRange = 5
		toggleName = #autoLOC_502011 //#autoLOC_502011 = Toggle Lights
		eventOnName = #autoLOC_502012 //#autoLOC_502012 = Lights On
		eventOffName = #autoLOC_502013 //#autoLOC_502013 = Lights Off
		toggleAction = True
		defaultActionGroup = Light
		redCurve
		{
			key = 0 0 0 3
			key = 1 1 0 0
		}
		greenCurve
		{
			key = 0 0 0 1
			key = 1 1 1 0
		}
		blueCurve
		{
			key = 0 0 0 0
			key = 1 0.7 1.5 0
		}
		alphaCurve
		{
			key = 0 1
		}
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp2
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleToggleLED
		activeColor = ModuleDockingCrossfeedIndicator
		inactiveColor = $Off
		defaultActionGroup = Light
	}
	MODULE
	{
		name = ModuleDockingCrossfeedIndicator
	}
	MODULE
	{
		name = ModuleDockingStateIndicator
		emissiveName = indicator
		readyColor = ModuleToggleLED
		acquireColor = blink(ModuleDockingCrossfeedIndicator, 100, $Off, 100)
		disengageColor = blink(ModuleDockingCrossfeedIndicator, 120, $Off, 1080)
	}
}

//Medium docking port
@PART[dockingPort2]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	-MODULE[ModuleColorChanger]{}
	-MODULE[ModuleControllableEmissive]{}
	-MODULE[ModuleToggleLED]{}
	-MODULE[ModuleDockingCrossfeedIndicator]{}
	-MODULE[ModuleDockingStateIndicator]{}

	MODEL
    {
      model = ReStock/Assets/Coupling/restock-docking-125-1
    }
    MODEL
    {
      model = ReStock/Assets/Command/restock-hatch-common-round-white-1
      position = 0.0, -0.072, 0.0
      scale = 0.908,0.908,0.908
      rotation = 180, 0, 0
    }
    %rescaleFactor = 1
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 1, 1, 0.3
		position = -0.5331, 0.08, 0
		rotation = 0, 0, 20
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 1, 1, 0.3
		position = 0.5331, 0.08, 0
		rotation = 0, 0, -20
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 1
		position = 0, 0.08, -0.5331
		rotation = -20, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 1
		position = 0, 0.08, 0.5331
		rotation = 20, 0, 0
	}

	MODULE
	{
		name = ModuleColorChanger
		shaderProperty = _EmissiveColor
		animRate = 0.8
		animState = false
		useRate = true
		toggleInEditor = true
		toggleInFlight = true
		toggleInFlight = true
		unfocusedRange = 5
		toggleName = #autoLOC_502011 //#autoLOC_502011 = Toggle Lights
		eventOnName = #autoLOC_502012 //#autoLOC_502012 = Lights On
		eventOffName = #autoLOC_502013 //#autoLOC_502013 = Lights Off
		toggleAction = True
		defaultActionGroup = Light
		redCurve
		{
			key = 0 0 0 3
			key = 1 1 0 0
		}
		greenCurve
		{
			key = 0 0 0 1
			key = 1 1 1 0
		}
		blueCurve
		{
			key = 0 0 0 0
			key = 1 0.7 1.5 0
		}
		alphaCurve
		{
			key = 0 1
		}
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp2
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleToggleLED
		activeColor = ModuleDockingCrossfeedIndicator
		inactiveColor = $Off
		defaultActionGroup = Light
	}
	MODULE
	{
	name = ModuleDockingCrossfeedIndicator
	}
	MODULE
	{
		name = ModuleDockingStateIndicator
		emissiveName = indicator
		readyColor = ModuleToggleLED
		acquireColor = blink(ModuleDockingCrossfeedIndicator, 100, $Off, 100)
		disengageColor = blink(ModuleDockingCrossfeedIndicator, 120, $Off, 1080)
	}
}

//Small docking port
@PART[dockingPort3]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	-MODULE[ModuleColorChanger]{}
	-MODULE[ModuleControllableEmissive]{}
	-MODULE[ModuleToggleLED]{}
	-MODULE[ModuleDockingCrossfeedIndicator]{}
	-MODULE[ModuleDockingStateIndicator]{}

	MODEL
	{
		model = ReStock/Assets/Coupling/restock-docking-0625
	}
	%rescaleFactor = 1
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 0.6, 0.3
		position = -0.275, 0.05, 0
		rotation = 0, 0, 40
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 0.6, 0.3
		position = 0.275, 0.05, 0
		rotation = 0, 0, -40
	}

	MODULE
    {
		name = ModuleColorChanger
		shaderProperty = _EmissiveColor
		animRate = 0.8
		animState = false
		useRate = true
		toggleInEditor = true
		toggleInFlight = true
		toggleInFlight = true
		unfocusedRange = 5
		toggleName = #autoLOC_502011 //#autoLOC_502011 = Toggle Lights
		eventOnName = #autoLOC_502012 //#autoLOC_502012 = Lights On
		eventOffName = #autoLOC_502013 //#autoLOC_502013 = Lights Off
		toggleAction = True
		defaultActionGroup = Light
		redCurve
		{
			key = 0 0 0 3
			key = 1 1 0 0
		}
		greenCurve
		{
			key = 0 0 0 1
			key = 1 1 1 0
		}
		blueCurve
		{
			key = 0 0 0 0
			key = 1 0.7 1.5 0
		}
		alphaCurve
		{
			key = 0 1
		}
    }
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp2
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleToggleLED
		activeColor = ModuleDockingCrossfeedIndicator
		inactiveColor = $Off
		defaultActionGroup = Light
	}
	MODULE
	{
		name = ModuleDockingCrossfeedIndicator
	}
	MODULE
	{
		name = ModuleDockingStateIndicator
		emissiveName = indicator
		readyColor = ModuleToggleLED
		acquireColor = blink(ModuleDockingCrossfeedIndicator, 100, $Off, 100)
		disengageColor = blink(ModuleDockingCrossfeedIndicator, 120, $Off, 1080)
	}
}


//---------------------------------------------------------------------------//
// SAS                                                                       //
//---------------------------------------------------------------------------//
// Medium and large reaction wheels don't need patching.

//Small reaction wheel
@PART[sasModule]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Control/restock-reactionwheel-625-1
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.65, 0.65, 1
		position = 0, 0, 0.31
		rotation = 0, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.65, 0.65, 1
		position = 0, 0, -0.31
		rotation = 0, 180, 0
	}
}


//---------------------------------------------------------------------------//
// Science                                                                   //
//---------------------------------------------------------------------------//
// Surface scanning module doesn't need patching.

//Accelerometer
@PART[sensorAccelerometer]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Science/restock-accelerometer
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 1, 1, 0.5
		position = -0.0345, 0.085, -0.125
		rotation = -90, 0, 0
	}
}

//Barometer
@PART[sensorBarometer]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
	model = ReStock/Assets/Science/restock-barometer
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 1, 1, 0.5
		position = -0.0445, 0.115, -0.077
		rotation = -90, 0, 0
	}
}

//Goo
@PART[GooExperiment]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Science/restock-goocanister-radial-1
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.5, 1.7, 0.5
		position = -0.1842, 0, -0.325
		rotation = 0, -90, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.5, 1.7, 0.5
		position = 0.1842, 0, -0.325
		rotation = 0, 90, 0
	}
}

//Gravioli
@PART[sensorGravimeter]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Science/restock-gravimeter
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.6, 0.6, 0.6
		position = 0.0355, -0.0683, -0.1367
		rotation = -90, 0, 0
	}
}

//Science Box
@PART[ScienceBox]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Science/restock-sciencebox-radial
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.2, 4, 0.5
		position = -0.2245, -0.09, -0.225
		rotation = 0, 225, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.2, 4, 0.5
		position = 0.2245, -0.09, -0.225
		rotation = 0, 135, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.2, 4, 0.5
		position = 0.2245, -0.09, 0.225
		rotation = 0, 45, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.2, 4, 0.5
		position = -0.225, -0.09, 0.225
		rotation = 0, 315, 0
	}
}

//Materials
@PART[science_module]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Science/restock-materialbay-125-1
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.4, 0.5
		position = 0, -0.475, -0.6275
		rotation = 0, 180, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.4, 0.5
		position = 0, -0.475, 0.6275
		rotation = 0, 0, 0
	}
}

//Thermometer
@PART[sensorThermometer]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Science/restock-thermometer
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.6, 0.2, 0.5
		position = 0, 0.11616, -0.05018
		rotation = 0, 180, 0
	}
}

//Atmosphere sensor (variometer)
@PART[sensorAtmosphere]:AFTER[ReStock]:NEEDS[IndicatorLights]
{
	-MODEL,* {}
	MODEL
	{
		model = ReStock/Assets/Science/restock-GCMS-1
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 2, 0.3
		position = 0, 0.11416, -0.30133
		rotation = 0, 180, 90
	}
}

 

I kind of have a vague half-plan of doing the ReStock+ parts as well, but not right now.

Screenshots:

Spoiler

Antennas and reaction wheels:

Ieajzyc.png

tuRfAVO.png

 

Batteries:

SQL4fRC.png

 

Crewed parts:

E43X32x.png

yMhU8re.png

 

Docking ports:

9ssBxHp.png

 

Science parts:

UTLpnKz.png

Rhs06Fy.png

 

 

Edited by UnanimousCoward
Link to comment
Share on other sites

29 minutes ago, UnanimousCoward said:

Legend and song, you say? Best get the bards to work...

I've cobbled together a compatibility patch to make ReStock and Indicator Lights play nicely together. This was tedious, repetitive, boring, thankless work that took far, far too long. But, due to having a bit of time off work and sheer bloody-mindedness, I persevered. I've tested the functionality of all the parts, and I'm quite happy with the results, so I thought I'd share.

I regret the forum only allows me to give this post one 'like'.

Link to comment
Share on other sites

7 hours ago, UnanimousCoward said:

Legend and song, you say? Best get the bards to work...

I've cobbled together a compatibility patch to make ReStock and Indicator Lights play nicely together. This was tedious, repetitive, boring, thankless work that took far, far too long. But, due to having a bit of time off work and sheer bloody-mindedness, I persevered. I've tested the functionality of all the parts, and I'm quite happy with the results, so I thought I'd share.

nice. thank you.

7 hours ago, UnanimousCoward said:

I kind of have a vague half-plan of doing the ReStock+ parts as well, but not right now.

please?

6 hours ago, DStaal said:

I regret the forum only allows me to give this post one 'like'. 

^^^^^^ this

 

hmm.... wonder if UbioWeld (when it is working) could help - just weld the nubbin (or other) on and pull the information from the welded part...

Link to comment
Share on other sites

13 minutes ago, zer0Kerbal said:

hmm.... wonder if UbioWeld (when it is working) could help - just weld the nubbin (or other) on and pull the information from the welded part...

The lights are not conventional parts. So there's no way to grab and position them in the VAB

Link to comment
Share on other sites

1 minute ago, zer0Kerbal said:

most wonderful point, but what if I made a part.cfg for them? then could place, move and well, weld. ?

For simple things it might work, but part of deciding placement can often involve scaling each axis of a light independently. To be honest I don't see it being much different than just using NodeHelper to locate coordinates. By this point I've done dozens of parts and I think trying to using a welding mod would actually slow me down.

Link to comment
Share on other sites

8 hours ago, UnanimousCoward said:

Legend and song, you say? Best get the bards to work...

I've cobbled together a compatibility patch to make ReStock and Indicator Lights play nicely together. This was tedious, repetitive, boring, thankless work that took far, far too long. But, due to having a bit of time off work and sheer bloody-mindedness, I persevered. I've tested the functionality of all the parts, and I'm quite happy with the results, so I thought I'd share.

@UnanimousCoward, fantastic work, these look really great.  I just found out about ReStock and I was almost prepared to suffer without IL.  I'd recommend submitting this as is to @Snark to roll into another iteration of ILCE in the meantime, if you don't know if/when you'll get around to the ReStockPlus parts.

Link to comment
Share on other sites

@UnanimousCoward really excellent, thanks for taking one for the team!

Unfortunately it'll be a while (probably a few weeks) before I'm in a position to roll this into a new ILCE release, due to IRL stuff, but I'll definitely be looking into it as soon as I can.  ReStock compatibility is the most-requested IL feature in recent months, so I'd love to get your work out there where people can use it. :)

Link to comment
Share on other sites

On 6/7/2019 at 3:09 AM, zer0Kerbal said:

please?

Oh, OK then...

Parts patched:
Communotron DTS-J1
Communotron HG-20
Communotron HG-61
Clamp-O-Tron Docking Port 'Grande'
Mystery Goo Inline Containment Unit
SC-9001R Radial Science Jr.
Z-10K battery bank

Screenshot:

Spoiler

GapD82c.png


Patches:

Spoiler

//Compatibility patches for IndicatorLights and ReStock+

// Communotron HG-20
@PART[restock-relay-radial-2]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = -0.162, 0.036, -0.007
		scale = 1, 0.5, 1.15
		rotation = 0, 0, 90
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp2
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleDataTransmitterIndicator
		emissiveName = indicator
		busyColor = random($ToggleLED, $Off, divide(400, static(dataRate)), between(subtract(multiply(sqrt(static(dataRate)), 1.1), 2.3), -0.4, 0.5))
	}
}

// Communotron DTS-J1
@PART[restock-antenna-stack-2]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = -0.488, 0.083, -0.05
		scale = 0.35, 0.35, 0.35
		rotation = 90, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = -0.488, 0.083, 0.05
		scale = 0.35, 0.35, 0.35
		rotation = 90, 0, 0
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp2
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleDataTransmitterIndicator
		emissiveName = indicator
		busyColor = random($ToggleLED, $Off, divide(400, static(dataRate)), between(subtract(multiply(sqrt(static(dataRate)), 1.1), 2.3), -0.4, 0.5))
	}
}

//Communotron HG-61
@PART[restock-antenna-stack-3]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		position = 0, 0.512, 0
		scale = 1, 1, 1
		rotation = 90, 0, 0
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/nubbinLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleDataTransmitterIndicator
		emissiveName = indicator
		busyColor = random($ToggleLED, $Off, divide(400, static(dataRate)), between(subtract(multiply(sqrt(static(dataRate)), 1.1), 2.3), -0.4, 0.5))
	}
}

//Z-10K battery
@PART[restock-battery-375-1]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = 1.815, -0.03, -0.04
		rotation = 0, 90, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = 1.815, -0.03, 0.04
		rotation = 0, 90, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = -1.815, -0.03, -0.04
		rotation = 0, -90, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = -1.815, -0.03, 0.04
		rotation = 0, -90, 0
	}

	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/nubbinLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleResourceLevelIndicator
	}
	MODULE
	{
		name = ModuleResourceEnabledIndicator
		enabledColor = ModuleResourceLevelIndicator
		disabledColor = blink(ModuleResourceLevelIndicator, 900, $Off, 300)
		emissiveName = indicator
	}
}


//Clamp-O-Tron Docking Port 'Grande'
@PART[restock-docking-375-1]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	-MODULE[ModuleColorChanger]{}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 2
		position = 1.862, 0.0325, -0.01
		rotation = 0, 0, -90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 2
		position = -1.862, 0.0325, -0.01
		rotation = 0, 0, 90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 2
		position = -0.008, 0.0325, 1.861
		rotation = 0, 90, 90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 0, 0.0325, -1.865
		rotation = 0, 180, 90
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 0.0, 0.206, 0.914
		rotation = -90, 0, -90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 0.0, 0.206, -0.914
		rotation = -90, 0, -90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 0.914, 0.206, 0.0
		rotation = -90, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = -0.914, 0.206, 0.0
		rotation = -90, 0, 0
	}

	MODULE
    {
      name = ModuleColorChanger
      shaderProperty = _EmissiveColor
      animRate = 0.8
      animState = false
      useRate = true
      toggleInEditor = true
      toggleInFlight = true
      toggleInFlight = true
      unfocusedRange = 5
      toggleName = #autoLOC_502011 //#autoLOC_502011 = Toggle Lights
      eventOnName = #autoLOC_502012 //#autoLOC_502012 = Lights On
      eventOffName = #autoLOC_502013 //#autoLOC_502013 = Lights Off
      toggleAction = True
      defaultActionGroup = Light
      redCurve
      {
        key = 0 0 0 3
        key = 1 1 0 0
      }
      greenCurve
      {
        key = 0 0 0 1
        key = 1 1 1 0
      }
      blueCurve
      {
        key = 0 0 0 0
        key = 1 0.7 1.5 0
      }
      alphaCurve
      {
        key = 0 1
      }
    }
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp2
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleToggleLED
		activeColor = ModuleDockingCrossfeedIndicator
		inactiveColor = $Off
		defaultActionGroup = Light
	}
	MODULE
	{
		name = ModuleDockingCrossfeedIndicator
	}
	MODULE
	{
		name = ModuleDockingStateIndicator
		emissiveName = indicator
		readyColor = ModuleToggleLED
		acquireColor = blink(ModuleDockingCrossfeedIndicator, 100, $Off, 100)
		disengageColor = blink(ModuleDockingCrossfeedIndicator, 120, $Off, 1080)
	}
}

//Inline goo canister
@PART[restock-goocanister-625-1]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.75, 0.25, 0.5
		position = 0.0, -0.188, -0.325
		rotation = 0, 180, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.75, 0.25, 0.5
		position = 0.0, -0.188, 0.325
		rotation = 0, 0, 0
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleScienceDataIndicator
		emissiveName = indicator
		dataColor = $HighScience
		partialDataColor = $MediumScience
		lowDataColor = $LowScience
		emptyColor = ModuleScienceAvailabilityIndicator
	}
	MODULE
	{
		name = ModuleScienceAvailabilityIndicator
	}
}

//Radial materials bay
@PART[restock-materialbay-radial-1]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.4, 0.5
		position = 0.0, -0.41, -0.478
		rotation = 0, 180, 0
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleScienceDataIndicator
		emissiveName = indicator
		dataColor = $HighScience
		partialDataColor = $MediumScience
		lowDataColor = $LowScience
		emptyColor = ModuleScienceAvailabilityIndicator
	}
	MODULE
	{
		name = ModuleScienceAvailabilityIndicator
	}
}

 

@SnarkPull request submitted on GitHub as well. (But it's got a bunch of unnecessary commits in from uploading and deleting files cos GitHub is new to me. Sorry.)

(Side note: Oh, how I wish I'd discovered NodeHelper when I was doing the other ReStock patches. It makes things so much easier. *quietly whimpers* )

Link to comment
Share on other sites

5 minutes ago, UnanimousCoward said:

Oh, OK then...

Parts patched:
Communotron DTS-J1
Communotron HG-20
Communotron HG-61
Clamp-O-Tron Docking Port 'Grande'
Mystery Goo Inline Containment Unit
SC-9001R Radial Science Jr.
Z-10K battery bank

Screenshot:

  Reveal hidden contents

GapD82c.png


Patches:

  Hide contents


//Compatibility patches for IndicatorLights and ReStock+

// Communotron HG-20
@PART[restock-relay-radial-2]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = -0.162, 0.036, -0.007
		scale = 1, 0.5, 1.15
		rotation = 0, 0, 90
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp2
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleDataTransmitterIndicator
		emissiveName = indicator
		busyColor = random($ToggleLED, $Off, divide(400, static(dataRate)), between(subtract(multiply(sqrt(static(dataRate)), 1.1), 2.3), -0.4, 0.5))
	}
}

// Communotron DTS-J1
@PART[restock-antenna-stack-2]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = -0.488, 0.083, -0.05
		scale = 0.35, 0.35, 0.35
		rotation = 90, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		position = -0.488, 0.083, 0.05
		scale = 0.35, 0.35, 0.35
		rotation = 90, 0, 0
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp2
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleDataTransmitterIndicator
		emissiveName = indicator
		busyColor = random($ToggleLED, $Off, divide(400, static(dataRate)), between(subtract(multiply(sqrt(static(dataRate)), 1.1), 2.3), -0.4, 0.5))
	}
}

//Communotron HG-61
@PART[restock-antenna-stack-3]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		position = 0, 0.512, 0
		scale = 1, 1, 1
		rotation = 90, 0, 0
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/nubbinLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleDataTransmitterIndicator
		emissiveName = indicator
		busyColor = random($ToggleLED, $Off, divide(400, static(dataRate)), between(subtract(multiply(sqrt(static(dataRate)), 1.1), 2.3), -0.4, 0.5))
	}
}

//Z-10K battery
@PART[restock-battery-375-1]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = 1.815, -0.03, -0.04
		rotation = 0, 90, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = 1.815, -0.03, 0.04
		rotation = 0, 90, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = -1.815, -0.03, -0.04
		rotation = 0, -90, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/nubbinLamp
		scale = 0.65, 0.65, 1
		position = -1.815, -0.03, 0.04
		rotation = 0, -90, 0
	}

	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/nubbinLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleResourceLevelIndicator
	}
	MODULE
	{
		name = ModuleResourceEnabledIndicator
		enabledColor = ModuleResourceLevelIndicator
		disabledColor = blink(ModuleResourceLevelIndicator, 900, $Off, 300)
		emissiveName = indicator
	}
}


//Clamp-O-Tron Docking Port 'Grande'
@PART[restock-docking-375-1]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	-MODULE[ModuleColorChanger]{}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 2
		position = 1.862, 0.0325, -0.01
		rotation = 0, 0, -90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 2
		position = -1.862, 0.0325, -0.01
		rotation = 0, 0, 90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp2
		scale = 0.3, 1, 2
		position = -0.008, 0.0325, 1.861
		rotation = 0, 90, 90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 0, 0.0325, -1.865
		rotation = 0, 180, 90
	}

	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 0.0, 0.206, 0.914
		rotation = -90, 0, -90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 0.0, 0.206, -0.914
		rotation = -90, 0, -90
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = 0.914, 0.206, 0.0
		rotation = -90, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.3, 1.6, 1
		position = -0.914, 0.206, 0.0
		rotation = -90, 0, 0
	}

	MODULE
    {
      name = ModuleColorChanger
      shaderProperty = _EmissiveColor
      animRate = 0.8
      animState = false
      useRate = true
      toggleInEditor = true
      toggleInFlight = true
      toggleInFlight = true
      unfocusedRange = 5
      toggleName = #autoLOC_502011 //#autoLOC_502011 = Toggle Lights
      eventOnName = #autoLOC_502012 //#autoLOC_502012 = Lights On
      eventOffName = #autoLOC_502013 //#autoLOC_502013 = Lights Off
      toggleAction = True
      defaultActionGroup = Light
      redCurve
      {
        key = 0 0 0 3
        key = 1 1 0 0
      }
      greenCurve
      {
        key = 0 0 0 1
        key = 1 1 1 0
      }
      blueCurve
      {
        key = 0 0 0 0
        key = 1 0.7 1.5 0
      }
      alphaCurve
      {
        key = 0 1
      }
    }
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp2
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleToggleLED
		activeColor = ModuleDockingCrossfeedIndicator
		inactiveColor = $Off
		defaultActionGroup = Light
	}
	MODULE
	{
		name = ModuleDockingCrossfeedIndicator
	}
	MODULE
	{
		name = ModuleDockingStateIndicator
		emissiveName = indicator
		readyColor = ModuleToggleLED
		acquireColor = blink(ModuleDockingCrossfeedIndicator, 100, $Off, 100)
		disengageColor = blink(ModuleDockingCrossfeedIndicator, 120, $Off, 1080)
	}
}

//Inline goo canister
@PART[restock-goocanister-625-1]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.75, 0.25, 0.5
		position = 0.0, -0.188, -0.325
		rotation = 0, 180, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 0.75, 0.25, 0.5
		position = 0.0, -0.188, 0.325
		rotation = 0, 0, 0
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleScienceDataIndicator
		emissiveName = indicator
		dataColor = $HighScience
		partialDataColor = $MediumScience
		lowDataColor = $LowScience
		emptyColor = ModuleScienceAvailabilityIndicator
	}
	MODULE
	{
		name = ModuleScienceAvailabilityIndicator
	}
}

//Radial materials bay
@PART[restock-materialbay-radial-1]:AFTER[ReStockPlus]:NEEDS[IndicatorLights]
{
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		scale = 1, 0.4, 0.5
		position = 0.0, -0.41, -0.478
		rotation = 0, 180, 0
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp
		emissiveName = indicator
	}
	MODULE
	{
		name = ModuleScienceDataIndicator
		emissiveName = indicator
		dataColor = $HighScience
		partialDataColor = $MediumScience
		lowDataColor = $LowScience
		emptyColor = ModuleScienceAvailabilityIndicator
	}
	MODULE
	{
		name = ModuleScienceAvailabilityIndicator
	}
}

  

@SnarkPull request submitted on GitHub as well. (But it's got a bunch of unnecessary commits in from uploading and deleting files cos GitHub is new to me. Sorry.)

(Side note: Oh, how I wish I'd discovered NodeHelper when I was doing the other ReStock patches. It makes things so much easier. *quietly whimpers* )

now you wanna have some more fun? How about IL for OrbitalTug? Special challenge - put something on the engineonArm that indicates which way thrust. :P

 

Git is fun - and it is really good at recording changes, especially the ones you don't want to remember. :P

Link to comment
Share on other sites

Just now, zer0Kerbal said:

now you wanna have some more fun? How about IL for OrbitalTug? Special challenge - put something on the engineonArm that indicates which way thrust. :P

 

Git is fun - and it is really good at recording changes, especially the ones you don't want to remember. :P

No thanks. :)   I don't use that mod myself, so I'm not touching it.

You and me may have different definitions of "fun". :P

Link to comment
Share on other sites

@UnanimousCoward, if you're still adding to the bard's playlist, there's a piece of Nertea's StationPartsExpansionRedux which happens to override its apparent clone in ReStock, and it might be an easy win.  The 1.25m Standard Clamp-O-Tron Docking port uses a lot of the same components as the ReStock part - the .dds files are apparently the same - but the model (or models) have a different name.  SSPXR preserves a standard version of the model, but the part switcher adds two alternate color variants with smaller outer diameters, and possibly different cone angles.

Indicator Lights will work on the standard docking port, with ReStock (and your ILCE patch) and SSPXR installed, if I delete the section of SSPXR's .cfg file that tries to implement its version of the part.  But that also defeats Nertea's intent of having alternate color variants of the port.  I figured since at least the base variant looks exactly the same as the ReStock one, your patch for ILCE should work on it (and maybe on the other port color variants) by using the correct references.

I said it might be easy, because I thought I could do it by making a copy of your previous ReStock ILCE patch code for the docking port and editing in an AFTER statement that checks for SSPXR instead of ReStock, and then pointing it to the correct(?) model it's using.  Unfortunately, it either isn't that simple or I just missed something.

The .cfg file SSPXR uses for the docking port is here, and should help identify the model(s) it's looking for:

StationPartsExpansionRedux/Patches/SSPXr-StockPartReplacements.cfg

Edited by KSPrynk
Link to comment
Share on other sites

New patch set soon, and a help request:

So...many moons have aligned, and a couple blender tutorials run (anyone need a passable ball-peen hammer or a weird-looking sword?), and I've now dipped my toe into putting some IL configs together for the much-beloved Kn-2 cockpits & parts.

It was a pretty triumphant moment getting that little blob of grey to appear exactly where I wanted it at the very first load, if spun the wrong way 'round. I immediately scaled up and duplicated the full config for the stock (MH) kv3 pod. I figured it would be a perfect parallel: 3 crew, and an old Soviet design for fun.

I can't seem to get all three lights to appear, though. Everything is otherwise working great (flashing for science, etc.) but it's only placing the first light and ignoring (?) the other two. I've certainly checked to make sure they're not hiding inside. :)

Spoiler

E906106A1899502F37F0BE93B91106AA73267035

I even tried the "model" declaration at the top in case that was a factor, but the cabin loads fine in-game as you can see.

Here's the mashed-together patch:

Spoiler

@PART[KN2Cabin]:NEEDS[Kerbonov]
{

    MODEL
    {
        model = Kerbonov/Parts/KN2Cabin
    }

    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------
    MODEL
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.5594, -0.3318, -0.2687
        rotation = 0, -110, 0
    }
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.5594, -0.4318, -0.2687
        rotation = 0, -110, 0
    }
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.5594, -0.5318, -0.2687
        rotation = 0, -110, 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
    //-------------------------------------------------------------------------

    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 = 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 = 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
    }


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

    // This pod uses a ModuleColorChanger to handle its ablator, 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 end up getting colored with the
    // ablator instead of actually working as a crew indicator.
    @MODULE[ModuleColorChanger] {
        excludedRenderer = IndicatorLights/Meshes/nubbinLamp(Clone)
    }

}

 

Link to comment
Share on other sites

43 minutes ago, Beetlecat said:

    MODEL
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.5594, -0.3318, -0.2687
        rotation = 0, -110, 0
    }

    MODEL
    {

        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.5594, -0.4318, -0.2687
        rotation = 0, -110, 0
    }

    MODEL
    {

        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.5594, -0.5318, -0.2687
        rotation = 0, -110, 0
    }

Your missing the MODEL keyword for the 2nd & 3rd lights. (In red above)

Link to comment
Share on other sites

36 minutes ago, Tonka Crash said:

Your missing the MODEL keyword for the 2nd & 3rd lights. (In red above)

D'oh!!!  I somehow knew it would be that simple. Cheers for the assist. I didn't have to go all "There should be three lights!"

Spoiler

star_trek_four_lights.jpg

 

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

Just a note that I've (finally) released IndicatorLights Community Extensions v1.6, now with support for ReStock and ReStock+.

Many thanks to @UnanimousCoward for taking one for the team and supplying the patch!

(Beetlecat, I'm not ignoring you-- from what you wrote earlier it sounds as though you're working on multiple parts for your mod compatibility patch, so I'm assuming you'll provide an "all done" version at some point, which is why I haven't tried to incorporate what you've got thus far.)

Link to comment
Share on other sites

At RO RP-1 with ReStock and ReStock+
bMsyynB.jpg
and
AVIewly.jpg

They're both clones of Squad/Parts/Command/advancedSasModuleLarge/advSasModuleLarge

Here are the excerpts of the MM cache for those parts:

UrlConfig
{
	parentUrl = Squad/Parts/Command/advancedSasModuleLarge/advSasModuleLarge
	PART
	{
		name = RP0probeSounding0-3m
		module = Part
		author = Chris Adderley (Nertea)
		iconCenter = 0, 3, 0
		buoyancy = 0.1
		buoyancyUseSine = False
		category = Pods
		subcategory = 0
		title = WAC-Corporal Sounding Rocket Telemetry Unit
		manufacturer = Generic
		description = <color=orange>Class 1 Antenna DIRECT.</color> A simple RF receiver and time-delay circuit for sounding rockets. Allows staging and for information to be reported, but no yaw/pitch/roll control. [0.3m diameter] <b><color=green>From Stock (RO Config) mod</color></b>
		attachRules = 1,0,1,1,0
		mass = 0.06
		dragModelType = default
		maximum_drag = 0.2
		minimum_drag = 0.2
		angularDrag = 2
		bulkheadProfiles = size0
		tags = cmg command control fly gyro moment react stab steer torque
		crashTolerance = 7
		gTolerance = 100
		maxPressure = 20000
		breakingForce = 250
		breakingTorque = 250
		scale = 1.0
		rescaleFactor = 1.0
		node_stack_top = 0, 0.03, 0, 0.0, 1.0, 0.0, 0
		node_stack_bottom = 0, -0.03, 0, 0.0, -1.0, 0.0, 0
		maxTemp = 573.15
		skinMaxTemp = 773.15
		CrewCapacity = 0
		vesselType = Probe
		TechRequired = unlockParts
		cost = 1
		entryCost = 1
		DRAG_CUBE
		{
			cube = Default,0.0179296848,0.7806778,0.16136472,0.0179296848,0.7806778,0.16136472,0.0668637792,0.9183766,0.068847096,0.0668637792,0.9590334,0.065552976,0.0179296848,0.774645,0.16136472,0.0179296848,0.774645,0.16136472,0,0,0,0.3,0.060000048,0.3
			rescaleX = 0.12
			rescaleY = 0.12
			rescaleZ = 0.12
		}
		MODULE
		{
			name = ModuleControllableEmissive
			target = IndicatorLights/Meshes/squareLamp
			emissiveName = indicator
		}
		MODULE
		{
			name = ModuleReactionWheelIndicator
			emissiveName = indicator
		}
		MODEL
		{
			model = ReStock/Assets/Control/restock-reactionwheel-25-1
			scale = 0.12, 0.12, 0.12
		}
		DRAG_CUBE
		{
			cube = Default, 1.245,0.7807,1.345, 1.245,0.7807,1.345, 4.643,0.9184,0.5737, 4.643,0.959,0.5463, 1.245,0.7746,1.345, 1.245,0.7746,1.345, 0,0,0, 2.5,0.5,2.5
		}
		MODULE
		{
			isEnabled = True
			name = BuoyancyControl
			enabled = true
		}
		MODULE
		{
			name = GeometryPartModule
		}
		MODULE
		{
			name = FARAeroPartModule
		}
		MODULE
		{
			name = FARPartModule
		}
		MODULE
		{
			name = HotSpotModule
		}
		MODEL
		{
			model = IndicatorLights/Meshes/squareLamp
			scale = 0.8, 0.8, 1
			position = -0.90168, 0,0.90168
			rotation = 0, -45, 0
		}
		MODEL
		{
			model = IndicatorLights/Meshes/squareLamp
			scale = 0.8, 0.8, 1
			position = 0.90168, 0,-0.90168
			rotation = 0, 135, 0
		}
		MODEL
		{
			model = IndicatorLights/Meshes/squareLamp
			scale = 0.8, 0.8, 1
			position = 0.90168, 0,0.90168
			rotation = 0, 45, 0
		}
		MODEL
		{
			model = IndicatorLights/Meshes/squareLamp
			scale = 0.8, 0.8, 1
			position = -0.90168, 0,-0.90168
			rotation = 0, 225, 0
		}
		MODULE
		{
			name = ModuleTorqueController
		}
		RESOURCE
		{
			name = ElectricCharge
			amount = 180
			maxAmount = 180
		}
		MODULE
		{
			name = ModuleCommand
			minimumCrew = 0
			hasHibernation = False
			RESOURCE
			{
				name = ElectricCharge
				rate = 0.0333333333333333
				varyTime = False
				useSI = True
				displayUnitMult = 1000
				unitName = Watts
			}
		}
		MODULE
		{
			name = ModuleDataTransmitter
			antennaType = DIRECT
			packetSize = 0.0001024
			requiredResource = ElectricCharge
			antennaPower = 400
			antennaCombinable = True
			antennaCombinableExponent = 2.0
			packetResourceCost = 0.00512
			packetInterval = 1
		}
		MODULE
		{
			name = MechJebCore
			MechJebLocalSettings
			{
				MechJebModuleCustomWindowEditor
				{
					unlockTechs = start
				}
				MechJebModuleSmartASS
				{
					unlockTechs = start
				}
				MechJebModuleManeuverPlanner
				{
					unlockTechs = start
				}
				MechJebModuleNodeEditor
				{
					unlockTechs = start
				}
				MechJebModuleTranslatron
				{
					unlockTechs = start
				}
				MechJebModuleWarpHelper
				{
					unlockTechs = start
				}
				MechJebModuleAttitudeAdjustment
				{
					unlockTechs = start
				}
				MechJebModuleThrustWindow
				{
					unlockTechs = start
				}
				MechJebModuleRCSBalancerWindow
				{
					unlockTechs = start
				}
				MechJebModuleRoverWindow
				{
					unlockTechs = start
				}
				MechJebModuleAscentGuidance
				{
					unlockTechs = start
				}
				MechJebModuleLandingGuidance
				{
					unlockTechs = start
				}
				MechJebModuleSpaceplaneGuidance
				{
					unlockTechs = start
				}
				MechJebModuleDockingGuidance
				{
					unlockTechs = start
				}
				MechJebModuleRendezvousAutopilotWindow
				{
					unlockTechs = start
				}
				MechJebModuleRendezvousGuidance
				{
					unlockTechs = start
				}
			}
		}
		MODULE
		{
			name = FlightEngineerModule
		}
		MODULE
		{
			name = ModuleScienceCore
		}
		MODULE
		{
			name = ModuleRangeSafety
		}
		MODULE
		{
			name = HardDrive
			title = Data Storage
			sampleCapacity = 0
			dataCapacity = -1
		}
		MODULE
		{
			name = Experiment
			experiment_id = RP0telemetry1
			ec_rate = 0.0001
			data_rate = 3.75E-07
			requires = 
			resources = 
			hide_when_unavailable = true
		}
		MODULE
		{
			name = Experiment
			experiment_id = RP0telemetry2
			ec_rate = 0.0001
			data_rate = 3.47222222222222E-06
			requires = Atmosphere,SurfaceSpeedMin:343
			resources = 
			hide_when_unavailable = true
			experiment_desc = Supersonic and hypersonic flight study.
		}
		MODULE
		{
			name = ModuleTCA
		}
		MODULE
		{
			name = TrajectoriesVesselSettings
		}
		MODULE
		{
			name = ModuleTagAvionics
		}
		MODULE
		{
			name = ModuleTagNoResourceCostMult
		}
		MODULE
		{
			name = ModuleAeroReentry
			skinHeatConductivity = 0.001
			leaveTemp = True
		}
		MODULE
		{
			name = ModuleB9PropagateCopyEvents
		}
		MODULE
		{
			name = ModuleShowInfo
		}
	}
}

and

UrlConfig
{
	parentUrl = Squad/Parts/Command/advancedSasModuleLarge/advSasModuleLarge
	PART
	{
		name = RP0aerobeeSounding
		module = Part
		author = Chris Adderley (Nertea)
		iconCenter = 0, 3, 0
		buoyancy = 0.1
		buoyancyUseSine = False
		category = Pods
		subcategory = 0
		title = Aerobee Sounding Rocket Telemetry Unit
		manufacturer = Aerojet
		description = <color=orange>Class 1 Antenna DIRECT.</color> A simple RF receiver and time-delay circuit for sounding rockets. Allows staging and for information to be reported, but no yaw/pitch/roll control. [0.380m diameter] <b><color=green>From Stock (RO Config) mod</color></b>
		attachRules = 1,0,1,1,0
		mass = 0.06
		dragModelType = default
		maximum_drag = 0.2
		minimum_drag = 0.2
		angularDrag = 2
		bulkheadProfiles = size0
		tags = cmg command control fly gyro moment react stab steer torque
		crashTolerance = 7
		gTolerance = 100
		maxPressure = 20000
		breakingForce = 250
		breakingTorque = 250
		scale = 1.0
		rescaleFactor = 1.0
		maxTemp = 573.15
		skinMaxTemp = 773.15
		CrewCapacity = 0
		vesselType = Probe
		node_stack_top = 0, 0.063158, 0, 0.0, 1.0, 0.0, 0
		node_stack_bottom = 0, -0.063158, 0, 0.0, -1.0, 0.0, 0
		TechRequired = unlockParts
		cost = 1
		entryCost = 1
		DRAG_CUBE
		{
			cube = Default,0.0471834596916,0.7806778,0.2017059,0.0471834596916,0.7806778,0.2017059,0.104474655,0.9183766,0.1449414963056,0.104474655,0.9590334,0.1380064952736,0.0471834596916,0.774645,0.2017059,0.0471834596916,0.774645,0.2017059,0,0,0,0.375,0.1263161010528,0.375
			rescaleX = 0.15
			rescaleY = 0.252632
			rescaleZ = 0.15
		}
		MODULE
		{
			name = ModuleControllableEmissive
			target = IndicatorLights/Meshes/squareLamp
			emissiveName = indicator
		}
		MODULE
		{
			name = ModuleReactionWheelIndicator
			emissiveName = indicator
		}
		MODEL
		{
			model = ReStock/Assets/Control/restock-reactionwheel-25-1
			scale = 0.15, 0.252632, 0.15
		}
		DRAG_CUBE
		{
			cube = Default, 1.245,0.7807,1.345, 1.245,0.7807,1.345, 4.643,0.9184,0.5737, 4.643,0.959,0.5463, 1.245,0.7746,1.345, 1.245,0.7746,1.345, 0,0,0, 2.5,0.5,2.5
		}
		MODULE
		{
			isEnabled = True
			name = BuoyancyControl
			enabled = true
		}
		MODULE
		{
			name = GeometryPartModule
		}
		MODULE
		{
			name = FARAeroPartModule
		}
		MODULE
		{
			name = FARPartModule
		}
		MODULE
		{
			name = HotSpotModule
		}
		MODEL
		{
			model = IndicatorLights/Meshes/squareLamp
			scale = 0.8, 0.8, 1
			position = -0.90168, 0,0.90168
			rotation = 0, -45, 0
		}
		MODEL
		{
			model = IndicatorLights/Meshes/squareLamp
			scale = 0.8, 0.8, 1
			position = 0.90168, 0,-0.90168
			rotation = 0, 135, 0
		}
		MODEL
		{
			model = IndicatorLights/Meshes/squareLamp
			scale = 0.8, 0.8, 1
			position = 0.90168, 0,0.90168
			rotation = 0, 45, 0
		}
		MODEL
		{
			model = IndicatorLights/Meshes/squareLamp
			scale = 0.8, 0.8, 1
			position = -0.90168, 0,-0.90168
			rotation = 0, 225, 0
		}
		MODULE
		{
			name = ModuleTorqueController
		}
		RESOURCE
		{
			name = ElectricCharge
			amount = 180
			maxAmount = 180
		}
		MODULE
		{
			name = ModuleCommand
			minimumCrew = 0
			hasHibernation = False
			RESOURCE
			{
				name = ElectricCharge
				rate = 0.0333333333333333
				varyTime = False
				useSI = True
				displayUnitMult = 1000
				unitName = Watts
			}
		}
		MODULE
		{
			name = ModuleDataTransmitter
			antennaType = DIRECT
			packetSize = 0.0001024
			requiredResource = ElectricCharge
			antennaPower = 400
			antennaCombinable = True
			antennaCombinableExponent = 2.0
			packetResourceCost = 0.00512
			packetInterval = 1
		}
		MODULE
		{
			name = MechJebCore
			MechJebLocalSettings
			{
				MechJebModuleCustomWindowEditor
				{
					unlockTechs = start
				}
				MechJebModuleSmartASS
				{
					unlockTechs = start
				}
				MechJebModuleManeuverPlanner
				{
					unlockTechs = start
				}
				MechJebModuleNodeEditor
				{
					unlockTechs = start
				}
				MechJebModuleTranslatron
				{
					unlockTechs = start
				}
				MechJebModuleWarpHelper
				{
					unlockTechs = start
				}
				MechJebModuleAttitudeAdjustment
				{
					unlockTechs = start
				}
				MechJebModuleThrustWindow
				{
					unlockTechs = start
				}
				MechJebModuleRCSBalancerWindow
				{
					unlockTechs = start
				}
				MechJebModuleRoverWindow
				{
					unlockTechs = start
				}
				MechJebModuleAscentGuidance
				{
					unlockTechs = start
				}
				MechJebModuleLandingGuidance
				{
					unlockTechs = start
				}
				MechJebModuleSpaceplaneGuidance
				{
					unlockTechs = start
				}
				MechJebModuleDockingGuidance
				{
					unlockTechs = start
				}
				MechJebModuleRendezvousAutopilotWindow
				{
					unlockTechs = start
				}
				MechJebModuleRendezvousGuidance
				{
					unlockTechs = start
				}
			}
		}
		MODULE
		{
			name = FlightEngineerModule
		}
		MODULE
		{
			name = ModuleScienceCore
		}
		MODULE
		{
			name = ModuleRangeSafety
		}
		MODULE
		{
			name = HardDrive
			title = Data Storage
			sampleCapacity = 0
			dataCapacity = -1
		}
		MODULE
		{
			name = Experiment
			experiment_id = RP0telemetry1
			ec_rate = 0.0001
			data_rate = 3.75E-07
			requires = 
			resources = 
			hide_when_unavailable = true
		}
		MODULE
		{
			name = Experiment
			experiment_id = RP0telemetry2
			ec_rate = 0.0001
			data_rate = 3.47222222222222E-06
			requires = Atmosphere,SurfaceSpeedMin:343
			resources = 
			hide_when_unavailable = true
			experiment_desc = Supersonic and hypersonic flight study.
		}
		MODULE
		{
			name = ModuleTCA
		}
		MODULE
		{
			name = TrajectoriesVesselSettings
		}
		MODULE
		{
			name = ModuleTagAvionics
		}
		MODULE
		{
			name = ModuleTagNoResourceCostMult
		}
		MODULE
		{
			name = ModuleAeroReentry
			skinHeatConductivity = 0.001
			leaveTemp = True
		}
		MODULE
		{
			name = ModuleB9PropagateCopyEvents
		}
		MODULE
		{
			name = ModuleShowInfo
		}
	}
}

and there are more clones like that:

  • Saturn IB/V Instrument Unit
  • Delta Avionics Package [1.45m]
  • Centaur Avionics Package [3.05m]
  • Able Avionics Package [0.813m]

Besides ReStock and ReStock+ I also use VSR, but the RP-1 compatible version of @pap1723

So, I was optimistic after the latest changes, but for now I have to remove the IndicatorLights again.

Full log and cache and stuff:
https://www.dropbox.com/s/n5eas6uc2l13dru/output_log.txt and stuff 2019-07-02-01.zip?dl=1

Link to comment
Share on other sites

9 hours ago, Gordon Dry said:

At RO RP-1 with ReStock and ReStock+

Sorry, I don't use any of the mods involved, myself (including ReStock), so reading through your post, I lack the context to understand even what the specific bug case is, here.

  • Are you saying that the ReStock / ReStock+ patch itself doesn't work?
  • Or are you just saying that the interaction between ReStock and something else (RO?  RP-1, whatever that is?) is not working well?

i.e. is the ReStock patch broken for everybody, or just people who happen to use it with RO RP-1?

Link to comment
Share on other sites

On 7/1/2019 at 8:40 AM, Snark said:

Hi all,

Just a note that I've (finally) released IndicatorLights Community Extensions v1.6, now with support for ReStock and ReStock+.

Many thanks to @UnanimousCoward for taking one for the team and supplying the patch!

(Beetlecat, I'm not ignoring you-- from what you wrote earlier it sounds as though you're working on multiple parts for your mod compatibility patch, so I'm assuming you'll provide an "all done" version at some point, which is why I haven't tried to incorporate what you've got thus far.)

You read that exactly right. :D
Just getting back from a week vacationing in Northern Michigan. I'll be able to focus on a screen again any day now--full patch forthcoming.

Link to comment
Share on other sites

Alright then.

After a few sessions fiddling with Blender and getting used to MM syntax issues, I've managed to throw together a quick set of patches for the Kerbonov (continued) mod. This covers adding crew indicators to the Kn-2 and Kn-7 cockpits, the 1-person passenger can, and a transmitting indicator to the VHF antenna. I basically copied patches for other similar components, and changed part names and position values. That's how we do it, right? ;)

The Kerbonov antenna has *two* similar lighted parts on the model, so I suppose a second indicator light could be added to perform a different function, but I didn't pursue that *yet*.

https://pastebin.com/V332R5tq

Spoiler

// A Series of patches for the Kerbonov parts pack, including the Kn-2, the Kn-7, the passenber cabin, and if all goes well, the antenna.
// Descriptions, headers, format, etc. gratuitously lifted from other examples in the Indicator Lights mod by Snark.


//Add an indicator (replace one of the bulbs) on the VHF antenna. The other bulb is left as a static "light" element on the model that does not function. Possibly cover that with an additional indicator for available data to transmit? whether it has power?
@PART[VHFTransceiver]:NEEDS[kerbonov]
{
    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------
    MODEL
    {
        model = IndicatorLights/Meshes/z100lamp
        scale = 0.4, 0.4, 0.4
        position = 0.0297, 0.0518, -0.0779
        rotation = 0, 0, 0
    }

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

    MODULE {
        name = ModuleControllableEmissive
        target = IndicatorLights/Meshes/z100lamp
        emissiveName = indicator
    }

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

    MODULE {
        name = ModuleDataTransmitterIndicator
        emissiveName = indicator
        // Get really fancy with busy color. This module type exposes one static
        // field, dataRate. We'll use a random flicker for the animation (like
        // an old-time modem), and we'll plug the data rate both into the flicker
        // period (so higher-speed antennas flicker faster), and into the bias
        // (so higher-speed antennas spend a greater percentage of their time
        // in the "on" state rather than "off").
        //
        // We don't actually have to use the static syntax here (we could just
        // take the data rate for this antenna, do the math, and plug in the
        // literal numbers here). However, using the actual static expression
        // comes with a few benefits. First, it's more maintainable: we
        // can just use the same static expression for all the antennas, rather
        // than having to come up with a different expression with different math
        // for each one. Second, it's more explicit to anyone reading this just
        // *why* the number is what it is. Third, it's more robust: if Squad ever
        // tinkers with the data rates, or someone uses ModuleManager to tweak
        // them, this will automatically follow suit. Fourth, it's friendlier
        // to modders: if you have your own antenna and you want to set it up
        // for IndicatorLights compatibility, you can just copy the following
        // line verbatim and you'll get behavior that's consistent with what
        // IndicatorLights does with the stock antennas.
        busyColor = random($ToggleLED, $Off, divide(400, static(dataRate)), between(subtract(multiply(sqrt(static(dataRate)), 1.1), 2.3), -0.4, 0.5))
    }
}


// Add a single crew indicator to the KPM-1 Small Inline Passenger Compartment
@PART[InlinePassengerCan]:NEEDS[Kerbonov]
{
    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------
    MODEL
    {
        model = IndicatorLights/Meshes/squareLamp
        scale = 0.230, 1.0, 0.5
        position = -0.5544, 0, 0.27555
        rotation = 0, -67.5, 0
    }

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

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

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

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

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

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


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

    // This pod uses a ModuleColorChanger to handle its ablator, 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 end up getting colored with the
    // ablator instead of actually working as a crew indicator.
    @MODULE[ModuleColorChanger] {
        excludedRenderer = IndicatorLights/Meshes/squareLamp(Clone)
    }
}


// Add crew indicators (3) to the Kn-7 Cabin
@PART[KN7Cabin]:NEEDS[Kerbonov]
{
    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------
    MODEL
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.6057, -1.1668, 0.4582
        rotation = 0, -60, 0
    }
    MODEL
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.6057, -1.2668, 0.4582
        rotation = 0, -60, 0
    }
    MODEL
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.6057, -1.3668, 0.4582
        rotation = 0, -60, 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
    //-------------------------------------------------------------------------

    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 = 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 = 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
    }

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

    // This pod uses a ModuleColorChanger to handle its ablator, 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 end up getting colored with the
    // ablator instead of actually working as a crew indicator.
    @MODULE[ModuleColorChanger] {
        excludedRenderer = IndicatorLights/Meshes/nubbinLamp(Clone)
    }    
}


// Add crew indicators (3) to the Kn-2 Cabin
@PART[KN2Cabin]:NEEDS[Kerbonov]
{
    //-------------------------------------------------------------------------
    // INDICATOR MESHES
    //-------------------------------------------------------------------------
    MODEL
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.5594, -0.3261, -0.2687
        rotation = 0, -110, 0
    }
    MODEL
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.5594, -0.4261, -0.2687
        rotation = 0, -110, 0
    }
    MODEL
    {
        model = IndicatorLights/Meshes/nubbinLamp
        scale = 0.7, 0.7, 0.5
        position = -0.5594, -0.5261, -0.2687
        rotation = 0, -110, 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
    //-------------------------------------------------------------------------

    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 = 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 = 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
    }


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

    // This pod uses a ModuleColorChanger to handle its ablator, 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 end up getting colored with the
    // ablator instead of actually working as a crew indicator.
    @MODULE[ModuleColorChanger] {
        excludedRenderer = IndicatorLights/Meshes/nubbinLamp(Clone)
    }

}

The biggest bit of learning curve was Blender itself, but once I got used to the controls, it was pretty simple to navigate around. I can imagine that trying this in the versions before the 2.8 beta would have been far more "interesting."

Also, much respect for @UnanimousCoward for cranking through this process for so many of the the restock(+) parts.

Edited by Beetlecat
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...