Jump to content

How do I reference a Squad part's mesh/model without copying the entire folder?


Lord Aurelius

Recommended Posts

Hi Everyone,

I'm trying to make a new part based off of a stock part and the only way I've found to make it work is to copy the entire folder, complete with all model files. I've looked at the cfg files of other mods that are doing this and I tried to replicate the process but the best I can do is to get the part to show up without a texture (when I use MODEL {} even though the squad files don't use it), most of the time the part doesn't even appear in the parts list but it's always listed as being loaded in the database tab of the debug menu. I've also looked at the CFG file documentation and I didn't see anything in there that was helpful for this particular problem.

I'm sure this is a very simple fix, can someone help me out? For reference, the parts that I'm working with are the RT-10 booster and the 1.25m monoprop tank.

Link to comment
Share on other sites

Not sure what you want to change but maybe something like

+PART[rcsTankMini]
{
@name = rcsTankMini2
@title = FL-R10-2 RCS Fuel Tank2
@description = Jebediah Kerman's Junkyard and Spacecraft Parts Co
description = The FL-R10-2 is a miniature RCS tank for small probes and low volume monopropellant storage.

%scale = 1
%rescaleFactor = 0.5

@mass = 0.005
}

+PART[solidBooster]
{
@name = rcsTankMini2
@title = RT-10-2 Solid Fuel Booster
@description = Jebediah Kerman's Junkyard and Spacecraft Parts Co
description = While considered by some to be little more than "a trash bin full o' boom", The RT-10-2 is used in many space programs, whenever the need to save cash is greater than the need to keep astronauts alive. Use with caution, though. Once lit, solid fuel motors cannot be put out until the fuel runs out.

%scale = 1
%rescaleFactor = 1

@mass = 0.5
}
{
@MODULE[ModuleEngines]
@maxThrust = 350
}

EDIT- As long as you are using ModuleManager.2.5.1 or higher

EDIT- Open your text editter and copy that and save it as a ****.cfg and put it in KSP/GameData

EDIT- You can see, I just made some small changes.

Edited by Mecripp2
Link to comment
Share on other sites

Thanks, that at least gets the parts to show up. I'm having a bit of trouble with the module manager syntax though. I modified the SRB into a hybrid rocket and was using the RCS tank to hold oxidizer for it which means I need to add a new PROPELLANT{} struct and modify atmosphereCurve{} and RESOURCE{} structs and I'm not sure of the correct syntax for that, especially for atmosphereCurve since there are two lines in there with the same label. I also need to change the RESOURCE{} struct of the tank from monoprop to oxidizer.

Here's what I have at the moment:

+PART[solidBooster]
{
@name = HybridRocketBooster
@title = RT-11 Hybrid Rocket Booster
%manufacturer = Jebediah Kerman's Junkyard and Spacecraft Parts Co
@description = The engine for those who can't decide between liquid and solid boosters. This hybrid rocket uses solid propellant and liquid oxidizer for a solid booster that is throttleable and relatively efficient for a fraction of the cost of liquid boosters. It does have the slight downside of not being refuelable, but hey, it's a booster so you weren't planning on bringing it to orbit with you anyways, right?

@MODULE[ModuleEngines]
{
@maxThrust = 200
@throttleLocked = False
-useEngineResponseTime
-engineAccelerationSpeed
@allowShutdown = True
@PROPELLANT[SolidFuel]
{
@ratio = 0.9
}
+PROPELLANT[Oxidizer]
{
+ratio = 1.1
}
@atmosphereCurve
{
@key = 0 300
@key = 1 250
}
@RESOURCE[SolidFuel]
{
@amount = 180
@maxAmount = 180
}
}
}

+PART[RCSFuelTank]
{
@name = OxyTank
@title = FL-O25 Oxidizer Tank
@description = For some reason, nobody thought to put oxidizer in a tank by itself before. This tank fixes that problem for all your hybrid rocket (and spaceplane) needs.
-RESOURCE[MonoPropellant]
+RESOURCE[Oxidizer]
{
+amount = 220
+maxAmount = 220
}
}

Link to comment
Share on other sites

Here's my final code:

+PART[solidBooster]
{
@name = HybridRocketBooster
@title = RT-11 Hybrid Rocket Booster
%manufacturer = Jebediah Kerman's Junkyard and Spacecraft Parts Co
@description = The engine for those who can't decide between liquid and solid boosters. This hybrid rocket uses solid propellant and liquid oxidizer for a solid booster that is throttleable and relatively efficient for a fraction of the cost of liquid boosters. It does have the slight downside of not being refuelable, but hey, it's a booster so you weren't planning on bringing it to orbit with you anyways, right?

@MODULE[ModuleEngines]
{
@maxThrust = 200
@throttleLocked = False
@useEngineResponseTime = False
-engineAccelerationSpeed
@allowShutdown = True
@PROPELLANT[SolidFuel]
{
@ratio = 0.9
}
+PROPELLANT
{
%name = Oxidizer
%ratio = 1.1
%DrawGauge = False
}
@atmosphereCurve
{
-key
%key = 0 300
+key = 1 250
}
}
@RESOURCE[SolidFuel]
{
@amount = 180
@maxAmount = 180
}
}

+PART[RCSFuelTank]
{
@name = OxyTank
@title = FL-O25 Oxidizer Tank
@description = For some reason, nobody thought to put oxidizer in a tank by itself before. This tank fixes that problem for all your hybrid rocket (and spaceplane) needs.
-RESOURCE[MonoPropellant]
%RESOURCE
{
%name = Oxidizer
%amount = 220
%maxAmount = 220
}
}

Link to comment
Share on other sites

O Dang miss put a } , I used

+PART[RCSFuelTank]
{
@name = rcsTankHybrid
@title = FL-R10-2 Hybrid Fuel Tank
@description = Jebediah Kerman's Junkyard and Spacecraft Parts Co
description = The FL-R10-2 is a miniature Hybrid tank for small probes and low volume monopropellant storage.

@mass = 0.0625

@RESOURCE[MonoPropellant]
{
!name = DELETE
}

RESOURCE
{
name = LiquidFuel
amount = 45
maxAmount = 45
}

RESOURCE
{
name = Oxidizer
amount = 55
maxAmount = 55
}
}

+PART[solidBooster]
{
@name = Hybrid-Booster
@title = RT-10-2 Hybrid Fuel Booster
@description = Jebediah Kerman's Junkyard and Spacecraft Parts Co
description = While considered by some to be little more than "a trash bin full o' boom", The RT-10-2 is used in many space programs, whenever the need to save cash is greater than the need to keep astronauts alive. Use with caution, though. Once lit, solid fuel motors cannot be put out until the fuel runs out.

!stagingIcon = DELETE

@MODULE[ModuleEngines]
{
!name = DELETE
}

MODULE
{
name = ModuleEngines
thrustVectorTransformName = thrustTransform
exhaustDamage = True
ignitionThreshold = 0.1
minThrust = 0
maxThrust = 200
heatProduction = 300
@PROPELLANT[SolidFuel]
{
!name = DELETE
}
PROPELLANT
{
name = LiquidFuel
ratio = 0.9
DrawGauge = True
}
PROPELLANT
{
name = Oxidizer
ratio = 1.1
}
@atmosphereCurve
{
@key = 0 300
@key = 1 250
}

}

@RESOURCE[SolidFuel]
{
!name = DELETE
}

RESOURCE
{
name = LiquidFuel
amount = 45
maxAmount = 45
}

RESOURCE
{
name = Oxidizer
amount = 55
maxAmount = 55
}
}

EDIT- Glad you got it :D

Edited by Mecripp2
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...