Jump to content

Adding new parts


Recommended Posts

This is what I'm trying to add by the way, a smallish solid booster stage so that you don't have to carry an entire solid stage up into orbit just so you can get back down:

KSPRetrostage1.jpg

Sorry about the texture :P it really needs redoing, I just mapped the SRB one on so I wasn't staring at a grey cylinder

Link to comment
Share on other sites

Have you tried brutally copying the booster folder and replacing the model? If yes and it loads, the rest should work...just to see what would happen I cloned the default SRB and increased thrust ten times, and there were no problems. The model file is the only new bit you're trying to add, so the problem might be there.

PS: such a stage would come in handy! For my orbital flight I used a liquid stage and deorbited with the remaining propellant.

Link to comment
Share on other sites

Nice!

I didn't expect to see a mod attempt this early on! This is great!

We have a tool we made to debug part loading. It's called PartLab. It's going to be released very soon now, along with a few other tools and examples in an SDK package. The PartLab tool has a console that let's you know exactly where the importing halted, I'll see if I can release it as early as tomorrow.

I'll try to help you out now anyway. ;)

The model for a part needs a couple of special nodes to work. Mainly, you need a convex solid mesh called node_collider, to be your collision mesh, this is a mesh that's supposed to go over the main model, and it's what the game uses to simulate physics. The other nodes are just dummies used to mark the position of the attachment nodes and effects. These aren't even imported. They're just used to get the XYZ position and orientation of the things they represent (there is another tool for that as well).

You also need to structure the new part's folder in the same way the others are. It needs a texture map in the 'texture' folder, a COLLADA (.dae) or .obj mesh in the part's root folder, and the part.cfg file.

The cfg file is the entry point for a part. The game looks for those first, and parses it to get information about how the part is supposed to work. In there, you have to set an unique name for the part, indicate where the mesh and texture are, and define the attachment points. Your best option is to copy an existing part.cfg from somewhere else, and just change the values you need.

We'll be releasing an official part-making guide in the KSP wiki as well. It should cover all of these points in much more depth.

If the game is halting on the loading screen, my best guess is that either there is a problem with the collision mesh, or you have a problem with the cfg file.

Try using a copied cfg file from the original solidBooster. Just change the 'name' field to something else, and make sure the 'mesh' and 'texture' fields are pointing to the right files. If the game is still halting, it might very well be the collision mesh.

If you already have a collision mesh in, and the game is still halting, the next step is to make sure the collision mesh has a material applied to it. It won't use this material in game... the collision mesh is invisible... but the importer will complain if it finds a mesh without a material. This only happens with .dae models though. If you need to give it a material, you can give it a standard grey material, and just for modelling convenience, give it 50% transparency. (I'm assuming you're using 3Ds Max... although other modelling packages should work quite as well)

Anyways, We'll try to release the SDK as soon as possible. In the meantime, I hope this helps!

Best of luck!

Cheers

Link to comment
Share on other sites

I've been trying to give the liquid engine a bit more oomph. I made an exact copy of the liquidengine1 directory in the parts directory, renamed it liquidengine2, in the config file changed the name, thrust, weight and heat produced values for the engine, went into the program, stuck a fuel tank and a standard engine on the bottom of a command module, launched it, recorded the max G, gone back to assembly, switched the standard engine for the modded one, launched again, looked at the G. no change. looking back over the flights, both engines reached similar heights and similar speed, so why doesn't my thrust fiddling turn up in game?

Link to comment
Share on other sites

  • 3 weeks later...

Woooooooooooooooooooooooooooooooooooooooo.

Nice model. Remember though, if you attach something directly below the capsule, when you land it'll go boom.

See if you can figure out a way to make it a combined stage/deorbit engine so you don't need a decoupler. ;)

... and we'll be talking about your cheating and defection. >:|

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...