Jump to content

How to clone a custom part?


Recommended Posts

Might not be right subforum here, anyways... I'm trying to make a very simple custom part by cloning the CFG from a good, working part. Thought I had this figured out once but I seem to be missing something, as the part I'm trying to make isn't showing up in game.

Here's the CFG from the known working part: configc.cfg

PART
{
// --- general parameters ---
name = Decal curved
module = Part
author = Krasimir

// --- asset parameters ---
mesh = decalccc.mu
scale = 1
rescaleFactor = 2.0

MODEL
{
   model = NEBULA/decals/decalccc
   position = 0.0, 0.0, 0.0
   scale = 1.0, 8.0, 1.0
   rotation = 0, 0, 0   
   texture = decalc, NEBULA/decals/textures/dcl
}
MODULE
{
	name = FStextureSwitch2
	moduleID = 1011	
	objectNames = decalc
	nextButtonText = Next Texture
	prevButtonText = Previous Texture
	statusText = Current Texture
	repaintableEVA = true
	showListButton = False
	textureRootFolder = NEBULA/decals/textures/
	textureNames = dcl;nebula;esa1;esa2;eustars;squad;iss;nasa1;nasa2;roskosmos1;roskosmos2;energia1;euflag;usflag;ruflag;ruflag2;rusroundel;usairforce1x8;usairforce1x8b;ussari2;ussari3
// Add your texture name at the end of the above line with a semicolon before it
// Copy your texture in the GameData/NEBULA/decals/textures/
 }
MODULE
{
    name = TweakScale
    type = free
}

PhysicsSignificance = 1

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z
node_attach = 0.0, 0.0, 0.0, 1.0, 0.0, 0.0

// --- editor parameters ---
TechRequired = spaceExploration
entryCost = 100
cost = 10
category = Utility
subcategory = 0
title = Curved decal
manufacturer = NEBULA
description = Curved decal - fits well to curved surface. Right click to open GUI to change scale and textures.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 0,1,0,1,0

// --- standard part parameters ---
mass = 0.001
dragModelType = default
maximum_drag = 0.00
minimum_drag = 0.00
angularDrag = 0
crashTolerance = 8
maxTemp = 3200

PhysicsSignificance = 1

}

Here's the clone I'm trying to make with a couple of very simple tweaks. I'm probably missing something equally simple & stupid. configc1.cfg

PART
{
// --- general parameters ---
name = Decal curved 2
module = Part
author = Krasimir

// --- asset parameters ---
mesh = decalccc.mu
scale = 1
rescaleFactor = 1.0

MODEL
{
   model = NEBULA/decals/decalccc
   position = 0.0, 0.0, 0.0
   scale = 1.0, 1.0, 1.0
   rotation = 0, 0, 0   
   texture = decalc, NEBULA/decals/textures/dcl
}
MODULE
{
	name = FStextureSwitch2
	moduleID = 1011	
	objectNames = decalc
	nextButtonText = Next Texture
	prevButtonText = Previous Texture
	statusText = Current Texture
	repaintableEVA = true
	showListButton = False
	textureRootFolder = NEBULA/decals/textures/
	textureNames = dcl;nebula;esa1;esa2;eustars;squad;iss;nasa1;nasa2;roskosmos1;roskosmos2;energia1;euflag;usflag;ruflag;ruflag2;rusroundel;kWl50Rf
// Add your texture name at the end of the above line with a semicolon before it
// Copy your texture in the GameData/NEBULA/decals/textures/
 }
MODULE
{
    name = TweakScale
    type = free
}

PhysicsSignificance = 1

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z
node_attach = 0.0, 0.0, 0.0, 1.0, 0.0, 0.0

// --- editor parameters ---
TechRequired = spaceExploration
entryCost = 100
cost = 10
category = Utility
subcategory = 0
title = Curved decal 2
manufacturer = NEBULA
description = Curved decal - fits well to curved surface. Right click to open GUI to change scale and textures.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 0,1,0,1,0

// --- standard part parameters ---
mass = 0.001
dragModelType = default
maximum_drag = 0.00
minimum_drag = 0.00
angularDrag = 0
crashTolerance = 8
maxTemp = 1200

PhysicsSignificance = 1

}

Anything sticking out here?

Link to comment
Share on other sites

At first glance, the only thing I see wrong here is the spaces in the name. That can cause you problems but AFAICR it wouldn't stop it from showing up in the editor. But if something changed in KSP 1.x in how resource URLs are dealt with then the name could be too similar with everything after the first space being truncated.

I did a diff comparison of the two and none of the other changes should be a factor but I'll look again and see if I missed something.

(as far as the name goes, instead of spaces use either periods or underscores, but even underscores are an issue and are actually internally converted to periods, which you will see if you ever look at a part in a save file that had underscores or spaces)

EDIT: 

Also, stupid question, but did you search EVERY page in the Utility category? Depending on where your config file for part #2 is, it might not be sorted with part #1. (for instance, if part #1 was in some other mod that you're working with and you created a second mod folder to do your work on part #2 in)

Edited by Starwaster
Link to comment
Share on other sites

As no one has answered this yet I was thinking the spaces in the names - if KSP reads "name = Decal curved" as "name = Decal" then both your parts would have the same name according to KSP

Link to comment
Share on other sites

Yeah, just tested for issues with spaces by renaming a part that I had been cloning to have a space in its name ("ionEngine 2") and that wasn't enough to stop it from appearing in the editor.

So that still works at least...

Link to comment
Share on other sites

Can't find any obvious mistakes too.
If all else fails, clone the original config again, this time only changing name = ..., check in-game, then change another one or two parameters and check again, etc. That way it'll be easier to narrow down any possible mistakes.

Link to comment
Share on other sites

You did restart KSP didn't you?

Whenever you put a new part in the GameData folder you need to either reload the database (debug menu) or completely restart the game. It doesn't matter which. :)

Good luck and Happy Flying

YargJay9991

Link to comment
Share on other sites

On 3/7/2016 at 4:26 PM, CatastrophicFailure said:

Gentlekerbs.... thank you kindly for all your assistance, however...

18s3yoan9thocjpg.jpg

I was doing all this config tweaking in an old unused backup folder, not the relevant KSP one. :blush:

The part is working fine. Now I'm going to go find a quiet corner and have a good cry. chmzxYP.gif

Don't be so hard on yourself. If KSP players never made mistakes, KSP wouldn't be as much fun.

What I'm really saying is, you should go console yourself with "mistakes." Very explosive, Whackjobian "mistakes."

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