Jump to content

Internal Space Documentation?


LaydeeDem
 Share

Recommended Posts

I agree, I realize the add-on makers here are keen to make their own internal spaces but I do not know the best person to ask, possibly c7studios as he made the cockpits or Novasilisko as he designed the new pods.

Though both are no doubt busy they might be able to put some kind of basic guide together.

Link to comment
Share on other sites

Internal Spaces

Another good example of this is Internal spaces.

You'll notice they follow a very similar format! Just add this to the bottom of your part.cfg to make it crewable. Keep in mind, that without an airlock your poor kerbals won't have any way to get in or out! I'll go into airlocks, and making crewable spaces more in another post.

CrewCapacity = 3 // This will determine the max crew capacity of the part

INTERNAL

{

name = PodCockpit

}

Again we just start the block off with INTERNAL, open and closed brackets, and another, name = InternalSpaceName.

This name will typically correspond to a folder in the internal spaces directory. It works very much like the parts do. Where the main folder is called Internals\Spaces\ and the sub folders are for each internal space. You can open the internal.cfg files to see the names of each internal space.

In here you'll see a familiar structure. The main file is the internal.cfg. Along with the model.mu and model.mbm texture files.

Let's take a peek at an internal file!

Internal.cfg

To keep this post from being incredibly long I've left out the rest of the props, but you should get the general idea. Feel free to open up your local copy of the file to see how the rest works if you like.

These files follow the structure of all modules, they're using the new configNode system. If you want more information on how these work, Mu has posted an excellent and in depth article on the subject.

I'll annotate everything in blue as I've done with the previous information.

INTERNAL This begins the definition of the internal space, just like any module

{

name = mk1CockpitInternal This is the name of the module we're defining, to keep it clear and standardized, make sure this name matches the name of your internal space directory.

MODULE Here were adding a seat module for each pilot seat in the internal space, again its following the same pattern as before.

{

name = InternalSeat The name of the module we're adding, an internal seat in this case

seatTransformName = CenterSeat The name of the game object where the kerbal will be spawned in IVA. This is added to the model.mu in Unity and exported.

portraitCameraName = CockpitCam If you're overridding the camera for this seat, you can define it here. Its done by name of the Unity Game object.

allowCrewHelmet = false is the pilot allowed to wear his helmet in this space? In the case of the aircraft cockpits, they don't wear them due to the large size. In a command pod, they would wear the helmets.

}

MODULE Adding another module, in this case, an internal camera for the IVA, hot spot selection. This allows the camera to focus in on an object when you double click, such as the windows!

{

name = InternalCameraSwitch Module name again

colliderTransformName = focusCanopy The name of a gameobject you used in Unity to define a clickable area, it should have a collider attached to it.

cameraTransformName = CanopyEyeTransform This is the name of the unity game object the camera will move to.

}

PROP Here we're adding a prop module to the internal space.

{

name = ButtonSquare The name of the prop we're adding (They're defined in the Internals/Props/ Folder, like the internal spaces are defined.

position = -0.1184633, 0.2851815, -0.9793196 X, Y, Z Position Information (In Local Space co-ordinates, for your internal space model)

rotation = 0.5576651, 0, 0, 0.8300661 The rotation values in local space, of the prop.

scale = 1, 1, 1 X, Y, Z Scales of the object

}

}

Internal Props

Internal Props are defined just like parts or internal spaces. Their files are in the Internals\Props\NameOfProp\ folders. In there, you'll find the standard model.mu files, model.mbm texture files, and a new file. The prop.cfg.

The prop.cfg contains all the information for a specific prop. These props are then added the internal.cfg files of an internal space. Where you provide the position and rotation information for them. A prop only needs to be defined, once, and can be added over and over again to an internal space.

Here is an example prop.cfg file for the 3 handed altimeter gauge.

Like all the prop files, it mostly consists of some information that the prop needs to work. In this case, it needs to know the name of each hand's game object, so it can find it and rotate it.

PROP Start of our prop definition

{

name = AltimeterThreeHands The name of our prop, should match the prop's folder name, though its technically not necessary. You can have multiple props in the same directory, but it can get a little complicated.

MODULE

{

name = InternalAltimeterThreeHands The name of the module we're adding

hand100Name = LongArm The name of the long hand's game object in Unity.

hand1000Name = MediumArm

hand10000Name = ShortArm

}

}

proxy = 0, 0, 0, 0.06, 0.01, 0.06, 1.0, 0.5, 0 Prop tools uses this to create a box when you load the part in prop tools. It will allow you to snap the object down and place it easier in the Unity editor. It defines the x, y, z position, size and rgb color information for the prop's proxy.

That's it for today. I'll go over more topics in detail as time permits. But this should give you a good, general idea of how the config files relate to eachother, and the formats they use. Feel free to post comments below, so I can improve future posts, and answer any questions.

Thanks!

-C7

Found this over at http://kerbalspaceprogram.com/forum/content.php/118-Modders-Corner-Getting-Started-Modding-KSP

It seems it's been updated recently.

Link to comment
Share on other sites

to easy, if you know how unity works, just google it and find out. if made a wurking pod +internals. pice of space cake

edit: uploaded unity project now, ready to mes around whit

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

 Share

×
×
  • Create New...