Jump to content

How do I reference one part in a folder with more than one part in it?


Galane

Recommended Posts

This bit is from the Flip Fantasia Airliner Wing in ReStock Reloaded Ninety. How do I tell it which part I want to use in the MK1 folder that has several parts in it? The same issue affects the small drop tank and some other parts.


MODEL
{
model = Squad/Parts/Aero/wingletAV-R8/model
position = 0, 0.0, 0
scale = 12, 4, 4
rotation = 0, 0, 0
}

MODEL
{
model = Squad/Parts/MK1/mk1structural
position = 4.3, 0.5, 0
scale = 1.25, 3.5, 1.25
rotation = 0, 0, 0
}

Link to comment
Share on other sites

Except for the small problem of that not working. The ReStock cfg files are all in one folder. For any stock part that has one model per folder, it works. But if there are more than one model in the folder, the referenced model does not display as part of the combination part.

I could try placing the custom cfg into the multi-part folder and see if that works, but that would add complexity to the installing of the mod. 'Course people *should* be able to follow directions... :rolleyes:

Stock part where it works.


PART
{
// Kerbal Space Program - Part Config
// Fuselage Fuel Tank
//

// --- general parameters ---
name = Mk1FuselageStructural
module = Part
author = C. Jenkins

MODEL
{
model = Squad/Parts/Mk1/mk1structural
}


// --- asset parameters ---
scale = 0.01

// --- node definitions ---
node_stack_top = 0.0, 75.0, 0.0, 0.0, 1.0, 0.0
node_stack_bottom = 0.0, -75.0, 0.0, 0.0, 1.0, 0.0
node_attach = 0.0, 0.0, -51.0, 0.0, 0.0, 1.0, 1



// --- editor parameters ---
TechRequired = advConstruction
entryCost = 2500
cost = 380
category = Structural
subcategory = 0
title = Structural Fuselage
manufacturer = C7 Aerospace Division
description = A standard fuselage. Carries no fuel; is there merely as a structural element. As such, it's lighter and more solid due to reinforcements.

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

// --- standard part parameters ---
mass = 0.1
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.3
angularDrag = 2
crashTolerance = 70
breakingForce = 50
breakingTorque = 50
maxTemp = 3000
fuelCrossFeed = True

}

Custom part where it doesn't


PART
{


// --- general parameters ---
name = longWing
module = Winglet
author = Squad, PolecatEZ

// --- asset parameters ---
MODEL
{
model = Squad/Parts/Aero/wingletAV-R8/model
position = 0, 0.0, 0
scale = 12, 4, 4 //width - adjust scale, length, thickness, 1.75, 1.1 is delta wing
rotation = 0, 0, 0
// parent = anotherModelTransform <---------Not necessary unless Second or subsequent part.
// texture = model000 , Squad/Parts/Command/probeCoreOcto/model000
// texture = model001 , Squad/Parts/FuelTank/fuelTank2-2/model001
}

MODEL
{
model = Squad/Parts/MK1/mk1structural
position = 4.3, 0.5, 0
scale = 1.25, 3.5, 1.25 //width - adjust scale, length, thickness, 1.75, 1.1 is delta wing
rotation = 0, 0, 0
// parent = anotherModelTransform <---------Not necessary unless Second or subsequent part.
// texture = model000 , Squad/Parts/Command/probeCoreOcto/model000
// texture = model001 , Squad/Parts/FuelTank/fuelTank2-2/model001
}

rescaleFactor = 1
scale = 1

// --- editor parameters ---
TechRequired = advFlightControl
entryCost = 4600
cost = 500
category = Aero
subcategory = 0
title = Flip Fantasia Airline Wing
manufacturer = AeroKerbin X Planes Division
description = This airline wing looks like a lot of fun, why don't you make that massive airplane you've been dreaming about.

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

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z
node_attach = 5.30, 0.0, 0.0, 1.0, 0.0, 0.0
node_stack_front = 4.30, 3.13, 0.0, 0.0, 1.0, 0.0, 2
node_stack_back = 4.30, -2.125, 0.0, 0.0, 1.0, 0.0, 2

// --- standard part parameters ---
mass = 0.22
dragModelType = override
maximum_drag = 0.02
minimum_drag = 0.02
angularDrag = 2
breakingForce = 970
breakingTorque = 970
crashTolerance = 30
maxTemp = 3400
explosionPotential = 0.1
fuelCrossFeed = True
// --- winglet parameters ---
// dragCoeff will override the maximum_drag value
dragCoeff = 0.6
deflectionLiftCoeff = 9.4



// --- tweakables (coming soon...) ---




// ----- DO NOT EDIT BELOW THIS POINT ------

}

Edited by Galane
Link to comment
Share on other sites

All of which I have no idea how to even begin to do without a full example to follow. Like all the rest of these I've been doing, it's all from the original ReStock and examining stock CFGs and repeated number adjusting to get things sized and positioned properly. The extent of my coding skills is TI BASIC and Extended BASIC around 20 years ago and some minimal HTML. The most complex code I ever did was a Marvel Superheroes RPG character generator, which I wrote out completely on paper before typing it into the computer.

Another one is the ThunderMax interstage. It's basically two scaled copies of the MK1 fuselage plus a bunch of nodes, and nothing else. MM would have to clone the original CFG and pretty much completely re-write it.

Last night I tried re-arranging in the CFG to put the call to mk1structural first. Still doesn't render. Then I renamed the folder to TReStock and it loaded after all the stock parts, still no change in the MK1 pieces not rendering.

I'd just thought about possibly using Module Manager to patch a reference to the stock MK1 parts into the CFG files. If that would work it would be great! The MM cfg would be included with ReStock. Would introduce MM as a dependency but most players running mods already have that.

If Module Manager can't do it then it looks like I'll have to include instructions to make and rename copies of the MK1 parts, each to its own folder, minus the cfg files to avoid duplicates in inventory, so a call like Squad/Parts/MK1/mk1structural/model which has always worked before with one-part-per-folder will do the job.

Edited by Galane
Link to comment
Share on other sites

Copying the stock .mu and .mbm files to somewhere else so that each folder contains only on each .mu and .mbm file makes it work. It's a kludge and it requires additional action by the user, but it works.

I'd still like to find a way to be able to directly call the stock parts in their original location.

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