Jump to content

ModuleProceduralFairing problems [Solved]


Recommended Posts

I'm trying to make a new fairing part and have run into two problems:

  1. What do I do to make the shell in the thumbnail not show up when the part is placed? - sort opposite of the engine fairing. To elaborate – the stock fairings have a bright white default shell in addition to the fairing base in the editor thumbnail but when the part is added to a ship the default shell is not displayed – only the procedural shell. Found the Icon_Only tag - Part doesn't compile when I use it but I'm thinking this has to be it.

  2. ModuleProceduralFairing has a Public attribute “fairingNode” that looks like a good candidate for positioning the procedural fairing. So I made a part with a shellTransform positioned appropriately and sure enough – everything worked. Then, just to make sure I understood what was going on, I moved the shellTransform 1 meter to the left. When I got it in game there was a node 1 meter to the left as expected – but the procedural fairing still appeared in the original spot. I did have a top stack node at this point so I removed it – but the fairing still appears in the original spot??? I must be missing something because there should be nothing to tell KSP where to put the fairing.

Any help with either of these two issues is appreciated.

Edit: The config file:

PART
{
name = Template.Fairing

module = Part
author = YourNameHere

MODEL
{
	model = Templates/Parts/Fairing/Fairing
}
scale = 1
rescaleFactor = 1

NODE
{
     name = BottomNode
     transform = StackBottom
     size = 1
     method = FIXED_JOINT
}

NODE
{
     name = Shell
     transform = shellTransform
     size = 1
     method = FIXED_JOINT
}

fx_gasBurst_white = 0.0, 0.3, 0.0, 0.0, 1.0, 0.0, deploy
sound_vent_large = deploy
	
TechRequired = start
entryCost = 1000
cost = 100
category = Payload
subcategory = 0
title = Template fairing
manufacturer = Kracken Snack Industries NLC
description = Fairing Template
attachRules = 1,0,1,1,0
mass = 0.05
thermalMassModifier = 2.0
skinMassPerArea = 4.0
skinInternalConductionMult = 0.25
emissiveConstant = 0.8
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 10
maxTemp = 2600
fuelCrossFeed = True
stageOffset = 1
childStageOffset = 1
inverseStageCarryover = false
bulkheadProfiles = size1
tags = aero )cap cargo cone contain drag fairing hollow inter nose payload protect rocket shroud stage (stor transport

MODULE
{
	name = ModuleProceduralFairing
	
	nSides = 32
	nArcs = 2				// Default number of sides in editor
	nCollidersPerXSection = 8
	TextureURL = KSI/Template/Parts/Template_UV
	
	panelGrouping = 3
	pivot = 0,0.17,0
	axis = 0,1,0
	
	baseRadius = 0.625
	maxRadius = 2
	capRadius = 0.2
	snapThreshold = 0.1
	
	xSectionHeightMin = 0.1
	xSectionHeightMax = 3
	
	edgeSlide = 0.15
	edgeWarp = 0
	noseTip = 0.7
	
	UnitAreaMass = 0.01
	UnitAreaCost = 6			// cost/sqr unit of paneling
	
	stagingToggleEnabledEditor = True
	stagingToggleEnabledFlight = False
	stagingEnableText = Fairing Not Staged
	stagingDisableText = Fairing Staged

	fairingNode = Shell
}

}

 

Edited by wasml
Link to comment
Share on other sites

  • 4 weeks later...

Update: the "pivot" config parameter adjusts the position where the fairing starts while "fairingNode" appears to be required but has no obvious effect. Meanwhile I found the Icon_Only tag on the stock fairings as suspected but whenever I include the tag anywhere in my model it fails to show in game - with the following error in the log:

[LOG 11:24:52.080] PartLoader: Compiling Part 'Templates/Parts/Fairing/Fairing/Template.Fairing'
[ERR 11:24:52.090] PartLoader: Encountered exception during compilation. UnityEngine.UnityException: Transform child out of bounds
  at (wrapper managed-to-native) UnityEngine.Transform:GetChild (int)
  at PartLoader.StripTaggedTransforms (UnityEngine.Transform root, System.String tag) [0x00000] in <filename unknown>:0 
  at PartLoader.StripTaggedTransforms (UnityEngine.Transform root, System.String tag) [0x00000] in <filename unknown>:0 
  at PartLoader.StripTaggedTransforms (UnityEngine.Transform root, System.String tag) [0x00000] in <filename unknown>:0 
  at PartLoader.StripTaggedTransforms (UnityEngine.Transform root, System.String tag) [0x00000] in <filename unknown>:0 
  at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0 
  at PartLoader+<CompileParts>c__Iterator1.MoveNext () [0x00000] in <filename unknown>:0 

[ERR 11:24:52.090] PartCompiler: Cannot compile part

Simply removing the tag and rewriting the .mu file corrects the problem - the part shows up in game.

I'm using Unity 2017.1.3 and removed part tools and reinstalled PartTools_AssetBundles_14x.unitypackage just to make sure I wasn't using the old part tools.

Imported a stock fairing and my fairing in Blender and toggled between them while watching the tags in the property window to make sure there wasn't a capitalization or underscore problem - didn't see any difference.

Does anyone know of any gotcha's or have any other ideas that I might try?

Link to comment
Share on other sites

What does the hierarchy of your part look like? Based on the stacktrace and name, I'd bet there's a bug in StrippedTaggedTransforms. Try making sure whatever element is tagged with Icon_Only is the very last child of its parent, wherever the tag appears

Link to comment
Share on other sites

@xEvilReeperx You got it! I had an Icon transform with the Icon_Only tag holding the meshes I didn't want to appear outside of the thumbnail followed by the stack nodes - I removed the stack nodes in blender and re-added higher up in Unity and it works as advertised now. Thanks!

Edited by wasml
clarification
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...