Jump to content

Have MaxQ affect only part of a model?


JohnnyPanzer

Recommended Posts

I'm making some all-in-one probes with buildt-in RT-antennas (among other things), and I've encountered a problem while writing the patches for RT. Since the antennas are animated and actually fold out of the model, I want MaxQ to affect them as per usual in RemoteTech, but the game freaks the hell out since the antennas are also the command pod and thereby the root node. Instead of snapping the pod off the rocket, it simply turns it off and sends the rocket off on an infinite journey with unchanged velocity. If the rocket was pointing at the ground at the moment of MaxQ, the pod smashes into the ground and just keeps going through the entire planet while exploding every few seconds.

Now, I tried manually changing the root of the rocket to a fuel tank underneath the pod, and that made MaxQ work as intended. It would appear that the game does NOT like it when the root part sheers off due to dynamic preassure. I also made sure to test the part with MaxQ edited out of the patch, and it worked like a charm. It's also worth mentioning that the part works as intended in stock KSP, and that I am testing using dedicated installs, one clean vanilla and one with RemoteTech and Module Manager as the only mods.

So now I have three options:

1. Force users (if I ever release the parts) to manually change the root of their rockets to avoid the bug. Not exactly an optimal solution.

2. Make the pod unaffected by MaxQ. Simple enough, but a bit boring since the antennas fold out and sure LOOK like they'd break under preassure.

3. Find a way to make MaxQ affect only specific meshes within the model.

Any help here would be greatly appreciated. I should also point out that I'm not good at coding, and that I've just begun to tweak (mostly using copy/paste) the MM patch files, so I'm sure they are currently less than optimal. With that said, I'll include both the part .cfg and the current RT-patch below. If nothing else, it'll give you something to snicker at. ;)

Spoiler

PART
{
	name = KsatComSmall
	module = Part
	author = Johnny Panzer
	mesh = model.mu
	rescaleFactor = 1.0
	CrewCapacity = 0
	node_stack_bottom = 0.0, -0.2, 0.0, 0.0, -1.0, 0.0, 0
	TechRequired = precisionEngineering
	entryCost = 16500
	cost = 14000
	category = Pods
	subcategory = 0
	title = K-Sat PzL-LO 1138
	manufacturer = PanzerLabs AeroSpace
	description = Part of a range of satellites from PanzerLabs AeroSpace, the PzL-LO 1138 is an all-in-one solution for low orbit communication networks. Using state of the art technology it is able to provide both storage and production of electricity, as well as a small array of antennas. 
	attachRules = 1,0,1,0,1 //stack: can it be stacked, SrfAttach: can it be attached, allowStack: can other parts be stacked, allowSrfAttach: can other parts attach, allowCollision: can it be placed if intersecting
	mass = 0.845
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 2
	crashTolerance = 6
	maxTemp = 1200
	vesselType = Probe
	bulkheadProfiles = size0
	MODULE
	{
		name = ModuleAnimateGeneric
		animationName = KsatComSmallOpen
		isOneShot = false
		startEventGUIName = Extend Com Array
		endEventGUIName = Retract Com Array
		actionGUIName = Toggle Com Array
		allowAnimationWhileShielded = False
	}
	MODULE
	{
		name = ModuleDataTransmitter
		packetInterval = 0.6
		packetSize = 2
		packetResourceCost = 12.0
		requiredResource = ElectricCharge
		DeployFxModules = 0
	}
	MODULE
	{
		name = ModuleCommand
		minimumCrew = 0
		RESOURCE
		{
			name = ElectricCharge
			rate = 0.05
		}
	}
	RESOURCE
	{
		name = ElectricCharge
		amount = 500
		maxAmount = 500
	}
	MODULE
	{
		name = ModuleReactionWheel
		PitchTorque = 0.3
		YawTorque = 0.3
		RollTorque = 0.3
		RESOURCE
		{
			name = ElectricCharge
			rate = 0.03
		}
	}
	MODULE
	{
		name = ModuleSAS
		SASServiceLevel = 2
	}
	MODULE
	{
		name = ModuleGenerator
		isAlwaysActive = true
		OUTPUT_RESOURCE
		{
			name = ElectricCharge
			rate = 0.4
		}
	}
}

 

Spoiler

@PART[KsatComSmall]:FOR[RemoteTech]
{
	!MODULE[ModuleDataTransmitter] {}
	
	@MODULE[ModuleAnimateGeneric]
	{
		%allowManualControl = false
	}
	
	%MODULE[ModuleRTAntenna] {
		%Mode0OmniRange = 0
		%Mode1OmniRange = 2500000
		%MaxQ = 6000
		%EnergyCost = 0.13
		
		%DeployFxModules = 0
		
		%TRANSMITTER {
			%PacketInterval = 0.3
			%PacketSize = 2
			%PacketResourceCost = 15.0
		}
	}
	
	%MODULE[ModuleSPUPassive] {}

	%MODULE[ModuleSPU] {}
	
	%MODULE[ModuleRTAntennaPassive]	{
		%TechRequired = unmannedTech
		%OmniRange = 3000
		
		%TRANSMITTER {
			%PacketInterval = 0.3
			%PacketSize = 2
			%PacketResourceCost = 15.0
		}
	}
}

 

 

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