Jump to content

Some Questions about part.cfgs and modding (making duplicates of existing parts, etc.)


Markelius

Recommended Posts

Hey all! I haven't posted here yet, figured here would be a good place to start.

Anyways, I've been fiddling with parts a little, I figured out the workings of the .cfg format pretty quickly, it shares a lot of similarities with the JSON notation Starbound uses. What I was wondering was, how do I make a new part based on an existing part? For example, if I wanted to take the Quad Nuke Engine from ModularRocketSystems and create a duplicate version of it that uses LiquidHydrogen from NearFuturePropulsion, how would I go about this? Is there a way I can have the .cfg for the new part be in a new folder as if it was a part created from scratch and simply point to the model and texture from the original part?

I imagine another solution would be to use modulemanager to make the Rocket be switchable between LFO and LiquidHydrogen, if anyone knows how I can do that, I'd love to hear it, I'd still like to know how to make duplicate parts though!

Lastly, I would like to learn how to make parts from scratch, I've modded for 3d games before, so I'm already familiar with the modeling & texturing aspect, but I've never done anything in Unity before. I've read over the "Making an asset from start to finish" tutorial on the ksp wiki a number of times, and have seen a couple on Youtube, but I'm interested in knowing if there's a good tutorial more focused on the unity aspect of modding for people who already have *gotten their feet wet* in the modeling&texturing area.

Let me know! :)

Link to comment
Share on other sites

on the cfgs... KSP will load a part for each one there is.

So as long as they have a unique name (in the file, not file name). You'll get a different part. I've got a pile of cfgs in a folder of my own for re-scaled parts, ones that use different fuels, etc.

There is a cfg (several actually) floating around from Atomic Age and from NFT itself showing how to swap fuel types on the NTRs. I'd take a look at those for inspiration.

Doing the in game fuel switch requires using the firespitter DLL... I believe Nil2Work's orbital tug has a good example of how to do that (though his lets you do it during flight, not just in the VAB).

Link to comment
Share on other sites

For example, if I wanted to take the Quad Nuke Engine from ModularRocketSystems and create a duplicate version of it that uses LiquidHydrogen from NearFuturePropulsion, how would I go about this? Is there a way I can have the .cfg for the new part be in a new folder as if it was a part created from scratch and simply point to the model and texture from the original part?

Module manager patch to duplicate a part and change the propellant it's engine uses


+PART[<originalPartName] // the '+' operator duplicates
{
@name = <newPartName> // each part needs a unique name field
@title = <newPartTitle> // new name for the part in game

@MODULE[ModuleEngines]
{
!PROPELLANT[<PropellantNameToRemove>] {} // remove the existing PROPELLANT node
PROPELLANT // add a new one
{
name = <PropellantNameToAdd>
ratio = 1
}
}

// etc.
}

I imagine another solution would be to use modulemanager to make the Rocket be switchable between LFO and LiquidHydrogen, if anyone knows how I can do that, I'd love to hear it, I'd still like to know how to make duplicate parts though

You can add a MultiMode Engine if you only need two modes (take a look at how the Rapier is set up), for more you'll need a plugin I believe (EDIT: not MM)

Edited by Crzyrndm
Link to comment
Share on other sites

I imagine another solution would be to use modulemanager to make the Rocket be switchable between LFO and LiquidHydrogen, if anyone knows how I can do that, I'd love to hear it, I'd still like to know how to make duplicate parts though!

Crzyrndm already provided all the useful bits but just to make it clearer : ModuleManager only works on the game loading. It does not do anything after that, when you are playing.

Link to comment
Share on other sites

Thanks everyone! Crzyrndm, your example was very helpful, I was able to change the NFPropulsion patch for the LV-N atomic rocket motor to make it create a duplicate of it that uses LiquidHydrogen rather than an LFO mix. I do plan on making some interplanetary vessels propelled by LiquidHydrogen, but I've grown fond of the LFO rocket motors, since I can repurpose the LFO for new rockets when doing extraplanetary bases.

I have another question, where can I find the meshes/textures for the buildings/launchpad/runway at KSC? They don't seem to be in the squad folder as far as I can tell, but I'm interested in taking a look at them so I can make something based on them. I'm interested in making some full-sized stuff for extraplanetary launchpads for establishing big bases capable of launching huge heavy rockets. I still have to figure out how to make parts from scratch, and I figured looking at some assets from the game would be as good a place as any to start.

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