Jump to content

Part upgrade to ModuleDeployableAntenna


Fwiffo

Recommended Posts

I have a custom part (weldment) that I'm upgrading from KSP 1.1.3 to 1.2.  It includes a mediumDishAntenna mesh from the stock DTS-M1, and looks something like this:

PART
{
	name = Hopper-Mk4-RightPylon
	module = Part
	....
	// Mesh for antenna
	MODEL
	{
		model = Squad/Parts/Utility/commsAntennaDTS-M1/mediumDishAntenna
		position = 0.677, -0.059, -0.252
		scale = 1, 1, 1
		rotation = 90, 135, 0
	}
	....
	// This was needed for KSP 1.1.3 (and furthermore, had to be the first module
	// present in the part file, otherwise the deploy animation would not play on
	// data transmission)
	MODULE // Commenting out this module breaks things in KSP 1.2 ?!
	{
		name = ModuleAnimateGeneric
		animationName = Deploy
		isOneShot = false
		startEventGUIName = Extend Antenna
		endEventGUIName = Retract Antenna
		actionGUIName = Toggle Antenna
		allowAnimationWhileShielded = False
	}
	....
	MODULE
	{
		name = ModuleDeployableAntenna
		showStatus = false
		isTracking = false
		pivotName = AntennaHolster
		raycastTransformName = AntennaHolster
		animationName = Deploy
	}
	MODULE
	{
		name = ModuleDataTransmitter
		antennaType = DIRECT
		packetInterval = 0.35 // was 1.35
		packetSize = 2 // was 4
		packetResourceCost = 12 // was 24
		requiredResource = ElectricCharge
		antennaPower = 2000000000
		DeployFxModules = 0
		antennaCombinable = True
	}
	....
}

I'm trying to upgrade it from ModuleAnimateGeneric to ModuleDeployableAntenna, but as soon as I remove ModuleAnimateGeneric, I get the following aberrant behavior:

  • The antenna automatically starts to open as soon as you pick it up off the toolbox
  • The buttons for deploy / retract don't appear when you right-click the part

Any ideas?

Here is the full part file if needed:

Spoiler

PART
{
	name = Hopper-Mk4-Tank
	module = Part
	author = Fwiffo
	rescaleFactor = 1
	PhysicsSignificance = -1
	node_stack_topstrutOcto3 = -1.433, -0.02, 0, -1, 0, 0, 0 // left pylon
	//node_stack_bottomstrutOcto3 = -1.176, -0.02, 0, 1, 0, 0, 0
	node_stack_topstrutOcto4 = 1.433, -0.02, 0, 1, 0, 0, 0 // right pylon
	//node_stack_bottomstrutOcto4 = 1.176, -0.02, 0, -1, 0, 0, 0
	//node_stack_bottomstrutCube5 = 0, 0.185, -1.078, 0, 0, 1, 0
	//node_stack_bottomstrutCube6 = 0, 0.185, -1.599, 0, 0, -1, 0
	//node_stack_bottomstrutCube7 = 0, 0.185, 1.078, 0, 0, -1, 0
	//node_stack_bottomstrutCube8 = 0, 0.185, 1.599, 0, 0, 1, 0
	node_stack_bottomFwiffo-NozzleTank11 = 0, -0.155, 0, 0, -1, 0, 1 // Poodle
	//node_stack_bottomstrutOcto13 = 0, -0.257, -1.617, 0, 0, -1, 0
	//node_stack_bottomstrutOcto14 = 0, -0.257, 1.102, 0, 0, -1, 0
	//node_stack_bottomstrutOcto15 = 0, -0.257, 1.617, 0, 0, 1, 0
	node_stack_topfuelTank2-22 = 0, 2.22, 0, 0, 1, 0, 2 // top node
	//node_stack_bottomstrutOcto12 = 0, -0.257, -1.102, 0, 0, 1, 0
	// Attachment nodes for legs (vertically align with SAS module / CoM)
	node_stack_ventralLeg = 0, 0.095, 1.849, 0, 0, 1, 0 // TODO: Test.  Y's were 0.105 in Mk3
	node_stack_dorsalLeg = 0, 0.095, -1.849, 0, 0, -1, 0
	node_stack_portLeg = 3.03, 0.095, 0, 1, 0, 0, 0
	node_stack_starboardLeg = -3.03, 0.095, 0, -1, 0, 0, 0
	node_attach = 0, 0, 0, 0, 0, 0, 0 // TODO: Fix this
	CrewCapacity = 0
	stackSymmetry = 1 // 2x symmetry (for side nodes)
	TechRequired = specializedControl
	entryCost = 131800
	cost = 7401
	category = FuelTank
	subcategory = 0
	manufacturer = Fwiffo Industries
	description = Central tank for the Low Part Count Self Refueling Biome Hopper Mk2.
	attachRules = 1,0,1,1,0,0,0
	// Mass calculated as:
	// 1.0000 X200-16 tank
	// 0.2000 AdvSAS wheel
	// 0.3000 Hidden toroidal tank (8x normal 0.0375)
	// 0.3250 Bottom toroidal tank (wraps engine)
	// 0.0100 10x octo / cubic struts (must add manually since Ubioweld skips massless parts for mass calculation)
	// 0.0200 Battery
	// 0.0150 Illuminator
	mass = 1.87
	CoMOffset = 0, 0.095, 0 // set such that SAS module (and thus leg attachment points for Vernor thrust axis) is at 0
	dragModelType = default
	maximum_drag = 0.196999997
	minimum_drag = 0.196999997
	angularDrag = 1.977
	crashTolerance = 6.362
	breakingForce = 152.809
	breakingTorque = 152.809
	maxTemp = 1200
	fuelCrossFeed = True
	explosionPotential = 0.5
	thermalMassModifier = 1
	heatConductivity = 0.12
	emissiveConstant = 0.4
	radiatorHeadroom = 0.25
	bulkheadProfiles = size2
	tags = hopper fueltank ?lfo liquid oxidizer cmg command control fly gyro moment react stab steer torque hopper-mk4
	MODEL
	{
		model = Squad/Parts/Command/advancedSasModuleLarge/model
		position = 0, 0.095, 0
		scale = 1, 1, 1
	}
	MODEL // IndicatorLights for reaction wheel (squareLamp indices 0-3) // TODO: Reduce these
	{
		model = IndicatorLights/Meshes/squareLamp
		position = -0.884, 0.095, 0.884
		scale = 0.8, 0.8, 1
		rotation = 0, 315, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		position = 0.884, 0.095, -0.884
		scale = 0.8, 0.8, 1
		rotation = 0, 135, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		position = 0.884, 0.095, 0.884
		scale = 0.8, 0.8, 1
		rotation = 0, 45, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		position = -0.884, 0.095, -0.884
		scale = 0.8, 0.8, 1
		rotation = 0, 225, 0
	}
	//MODEL // Internal tank inside reaction wheel; no need to render
	//MODEL
	//{
	//	model = Squad/Parts/FuelTank/fuelTankToroidal/model
	//	position = 0, 0.095, 0
	//	scale = 4, 4, 4
	//}
	MODEL
	{
		model = Squad/Parts/FuelTank/fuelTankX200-16/model
		position = 0, 1.283, 0
		scale = 1, 1, 1
	}
	MODEL // Manually added IndicatorLights for tank (squareLamp indices 4-5)
	{
		model = IndicatorLights/Meshes/squareLamp
		position = 0, 1.283, 1.25
		scale = 1, 0.25, 0.5
		rotation = 0, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		position = 0, 1.283, -1.25
		scale = 1, 0.25, 0.5
		rotation = 0, 180, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = -1.305, -0.02, 0
		scale = 1, 1, 1
		rotation = 0, 0, 90
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 1.305, -0.02, 0
		scale = 1, 1, 1
		rotation = 0, 180, 90
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutCubicOcto/model
		position = 0, 0.185, -1.207
		scale = 1, 1, 1
		rotation = 90, 180, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutCubicOcto/model
		position = 0, 0.185, -1.47
		scale = 1, 1, 1
		rotation = 90, 0, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutCubicOcto/model
		position = 0, 0.185, 1.207
		scale = 1, 1, 1
		rotation = 90, 0, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutCubicOcto/model
		position = 0, 0.185, 1.47
		scale = 1, 1, 1
		rotation = 90, 180, 0
	}
	MODEL
	{
		model = Squad/Parts/Utility/spotLightMk2/model
		position = 0, 1.797, -1.399
		scale = 1, 1, 1
		rotation = 10, 0, 0
	}
	MODEL
	{
		model = Squad/Parts/Electrical/z-400Battery/model
		position = 0.844, 1.281, -0.844
		scale = 1, 1, 1
		rotation = 0, 315, 0
	}
	MODEL // IndicatorLight for battery (nubbinLamp 0)
	{
		model = IndicatorLights/Meshes/nubbinLamp
		position = 0.844, 1.573, -0.983 // TODO: May need to move (see Mk3 comparison)
		scale = 1, 1, 1
		rotation = 270, 315, 0
	}
	// From NozzleTank part; see Hopper-Mk1-NozzleTank.cfg for notes
	MODEL
	{
		model = Squad/Parts/FuelTank/fuelTankToroidal/model
		position = 0, -0.555, 0
		scale = 2.2, 4.15, 2.2
	}
	// For legs (decorative)
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 0, -0.257, -1.231
		scale = 1, 1, 1
		rotation = 0, 270, 90
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 0, -0.257, -1.489
		scale = 1, 1, 1
		rotation = 90, 0, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 0, -0.257, 1.231
		scale = 1, 1, 1
		rotation = 0, 90, 90
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 0, -0.257, 1.489
		scale = 1, 1, 1
		rotation = 90, 180, 0
	}
	RESOURCE
	{
		name = LiquidFuel
		amount = 1170 // 720 in main tank, 216 in 8X toroid hidden in AdvSAS wheel, 234 in bottom big toroid tank
		maxAmount = 1170
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 1430
		maxAmount = 1430
	}
	// Note all electric charge consolidated on center tank to alleviate game warning about only command modules
	// having electricity storage, avoid dumping it with ore, and (possibly) squeeze out better game performance.
	RESOURCE
	{
		name = ElectricCharge
		amount = 560 // 400 from battery + 160 moved from pylons
		maxAmount = 560
	}
	// Moved monopropellant from pylons to consolidate consumables and avoid dumping it with ore.
	RESOURCE
	{
		name = MonoPropellant
		amount = 0
		maxAmount = 30
	}
	MODULE // Consolidate all reaction wheel torque in one part, to hopefully squeeze out better performance
	{
		name = ModuleReactionWheel
		PitchTorque = 36.5 // 30 from large wheel + 3.5 for lander can & guidance on left pylon + 3 from lander can on right pylon
		YawTorque = 36.5
		RollTorque = 36.5
		torqueResponseSpeed = 36.5
		RESOURCE
		{
			name = ElectricCharge
			rate = 1.26 // 0.6 from large wheel (most efficient) + 0.33 from left pylon + 0.3 from right pylon
		}
	}
	// IndicatorLights emissives
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/nubbinLamp:0
		emissiveName = batteryIndicator
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp:0,1,2,3
		emissiveName = reactionWheelIndicator
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp:4,5
		emissiveName = tankIndicator
	}
	// IndicatorLights controller for reaction wheel
	MODULE
	{
		name = ModuleReactionWheelIndicator
		emissiveName = reactionWheelIndicator
	}
	MODULE
	{
		name = ModuleLight
		lightName = spotlight
		useAnimationDim = true
		lightBrightenSpeed = 2.5
		lightDimSpeed = 2.5
		animationName = LightAnimation
		resourceAmount = 0.02
		useResources = true
	}
	// IndicatorLights controller for battery
	MODULE
	{
		name = ModuleResourceLevelIndicator
		resourceName = ElectricCharge
		controllerName = ElectricChargeResourceLevelIndicator
	}
	MODULE
	{
		name = ModuleResourceEnabledIndicator
		resourceName = ElectricCharge
		enabledColor = ElectricChargeResourceLevelIndicator
		disabledColor = blink(ElectricChargeResourceLevelIndicator, 900, $Off, 300)
		emissiveName = batteryIndicator
	}
	// IndicatorLights controller for tank
	// Composite of LiquidFuel and Oxidizer.  Based on example at:
	// https://github.com/KSPSnark/IndicatorLights/blob/master/examples/MultipleResourceIndicator.cfg
	// First, the indicators for liquidfuel and oxidizer. It's color-coded based on the
	// amount of fuel we have. If the fuel is disabled, it flashes.
	MODULE
	{
		name = ModuleResourceLevelIndicator
		controllerName = liquidFuelLevel
		resourceName = LiquidFuel
	}
	MODULE
	{
		name = ModuleResourceEnabledIndicator
		controllerName = liquidFuelEnabled
		resourceName = LiquidFuel
		enabledColor = liquidFuelLevel
		disabledColor = blink(liquidFuelLevel, 900, $Off, 300)
	}
	MODULE
	{
		name = ModuleResourceLevelIndicator
		controllerName = oxidizerLevel
		resourceName = Oxidizer
	}
	MODULE
	{
		name = ModuleResourceEnabledIndicator
		controllerName = oxidizerEnabled
		resourceName = Oxidizer
		enabledColor = oxidizerLevel
		disabledColor = blink(oxidizerLevel, 900, $Off, 300)
	}

	// A "composite" indicator for both resources.
	// First, we need a scalar indicator for the resource amount. We want
	// this to be a composite of the amounts of liquid fuel and oxidizer,
	// picking whichever one is lowest.
	MODULE {
		name = ModuleScalarIndicator
		controllerName = dualLevel
		// Use minimum input value. Also supports "maximum" and "average".
		operation = minimum
		inputs = liquidFuelLevel, oxidizerLevel
		highColor = $HighResource
		mediumColor = $MediumResource
		lowColor = $LowResource
		criticalColor = pulsate($LowResource, 1200, 1, 0.6)
	}
	// We feed that into a composite boolean indicator that tracks whether
	// all the resources are enabled or not. We want it to flash if *any*
	// of the resources are disabled.
	MODULE {
		name = ModuleBooleanIndicator
		// Use logical AND of inputs.  Also supports "or".
		operation = and
		// Note that you can put a "!" in front of a boolean input to invert it
		inputs = liquidFuelEnabled, oxidizerEnabled
		activeColor = dualLevel
		inactiveColor = blink(dualLevel, 900, $Off, 300)
		emissiveName = tankIndicator
	}
}

 

 

Edited by Fwiffo
Link to comment
Share on other sites

16 minutes ago, Fwiffo said:

I have a custom part (weldment) that I'm upgrading from KSP 1.1.3 to 1.2.  It includes a mediumDishAntenna mesh from the stock DTS-M1, and looks something like this:


PART
{
	name = Hopper-Mk4-RightPylon
	module = Part
	....
	// Mesh for antenna
	MODEL
	{
		model = Squad/Parts/Utility/commsAntennaDTS-M1/mediumDishAntenna
		position = 0.677, -0.059, -0.252
		scale = 1, 1, 1
		rotation = 90, 135, 0
	}
	....
	// This was needed for KSP 1.1.3 (and furthermore, had to be the first module
	// present in the part file, otherwise the deploy animation would not play on
	// data transmission)
	MODULE // Commenting out this module breaks things in KSP 1.2 ?!
	{
		name = ModuleAnimateGeneric
		animationName = Deploy
		isOneShot = false
		startEventGUIName = Extend Antenna
		endEventGUIName = Retract Antenna
		actionGUIName = Toggle Antenna
		allowAnimationWhileShielded = False
	}
	....
	MODULE
	{
		name = ModuleDeployableAntenna
		showStatus = false
		isTracking = false
		pivotName = AntennaHolster
		raycastTransformName = AntennaHolster
		animationName = Deploy
	}
	MODULE
	{
		name = ModuleDataTransmitter
		antennaType = DIRECT
		packetInterval = 0.35 // was 1.35
		packetSize = 2 // was 4
		packetResourceCost = 12 // was 24
		requiredResource = ElectricCharge
		antennaPower = 2000000000
		DeployFxModules = 0
		antennaCombinable = True
	}
	....
}

I'm trying to upgrade it from ModuleAnimateGeneric to ModuleDeployableAntenna, but as soon as I remove ModuleAnimateGeneric, I get the following aberrant behavior:

  • The antenna automatically starts to open as soon as you pick it up off the toolbox
  • The buttons for deploy / retract don't appear when you right-click the part

Any ideas?

Here is the full part file if needed:

  Reveal hidden contents


PART
{
	name = Hopper-Mk4-Tank
	module = Part
	author = Fwiffo
	rescaleFactor = 1
	PhysicsSignificance = -1
	node_stack_topstrutOcto3 = -1.433, -0.02, 0, -1, 0, 0, 0 // left pylon
	//node_stack_bottomstrutOcto3 = -1.176, -0.02, 0, 1, 0, 0, 0
	node_stack_topstrutOcto4 = 1.433, -0.02, 0, 1, 0, 0, 0 // right pylon
	//node_stack_bottomstrutOcto4 = 1.176, -0.02, 0, -1, 0, 0, 0
	//node_stack_bottomstrutCube5 = 0, 0.185, -1.078, 0, 0, 1, 0
	//node_stack_bottomstrutCube6 = 0, 0.185, -1.599, 0, 0, -1, 0
	//node_stack_bottomstrutCube7 = 0, 0.185, 1.078, 0, 0, -1, 0
	//node_stack_bottomstrutCube8 = 0, 0.185, 1.599, 0, 0, 1, 0
	node_stack_bottomFwiffo-NozzleTank11 = 0, -0.155, 0, 0, -1, 0, 1 // Poodle
	//node_stack_bottomstrutOcto13 = 0, -0.257, -1.617, 0, 0, -1, 0
	//node_stack_bottomstrutOcto14 = 0, -0.257, 1.102, 0, 0, -1, 0
	//node_stack_bottomstrutOcto15 = 0, -0.257, 1.617, 0, 0, 1, 0
	node_stack_topfuelTank2-22 = 0, 2.22, 0, 0, 1, 0, 2 // top node
	//node_stack_bottomstrutOcto12 = 0, -0.257, -1.102, 0, 0, 1, 0
	// Attachment nodes for legs (vertically align with SAS module / CoM)
	node_stack_ventralLeg = 0, 0.095, 1.849, 0, 0, 1, 0 // TODO: Test.  Y's were 0.105 in Mk3
	node_stack_dorsalLeg = 0, 0.095, -1.849, 0, 0, -1, 0
	node_stack_portLeg = 3.03, 0.095, 0, 1, 0, 0, 0
	node_stack_starboardLeg = -3.03, 0.095, 0, -1, 0, 0, 0
	node_attach = 0, 0, 0, 0, 0, 0, 0 // TODO: Fix this
	CrewCapacity = 0
	stackSymmetry = 1 // 2x symmetry (for side nodes)
	TechRequired = specializedControl
	entryCost = 131800
	cost = 7401
	category = FuelTank
	subcategory = 0
	manufacturer = Fwiffo Industries
	description = Central tank for the Low Part Count Self Refueling Biome Hopper Mk2.
	attachRules = 1,0,1,1,0,0,0
	// Mass calculated as:
	// 1.0000 X200-16 tank
	// 0.2000 AdvSAS wheel
	// 0.3000 Hidden toroidal tank (8x normal 0.0375)
	// 0.3250 Bottom toroidal tank (wraps engine)
	// 0.0100 10x octo / cubic struts (must add manually since Ubioweld skips massless parts for mass calculation)
	// 0.0200 Battery
	// 0.0150 Illuminator
	mass = 1.87
	CoMOffset = 0, 0.095, 0 // set such that SAS module (and thus leg attachment points for Vernor thrust axis) is at 0
	dragModelType = default
	maximum_drag = 0.196999997
	minimum_drag = 0.196999997
	angularDrag = 1.977
	crashTolerance = 6.362
	breakingForce = 152.809
	breakingTorque = 152.809
	maxTemp = 1200
	fuelCrossFeed = True
	explosionPotential = 0.5
	thermalMassModifier = 1
	heatConductivity = 0.12
	emissiveConstant = 0.4
	radiatorHeadroom = 0.25
	bulkheadProfiles = size2
	tags = hopper fueltank ?lfo liquid oxidizer cmg command control fly gyro moment react stab steer torque hopper-mk4
	MODEL
	{
		model = Squad/Parts/Command/advancedSasModuleLarge/model
		position = 0, 0.095, 0
		scale = 1, 1, 1
	}
	MODEL // IndicatorLights for reaction wheel (squareLamp indices 0-3) // TODO: Reduce these
	{
		model = IndicatorLights/Meshes/squareLamp
		position = -0.884, 0.095, 0.884
		scale = 0.8, 0.8, 1
		rotation = 0, 315, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		position = 0.884, 0.095, -0.884
		scale = 0.8, 0.8, 1
		rotation = 0, 135, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		position = 0.884, 0.095, 0.884
		scale = 0.8, 0.8, 1
		rotation = 0, 45, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		position = -0.884, 0.095, -0.884
		scale = 0.8, 0.8, 1
		rotation = 0, 225, 0
	}
	//MODEL // Internal tank inside reaction wheel; no need to render
	//MODEL
	//{
	//	model = Squad/Parts/FuelTank/fuelTankToroidal/model
	//	position = 0, 0.095, 0
	//	scale = 4, 4, 4
	//}
	MODEL
	{
		model = Squad/Parts/FuelTank/fuelTankX200-16/model
		position = 0, 1.283, 0
		scale = 1, 1, 1
	}
	MODEL // Manually added IndicatorLights for tank (squareLamp indices 4-5)
	{
		model = IndicatorLights/Meshes/squareLamp
		position = 0, 1.283, 1.25
		scale = 1, 0.25, 0.5
		rotation = 0, 0, 0
	}
	MODEL
	{
		model = IndicatorLights/Meshes/squareLamp
		position = 0, 1.283, -1.25
		scale = 1, 0.25, 0.5
		rotation = 0, 180, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = -1.305, -0.02, 0
		scale = 1, 1, 1
		rotation = 0, 0, 90
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 1.305, -0.02, 0
		scale = 1, 1, 1
		rotation = 0, 180, 90
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutCubicOcto/model
		position = 0, 0.185, -1.207
		scale = 1, 1, 1
		rotation = 90, 180, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutCubicOcto/model
		position = 0, 0.185, -1.47
		scale = 1, 1, 1
		rotation = 90, 0, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutCubicOcto/model
		position = 0, 0.185, 1.207
		scale = 1, 1, 1
		rotation = 90, 0, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutCubicOcto/model
		position = 0, 0.185, 1.47
		scale = 1, 1, 1
		rotation = 90, 180, 0
	}
	MODEL
	{
		model = Squad/Parts/Utility/spotLightMk2/model
		position = 0, 1.797, -1.399
		scale = 1, 1, 1
		rotation = 10, 0, 0
	}
	MODEL
	{
		model = Squad/Parts/Electrical/z-400Battery/model
		position = 0.844, 1.281, -0.844
		scale = 1, 1, 1
		rotation = 0, 315, 0
	}
	MODEL // IndicatorLight for battery (nubbinLamp 0)
	{
		model = IndicatorLights/Meshes/nubbinLamp
		position = 0.844, 1.573, -0.983 // TODO: May need to move (see Mk3 comparison)
		scale = 1, 1, 1
		rotation = 270, 315, 0
	}
	// From NozzleTank part; see Hopper-Mk1-NozzleTank.cfg for notes
	MODEL
	{
		model = Squad/Parts/FuelTank/fuelTankToroidal/model
		position = 0, -0.555, 0
		scale = 2.2, 4.15, 2.2
	}
	// For legs (decorative)
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 0, -0.257, -1.231
		scale = 1, 1, 1
		rotation = 0, 270, 90
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 0, -0.257, -1.489
		scale = 1, 1, 1
		rotation = 90, 0, 0
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 0, -0.257, 1.231
		scale = 1, 1, 1
		rotation = 0, 90, 90
	}
	MODEL
	{
		model = Squad/Parts/Structural/strutOcto/model
		position = 0, -0.257, 1.489
		scale = 1, 1, 1
		rotation = 90, 180, 0
	}
	RESOURCE
	{
		name = LiquidFuel
		amount = 1170 // 720 in main tank, 216 in 8X toroid hidden in AdvSAS wheel, 234 in bottom big toroid tank
		maxAmount = 1170
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 1430
		maxAmount = 1430
	}
	// Note all electric charge consolidated on center tank to alleviate game warning about only command modules
	// having electricity storage, avoid dumping it with ore, and (possibly) squeeze out better game performance.
	RESOURCE
	{
		name = ElectricCharge
		amount = 560 // 400 from battery + 160 moved from pylons
		maxAmount = 560
	}
	// Moved monopropellant from pylons to consolidate consumables and avoid dumping it with ore.
	RESOURCE
	{
		name = MonoPropellant
		amount = 0
		maxAmount = 30
	}
	MODULE // Consolidate all reaction wheel torque in one part, to hopefully squeeze out better performance
	{
		name = ModuleReactionWheel
		PitchTorque = 36.5 // 30 from large wheel + 3.5 for lander can & guidance on left pylon + 3 from lander can on right pylon
		YawTorque = 36.5
		RollTorque = 36.5
		torqueResponseSpeed = 36.5
		RESOURCE
		{
			name = ElectricCharge
			rate = 1.26 // 0.6 from large wheel (most efficient) + 0.33 from left pylon + 0.3 from right pylon
		}
	}
	// IndicatorLights emissives
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/nubbinLamp:0
		emissiveName = batteryIndicator
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp:0,1,2,3
		emissiveName = reactionWheelIndicator
	}
	MODULE
	{
		name = ModuleControllableEmissive
		target = IndicatorLights/Meshes/squareLamp:4,5
		emissiveName = tankIndicator
	}
	// IndicatorLights controller for reaction wheel
	MODULE
	{
		name = ModuleReactionWheelIndicator
		emissiveName = reactionWheelIndicator
	}
	MODULE
	{
		name = ModuleLight
		lightName = spotlight
		useAnimationDim = true
		lightBrightenSpeed = 2.5
		lightDimSpeed = 2.5
		animationName = LightAnimation
		resourceAmount = 0.02
		useResources = true
	}
	// IndicatorLights controller for battery
	MODULE
	{
		name = ModuleResourceLevelIndicator
		resourceName = ElectricCharge
		controllerName = ElectricChargeResourceLevelIndicator
	}
	MODULE
	{
		name = ModuleResourceEnabledIndicator
		resourceName = ElectricCharge
		enabledColor = ElectricChargeResourceLevelIndicator
		disabledColor = blink(ElectricChargeResourceLevelIndicator, 900, $Off, 300)
		emissiveName = batteryIndicator
	}
	// IndicatorLights controller for tank
	// Composite of LiquidFuel and Oxidizer.  Based on example at:
	// https://github.com/KSPSnark/IndicatorLights/blob/master/examples/MultipleResourceIndicator.cfg
	// First, the indicators for liquidfuel and oxidizer. It's color-coded based on the
	// amount of fuel we have. If the fuel is disabled, it flashes.
	MODULE
	{
		name = ModuleResourceLevelIndicator
		controllerName = liquidFuelLevel
		resourceName = LiquidFuel
	}
	MODULE
	{
		name = ModuleResourceEnabledIndicator
		controllerName = liquidFuelEnabled
		resourceName = LiquidFuel
		enabledColor = liquidFuelLevel
		disabledColor = blink(liquidFuelLevel, 900, $Off, 300)
	}
	MODULE
	{
		name = ModuleResourceLevelIndicator
		controllerName = oxidizerLevel
		resourceName = Oxidizer
	}
	MODULE
	{
		name = ModuleResourceEnabledIndicator
		controllerName = oxidizerEnabled
		resourceName = Oxidizer
		enabledColor = oxidizerLevel
		disabledColor = blink(oxidizerLevel, 900, $Off, 300)
	}

	// A "composite" indicator for both resources.
	// First, we need a scalar indicator for the resource amount. We want
	// this to be a composite of the amounts of liquid fuel and oxidizer,
	// picking whichever one is lowest.
	MODULE {
		name = ModuleScalarIndicator
		controllerName = dualLevel
		// Use minimum input value. Also supports "maximum" and "average".
		operation = minimum
		inputs = liquidFuelLevel, oxidizerLevel
		highColor = $HighResource
		mediumColor = $MediumResource
		lowColor = $LowResource
		criticalColor = pulsate($LowResource, 1200, 1, 0.6)
	}
	// We feed that into a composite boolean indicator that tracks whether
	// all the resources are enabled or not. We want it to flash if *any*
	// of the resources are disabled.
	MODULE {
		name = ModuleBooleanIndicator
		// Use logical AND of inputs.  Also supports "or".
		operation = and
		// Note that you can put a "!" in front of a boolean input to invert it
		inputs = liquidFuelEnabled, oxidizerEnabled
		activeColor = dualLevel
		inactiveColor = blink(dualLevel, 900, $Off, 300)
		emissiveName = tankIndicator
	}
}

 

 

Have you tried to take it all out of the cfg ?

	MODULE 
	{
		name = ModuleAnimateGeneric
		animationName = Deploy
		isOneShot = false
		startEventGUIName = Extend Antenna
		endEventGUIName = Retract Antenna
		actionGUIName = Toggle Antenna
		allowAnimationWhileShielded = False
	}

And you post 2 cfg's they don't match

Has you can see

	MODULE
	{
		name = ModuleDeployableAntenna
		showStatus = false
		isTracking = false
		pivotName = AntennaHolster
		raycastTransformName = AntennaHolster
		animationName = Deploy
	}

	MODULE
	{
		name = ModuleDataTransmitter
		antennaType = DIRECT
		packetInterval = 0.35
		packetSize = 2
		packetResourceCost = 12.0
		requiredResource = ElectricCharge
		DeployFxModules = 0                 <---------------- this is telling it to play animation from MODULE before it 
		antennaPower = 2000000000
		antennaCombinable = True
	}

 

Link to comment
Share on other sites

Usually when a piece start to animate as soon as you pick it up, it is a Unity issue. Auto start animation in the part config in Unity may be set to true. This has been the case with me anyway, I often forget to turn it off.

Link to comment
Share on other sites

5 hours ago, MeCripp said:

Have you tried to take it all out of the cfg ?

All of what?  Removing the whole ModuleAnimateGeneric breaks it.

5 hours ago, MeCripp said:

And you post 2 cfg's they don't match

The first one (with the "...."'s in it) was just a short snippet to highlight the important bits (that's why I said "something like this").  The full CFG I am actually using is below.  I thought the first one conveyed the general idea of what I was doing; other than the fact the first one has redacted the other modules etc, is there something major between them that's very different?

5 hours ago, MeCripp said:

DeployFxModules = 0 <---------------- this is telling it to play animation from MODULE before it

Ah!  I had no idea that's what that does!  I will investigate further and try removing it or using different values.  What does that "0" mean?  Is it an index that means "the first module", or is it an offset from the current one?  Or something else?  That explains why on the old part my animation only played when ModuleAnimateGeneric was the first module!  (Thanks!)

Edited by Fwiffo
Link to comment
Share on other sites

5 hours ago, akron said:

Usually when a piece start to animate as soon as you pick it up, it is a Unity issue. Auto start animation in the part config in Unity may be set to true.

Think you may be on the right track.

When I remove all the other MODULE's, it still doesn't work.  But when I further remove all other meshes except the antenna and lander can, it works.  So it must be due to the combination or ordering of my MODEL statements (and something which using the older-fashioned ModuleAnimateGeneric syntax overcomes).

Edited by Fwiffo
Link to comment
Share on other sites

When I remove both the ladder and spotlight meshes it works.  Removing one isn't enough; I have to remove both.

Some further testing revealed the problem occurs when there are other meshes containing animations occurring before the mediumDishAntenna mesh.

e.g. Having either of

model = Squad/Parts/Utility/ladderTelescopic/model

or

model = Squad/Parts/Utility/spotLightMk1/model

before

model = Squad/Parts/Utility/commsAntennaDTS-M1/mediumDishAntenna

breaks ModuleDeployableAntenna (but including the old-style ModuleAnimateGeneric in the part repairs things).

@MeCripp, @akron or anyone:  Any theories on this wackiness?  Why isn't animationName of ModuleDeployableAntenna preventing this problem? (presumably it should pick out the Deploy animation)

I did even try moving ModuleDeployableAntenna to the top of the modules section (to be sure DeployFxModules was referencing it as @akron suggested) but it still didn't work if my antenna mesh wasn't the first MODEL.

Edited by Fwiffo
Link to comment
Share on other sites

Here are two compact part files that demonstrate the issue.  Notice the only difference is the ordering of the meshes.  Is this a bug?

AntTest1-works.cfg:

Spoiler

PART
{
	name = AntTest1-works
	module = Part
	author = Fwiffo
	rescaleFactor = 1
	PhysicsSignificance = -1
	node_stack_topfuelTankSmall0 = -0.01, 0.558, 0.034, 0, 1, 0, 1
	node_stack_bottomfuelTankSmall0 = -0.01, -0.552, 0.034, 0, -1, 0, 1
	node_attach = 0.626, 0, 0, 0.125, 0, 0, 1
	CrewCapacity = 0
	TechRequired = generalRocketry
	entryCost = 8200
	cost = 1275
	category = FuelTank
	subcategory = 0
	title = AntTest1-works
	manufacturer = Fwiffo Industries
	description = Demonstration of how multiple animation meshes break ModuleDeployableAntenna.  This one has mediumDishAntenna and spotLightMk1.
	attachRules = 1,1,1,1,0,0,0
	mass = 0.174999997
	dragModelType = default
	maximum_drag = 0.174999997
	minimum_drag = 0.187999994
	angularDrag = 1
	crashTolerance = 6
	breakingForce = 40
	breakingTorque = 40
	maxTemp = 2000
	fuelCrossFeed = True
	explosionPotential = 0.5
	thermalMassModifier = 1
	heatConductivity = 0.12
	emissiveConstant = 0.5
	radiatorHeadroom = 0.25
	bulkheadProfiles = srf
	MODEL
	{
		model = Squad/Parts/FuelTank/fuelTankT200/model
		position = -0.01, 0.003, 0.034
		scale = 1.25, 1.25, 1.25
	}
	MODEL
	{
		model = Squad/Parts/Utility/commsAntennaDTS-M1/mediumDishAntenna
		position = 0.215, -0.07, -0.51
		scale = 1, 1, 1
		rotation = 90, 157.5, 0
	}
	MODEL
	{
		model = Squad/Parts/Utility/spotLightMk1/model
		position = -0.307, 0.002, -0.683
		scale = 1, 1, 1
		rotation = 0, 22.5, 0
	}
	RESOURCE
	{
		name = LiquidFuel
		amount = 90
		maxAmount = 90
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 110
		maxAmount = 110
	}
	MODULE
	{
		name = ModuleDeployableAntenna
		showStatus = false
		isTracking = false
		pivotName = AntennaHolster
		raycastTransformName = AntennaHolster
		animationName = Deploy
	}
	MODULE
	{
		name = ModuleDataTransmitter
		antennaType = DIRECT
		packetInterval = 0.35
		packetSize = 2
		packetResourceCost = 12.0
		requiredResource = ElectricCharge
		DeployFxModules = 0
		antennaPower = 2000000000
		antennaCombinable = True
	}
	MODULE
	{
		name = ModuleLight
		lightName = spotlight
		useAnimationDim = true
		lightBrightenSpeed = 2.5
		lightDimSpeed = 2.5
		resourceAmount = 0.04
		animationName = LightAnimation
		useResources = true
	}
}

 

AntTest2-broken.cfg:

Spoiler

PART
{
	name = AntTest2-broken
	module = Part
	author = Fwiffo
	rescaleFactor = 1
	PhysicsSignificance = -1
	node_stack_topfuelTankSmall0 = -0.01, 0.558, 0.034, 0, 1, 0, 1
	node_stack_bottomfuelTankSmall0 = -0.01, -0.552, 0.034, 0, -1, 0, 1
	node_attach = 0.626, 0, 0, 0.125, 0, 0, 1
	CrewCapacity = 0
	TechRequired = generalRocketry
	entryCost = 8200
	cost = 1275
	category = FuelTank
	subcategory = 0
	title = AntTest2-broken
	manufacturer = Fwiffo Industries
	description = Demonstration of how multiple animation meshes break ModuleDeployableAntenna.  This one has mediumDishAntenna and spotLightMk1.
	attachRules = 1,1,1,1,0,0,0
	mass = 0.174999997
	dragModelType = default
	maximum_drag = 0.174999997
	minimum_drag = 0.187999994
	angularDrag = 1
	crashTolerance = 6
	breakingForce = 40
	breakingTorque = 40
	maxTemp = 2000
	fuelCrossFeed = True
	explosionPotential = 0.5
	thermalMassModifier = 1
	heatConductivity = 0.12
	emissiveConstant = 0.5
	radiatorHeadroom = 0.25
	bulkheadProfiles = srf
	MODEL
	{
		model = Squad/Parts/FuelTank/fuelTankT200/model
		position = -0.01, 0.003, 0.034
		scale = 1.25, 1.25, 1.25
	}
	MODEL
	{
		model = Squad/Parts/Utility/spotLightMk1/model
		position = -0.307, 0.002, -0.683
		scale = 1, 1, 1
		rotation = 0, 22.5, 0
	}
	MODEL
	{
		model = Squad/Parts/Utility/commsAntennaDTS-M1/mediumDishAntenna
		position = 0.215, -0.07, -0.51
		scale = 1, 1, 1
		rotation = 90, 157.5, 0
	}
	RESOURCE
	{
		name = LiquidFuel
		amount = 90
		maxAmount = 90
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 110
		maxAmount = 110
	}
	MODULE
	{
		name = ModuleDeployableAntenna
		showStatus = false
		isTracking = false
		pivotName = AntennaHolster
		raycastTransformName = AntennaHolster
		animationName = Deploy
	}
	MODULE
	{
		name = ModuleDataTransmitter
		antennaType = DIRECT
		packetInterval = 0.35
		packetSize = 2
		packetResourceCost = 12.0
		requiredResource = ElectricCharge
		DeployFxModules = 0
		antennaPower = 2000000000
		antennaCombinable = True
	}
	MODULE
	{
		name = ModuleLight
		lightName = spotlight
		useAnimationDim = true
		lightBrightenSpeed = 2.5
		lightDimSpeed = 2.5
		resourceAmount = 0.04
		animationName = LightAnimation
		useResources = true
	}
}

 

(Note: Cross-referenced here in hope of getting some more developer eyes on my question now that I've isolated the specific cause)

Edited by Fwiffo
Increase font size so this post stands out in the thread
Link to comment
Share on other sites

For one this looks like a part weld with stock parts is there a mu for this also

PART
{
	name = AntTest2-broken
	module = Part        <----------  this goto anypart ?

Or can go


PART
{
	name = AntTest2-broken
	module = Part                  //<------------ can this line be deleted or is there a mu for it also
	MODEL
	{
		model = Squad/Parts/FuelTank/fuelTankT200/model
		position = -0.01, 0.003, 0.034
		scale = 1.25, 1.25, 1.25
	}
	MODEL
	{
		model = Squad/Parts/Utility/spotLightMk1/model
		position = -0.307, 0.002, -0.683
		scale = 1, 1, 1
		rotation = 0, 22.5, 0
	}
	MODEL
	{
		model = Squad/Parts/Utility/commsAntennaDTS-M1/mediumDishAntenna
		position = 0.215, -0.07, -0.51
		scale = 1, 1, 1
		rotation = 90, 157.5, 0
	}
	author = Fwiffo
	rescaleFactor = 1
	PhysicsSignificance = -1
	node_stack_topfuelTankSmall0 = -0.01, 0.558, 0.034, 0, 1, 0, 1
	node_stack_bottomfuelTankSmall0 = -0.01, -0.552, 0.034, 0, -1, 0, 1
	node_attach = 0.626, 0, 0, 0.125, 0, 0, 1
	CrewCapacity = 0
	TechRequired = generalRocketry
	entryCost = 8200
	cost = 1275
	category = FuelTank
	subcategory = 0
	title = AntTest2-broken
	manufacturer = Fwiffo Industries
	description = Demonstration of how multiple animation meshes break ModuleDeployableAntenna.  This one has mediumDishAntenna and spotLightMk1.
	attachRules = 1,1,1,1,0,0,0
	mass = 0.174999997
	dragModelType = default
	maximum_drag = 0.174999997
	minimum_drag = 0.187999994
	angularDrag = 1
	crashTolerance = 6
	breakingForce = 40
	breakingTorque = 40
	maxTemp = 2000
	fuelCrossFeed = True
	explosionPotential = 0.5
	thermalMassModifier = 1
	heatConductivity = 0.12
	emissiveConstant = 0.5
	radiatorHeadroom = 0.25
	bulkheadProfiles = srf

	MODULE
	{
		name = ModuleDeployableAntenna
		showStatus = false
		isTracking = false
		pivotName = AntennaHolster
		raycastTransformName = AntennaHolster
		animationName = Deploy
	}
	MODULE
	{
		name = ModuleDataTransmitter
		antennaType = DIRECT
		packetInterval = 0.35
		packetSize = 2
		packetResourceCost = 12.0
		requiredResource = ElectricCharge
		DeployFxModules = 0
		antennaPower = 2000000000
		antennaCombinable = True
	}
	MODULE
	{
		name = ModuleLight
		lightName = spotlight
		useAnimationDim = true
		lightBrightenSpeed = 2.5
		lightDimSpeed = 2.5
		resourceAmount = 0.04
		animationName = LightAnimation
		useResources = true
	}
	RESOURCE
	{
		name = LiquidFuel
		amount = 90
		maxAmount = 90
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 110
		maxAmount = 110
	}
}

This is how i would write a part weld

Edited by Mecripp2
Link to comment
Share on other sites

21 minutes ago, MeCripp said:

For one this looks like a part weld with stock parts is there a mu for this also

Correct, it's a weldment.  The only mu's involved are the stock ones for the three parts (fuelTankT200, spotLightMk1, commsAntennaDTS-M1/mediumDishAntenna).

23 minutes ago, MeCripp said:

This is how i would write a part weld

So you keep the MODEL statements higher up (right where mesh syntax would have gone), and move the RESOURCE blocks to the bottom.  Thanks for showing me some best practices, but it didn't make any difference to the part's behavior.

I tried removing the "module = Part" line you annotated with "can this line be deleted", and got the error PartCompiler: Part config requires value 'module' is defined.

Link to comment
Share on other sites

first, the "module = Part" line is required, it must appear once (and only once) per part.cfg. It is the line that tells KSP that this is a Part and not something else (such as a resource definition) config file.

Second, I do have a couple suspicions about what is going on, but it will have to wait for a couple hours until I have to get back on to my KSP computer to investigate.

D.

Link to comment
Share on other sites

I ran this and don't see a problem what was it doing

PART
{
	name = AntTest2-broken
	module = Part                  

	MODEL
	{
		model = Squad/Parts/Utility/commsAntennaDTS-M1/mediumDishAntenna
		position = 0.215, -0.07, -0.51
		scale = 1, 1, 1
		rotation = 90, 157.5, 0
	}
	MODEL
	{
		model = Squad/Parts/Utility/spotLightMk1/model
		position = -0.307, 0.002, -0.683
		scale = 1, 1, 1
		rotation = 0, 22.5, 0
	}
	MODEL
	{
		model = Squad/Parts/FuelTank/fuelTankT200/model
		position = -0.01, 0.003, 0.034
		scale = 1.25, 1.25, 1.25
	}
	author = Fwiffo
	rescaleFactor = 1
	PhysicsSignificance = -1
	node_stack_topfuelTankSmall0 = -0.01, 0.558, 0.034, 0, 1, 0, 1
	node_stack_bottomfuelTankSmall0 = -0.01, -0.552, 0.034, 0, -1, 0, 1
	node_attach = 0.626, 0, 0, 0.125, 0, 0, 1
	CrewCapacity = 0
	TechRequired = generalRocketry
	entryCost = 8200
	cost = 1275
	category = FuelTank
	subcategory = 0
	title = AntTest2-broken
	manufacturer = Fwiffo Industries
	description = Demonstration of how multiple animation meshes break ModuleDeployableAntenna.  This one has mediumDishAntenna and spotLightMk1.
	attachRules = 1,1,1,1,0,0,0
	mass = 0.174999997
	dragModelType = default
	maximum_drag = 0.174999997
	minimum_drag = 0.187999994
	angularDrag = 1
	crashTolerance = 6
	breakingForce = 40
	breakingTorque = 40
	maxTemp = 2000
	fuelCrossFeed = True
	explosionPotential = 0.5
	thermalMassModifier = 1
	heatConductivity = 0.12
	emissiveConstant = 0.5
	radiatorHeadroom = 0.25
	bulkheadProfiles = srf

	MODULE
	{
		name = ModuleDeployableAntenna
		showStatus = false
		isTracking = false
		pivotName = AntennaHolster
		raycastTransformName = AntennaHolster
		animationName = Deploy
	}
	MODULE
	{
		name = ModuleDataTransmitter
		antennaType = DIRECT
		packetInterval = 0.35
		packetSize = 2
		packetResourceCost = 12.0
		requiredResource = ElectricCharge
		DeployFxModules = 0
		antennaPower = 2000000000
		antennaCombinable = True
	}
	MODULE
	{
		name = ModuleLight
		lightName = spotlight
		useAnimationDim = true
		lightBrightenSpeed = 2.5
		lightDimSpeed = 2.5
		resourceAmount = 0.04
		animationName = LightAnimation
		useResources = true
	}
	RESOURCE
	{
		name = LiquidFuel
		amount = 90
		maxAmount = 90
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 110
		maxAmount = 110
	}
}

You can see i set the MODEL's in the same order has the MODULE's

24 minutes ago, Diazo said:

first, the "module = Part" line is required, it must appear once (and only once) per part.cfg. It is the line that tells KSP that this is a Part and not something else (such as a resource definition) config file.

Second, I do have a couple suspicions about what is going on, but it will have to wait for a couple hours until I have to get back on to my KSP computer to investigate.

D.

And yes had a brain fart but module =   don't have to be part  it can be a couple of things

Link to comment
Share on other sites

46 minutes ago, MeCripp said:

I ran this and don't see a problem what was it doing

Yes, it works, 'cause you moved the mediumDishAntenna MODEL above any others (similar to my AntTest1-works.cfg).  That's the only thing which needs to be done to make it work.  My question is whether there's a way to have it work when mediumDishAntenna is not the first MODEL in a part.  I'm getting the impression this is an artifact of how the new ModuleDeployableAntenna works (e.g. that it seems to pick the first model that has an animation, rather than the first model that has an animation matching animationName).  I think the ModuleAnimateGeneric used by the old antennas was a little more "choosy" (but had to be wired up correctly with DeployFxModules).

Edited by Fwiffo
Link to comment
Share on other sites

But you don't want it first ?  Have you tried and count the Module in front of it starting with 0 and change the number to what place it's in because if you moved it down 1 them the DeployFxModules = 0 would be DeployFxModules = 1 and so on

Edited by Mecripp2
Link to comment
Share on other sites

1 minute ago, MeCripp said:

But you don't want it first ?

Yes, making it first solves my problem (as demonstrated by AntTest1-works.cfg).  But it seems kind of buggy (or at least, not as well thought out as I would expect considering this is a new module added in KSP 1.2 and devs should have learned from past shortcomings).

E.g. If you're forced to always put this model first, I could see how you'll quickly bump into conflicts when you want to add another partmodule whose animations follow a similar rule of "my model must be first".

6 minutes ago, MeCripp said:

How you tried and count the Module in front of it starting with 0 and change the number to what place it's in because if you moved it down 1 them the DeployFxModules = 0 would be DeployFxModules = 1 and so on

I did try playing with DeployFxModules, but as far as I can tell that's only a link between the two modules and has nothing to do with model index.  I believe my AntTest1-broken.cfg does have the correct DeployFxModules index.

Link to comment
Share on other sites

You right the DeployFxModules = 0 will only look for 0 it looks like was play around with it

 

EDIT- I even tried

	MODULE
	{
		name = ModuleDataTransmitter
		antennaType = DIRECT
		packetInterval = 0.35
		packetSize = 2
		packetResourceCost = 12.0
		requiredResource = ElectricCharge
		//DeployFxModules = 2
		antennaPower = 2000000000
		antennaCombinable = True
	}

and it still deployed and give one of the modders they picked up not to long ago, I don't see it getting better he's code always is buggy on linux or just buggy

Edited by Mecripp2
Link to comment
Share on other sites

1 hour ago, MeCripp said:

And yes had a brain fart but module =   don't have to be part  it can be a couple of things

Those are leftovers from before the partModule system was implemented. In theory in KSP 1.2, module always is Part, then the correct partModules get added to give that part the appropriate functionality.

As for your actual question, the first thing to note is that ModuleDeployableAntenna does NOT inherit from ModuleAnimateGeneric, so there is no guarantee the same named thing does the same thing between the two.

This is important becuase ModuleDeployableAntenna inherits from ModuleDeployablePart instead and it looks like there is a typo.

Specifically, when the part initializes, it uses the Unity GetComponentInChildren method which only returns the first animation found on the part, hence why the order matters.

The typo is that it looks like Squad meant to use GetComponentsInChildren (note the S) as the code in the rest of the module is setup to handle multiple animations. This would have slipped through QA because as long as there is only a single animation on the part, everything works.

So, explains what is going on at least, not sure there's a fix beyond placing it first as you have already discovered. Note that your model must be first only among model's that have animations, not all models, for things to work as expected.

D.

Edited by Diazo
Link to comment
Share on other sites

19 minutes ago, Diazo said:

Specifically, when the part initializes, it uses the Unity GetComponentInChildren method which only returns the first animation found on the part, hence why the order matters.

The typo is that it looks like Squad meant to use GetComponentsInChildren (note the S) as the code in the rest of the module is setup to handle multiple animations.

Aha!  That makes sense and jives with what I'm seeing.  Thanks a lot for the thorough explanation.

Is there already a bug opened on the tracker for the typo?

Also, how are you able to look so deep into Squad's source code?  Are you using a decompiler, backchannels, or are there resources out there of which I'm unaware?

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