Beale

Beginners Part Modding Tutorial

Recommended Posts

That is my understanding, as well. Sure would be nice if you could just scale some of the ones already out there.

Share this post


Link to post
Share on other sites
My understanding is that you can't adjust the size in stock. However, Smokescreen (and by extension HotRockets) adds the option. It adds additional "curves" for this.

Share this post


Link to post
Share on other sites

So the tutorial is totally broken.

I really do not have the time to fix all that, so apologies.

Share this post


Link to post
Share on other sites

This is a really great tutorial, very easy to follow... but the link to the next part is broken.

Share this post


Link to post
Share on other sites
1 hour ago, wasmic said:

This is a really great tutorial, very easy to follow... but the link to the next part is broken.

Thanks!

The links should be removed, there is no longer a "next-part", just the next post.

Share this post


Link to post
Share on other sites
1 minute ago, Beale said:

Thanks!

The links should be removed, there is no longer a "next-part", just the next post.

Okay, I somehow managed to not scroll down to the next post just after... I might need to pay more attention. Thanks, anyways!

Share this post


Link to post
Share on other sites
18 hours ago, Sequinox said:

Does the code for the part.cfg still work?

 

Should do.

Share this post


Link to post
Share on other sites

Hello, there!

I'm trying to get into part modding and I found this great tutorial. I followed all the steps, but it seems like my engine is a bit bugged. The model works great, but the collision mesh doesn't seem to actually collide with anything. The engine only half works: it makes sound and sucks LFO, but it doesn't produce thrust or any particle effects. 

Could it be that I'm using the wrong version of Unity (5.3.2), or does it sound like I just goobered something up with rookie mistakes?

Share this post


Link to post
Share on other sites

I'd use Unity 4.2.2, mainly to be able to do the Legacy animations the way KSP is expecting, particularly engine glow.

 

But the problems you're having are probably not that. Verify that your collision mesh is set to "convex" (otherwise it'll fall through the launch pad, among other problems), and is actually a physics collider in Unity. For thrust and particle effects, make sure you have the right transform names in the part's CFG, and that those transforms actually exist in your part before exporting from Unity.

Share this post


Link to post
Share on other sites

A quick question on colliders. I seen NecroBone's tutorial and earlier ones. Both have different information on the collider issue. One video suggests using the mesh collider from Unity while NecroBone's tutorial suggests to set it up in Blender. And didn't the collider change in 1.0.5? If this change is in effect in 1.0.5, shouldn't the part tools reflect the change, because there are no new colliders to select for your mesh. Ugh.. I'm confusing myself.

Edit: just read what NecroBones said. Convex colliders in Unity. Which is what I remember seeing. But, I thought it was always convex before 1.0.5?

Edited by ComatoseJedi
a DOH moment

Share this post


Link to post
Share on other sites

 

You can add colliders either in Unity, or in Blender. Both work. It's just that the Unity colliders are slightly more performance-friendly, at the cost of being really simplistic and only being available as boxes, spheres, or capsules. If you need to do cylinders, cones, or complex shapes, you pretty much have to make them in Blender first, and convert them to Mesh Colliders in Unity. (So I make almost all of them in Blender, and use Unity colliders only for certain things)

 

Not much changed in 1.0.5, however in 1.1 all of the colliders must be convex. In 1.0.5 and earlier, you can get away with non-convex colliders in some cases, but they're really not good to use, because if two of them come in contact with each other, they'll pass right through each other, and that includes the launch pad. To make a Mesh Collider convex, you need to click the convex checkbox in its settings, otherwise you have a non-convex mesh collider.

 

Share this post


Link to post
Share on other sites

Thank you for pointing that out. As you explained in your tutorial, setting up a collider in blender is beneficial if you wanted to add something to the part and it would snap to the side of the part in game. I was trying to model a command module and got to where I could add a collider and had conflicting information on which one would was the right way to do so. Your tutorial was recent, so I attempted with that. Needless to say, I need to just buckle down and do this process for blender over and over again, so I can learn how to do it. Again, thank you and everyone else in the modding community who helps newbies get their feet wet with modding in KSP. Now if i can only learn how to make fancy curves in the window corners and other parts, I'll be good to go. Just have to figure out how to make texture maps and they actually look good and seamless. 

Share this post


Link to post
Share on other sites
17 minutes ago, Sturmgeschutz said:

Could you identify this problem?
The engine does not fit properly in the fuel tank.

 

 

Can you post the config?

I think you have labelled the nodes incorrectly, e.g.

node_stack_bottom = 0.0, -0.046875, 0.0, 0.0, -1.0, 0.0, 1
node_stack_top    = 0.0,  0.046875, 0.0, 0.0, 1.0, 0.0, 1

Model looks good though :) 

Edited by Beale

Share this post


Link to post
Share on other sites

PART
{
    name = Type1engine
    module = Part
    author = Brendo
    mesh = model.mu
    scale = 1
    rescaleFactor = 1
    node_stack_top = 0.0, 1.0978, 0.0, 0.0, 1.0, 0.0
    node_stack_bottom = 0.0, -0.60151, 0.0, 0.0, -1.0, 0.0
    fx_exhaustFlame_blue = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, running
    fx_exhaustLight_blue = 0.0, -10.3, 0.0, 0.0, 0.0, 1.0, running
    fx_smokeTrail_light = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, running
    fx_exhaustSparks_flameout = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, flameout
    sound_vent_medium = engage
    sound_rocket_hard = running
    sound_vent_soft = disengage
    sound_explosion_low = flameout
    TechRequired = basicRocketry
    entryCost = 3500
    cost = 1400
    category = Engine
    subcategory = 0
    title = BREASP Type-1 "Dawn Wave" Liquid Fuel Engine
    manufacturer = Brendo Aerospace Spacecraft Parts Co
    description = A liquid fuel engine developed in the early years of the newly formed Brendo Aerospace, the Type 1 was dubbed "Dawn Wave", why supposedly its designer was enjoying a beach one morning...
    attachRules = 1,0,1,0,0
    mass = 1.10
    heatConductivity = 0.06 // half default
    skinInternalConductionMult = 4.0
    emissiveConstant = 0.8 // engine nozzles are good at radiating.
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.2
    angularDrag = 2
    crashTolerance = 10
    maxTemp = 2000 // = 3600
    stagingIcon = LIQUID_ENGINE
    bulkheadProfiles = size1
    MODULE
    {
        name = ModuleEngines
        thrustVectorTransformName = thrustTransform
        exhaustDamage = True
        ignitionThreshold = 0.1
        minThrust = 0
        maxThrust = 325
        heatProduction = 192
        fxOffset = 0, 0, 0.8
        EngineType = LiquidFuel
        PROPELLANT
        {
            name = LiquidFuel
            ratio = 0.9
            DrawGauge = True
        }
        PROPELLANT
        {
            name = Oxidizer
            ratio = 1.1
        }
        atmosphereCurve
        {
            key = 0 300
            key = 1 280
            key = 7 0.001

        }
    }
    MODULE
    {
        name = ModuleJettison
        jettisonName = fairing
        bottomNodeName = bottom
        isFairing = True
        jettisonedObjectMass = 0.1
        jettisonForce = 5
        jettisonDirection = 0 0 1
    }
    MODULE
    {
        name = FXModuleAnimateThrottle
        animationName = HeatAnimationEmissive
        responseSpeed = 0.001
        dependOnEngineState = True
        dependOnThrottle = True
    }
    MODULE
    {
        name = ModuleAlternator
        RESOURCE
        {
            name = ElectricCharge
            rate = 7
        }
    }
    MODULE
    {
        name = ModuleSurfaceFX
        thrustProviderModuleIndex = 0
        fxMax = 0.5
        maxDistance = 30
        falloff = 1.5
        thrustTransformName = thrustTransform
    }
    RESOURCE
    {
        name = ElectricCharge
        amount = 0
        maxAmount = 0
        isTweakable = false
        hideFlow = true
    }
}
 

2 minutes ago, Beale said:

Can you post the config?

I think you have labelled the nodes incorrectly, e.g.


node_stack_bottom = 0.0, -0.046875, 0.0, 0.0, -1.0, 0.0, 1
node_stack_top    = 0.0,  0.046875, 0.0, 0.0, 1.0, 0.0, 1

Model looks good though :) 

Here.

Share this post


Link to post
Share on other sites
27 minutes ago, Sturmgeschutz said:

 node_stack_top = 0.0, 1.0978, 0.0, 0.0, 1.0, 0.0
 node_stack_bottom = 0.0, -0.60151, 0.0, 0.0, -1.0, 0.0

Are these values aligned with your model? (Part 4 of the tutorial).

Share this post


Link to post
Share on other sites

 

That's really bizarre. The config shows the nodes less than 2m apart, and since rescaleFactor is "1", those should be literal distances, and yet in the screenshot they look more like 8-10m apart.

 

Try adding a decimal to rescaleFactor, like "rescaleFactor = 1.0". Sometimes it's picky about that sort of thing. I'm wondering if there's some sort of typo in there that we're not noticing too.
 

Share this post


Link to post
Share on other sites
8 minutes ago, Sturmgeschutz said:

I managed to solve the problem, anyway, thank you!

 

Great! For the sake of future readers, what was the solution?

 

Share this post


Link to post
Share on other sites

I do not know if that's correct, more work for me.
I got the first value from the highest point and the lowest point of the engine:

Q3vmTcS.png

FQvrrsD.png

Then I got a .cfg:

PART
{
    name = Type1engine
    module = Part
    author = Brendo 179063
    mesh = model.mu
    scale = 1
    node_stack_top = 0.0, 0.552917, 0.0, 0.0, 1.0, 0.0
    node_stack_bottom = 0.0, -0.363109, 0.0, 0.0, -1.0, 0.0
    fx_exhaustFlame_blue = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, running
    fx_exhaustLight_blue = 0.0, -10.3, 0.0, 0.0, 0.0, 1.0, running
    fx_smokeTrail_light = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, running
    fx_exhaustSparks_flameout = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, flameout
    sound_vent_medium = engage
    sound_rocket_hard = running
    sound_vent_soft = disengage
    sound_explosion_low = flameout
    TechRequired = basicRocketry
    entryCost = 3500
    cost = 1400
    category = Engine
    subcategory = 0
    title = BREASP Type-1 "Dawn Wave" Liquid Fuel Engine
    manufacturer = Brendo Aerospace Spacecraft Parts Co
    description = A liquid fuel engine developed in the early years of the newly formed Brendo Aerospace, the Type 1 was dubbed "Dawn Wave", why supposedly its designer was enjoying a beach one morning...
    attachRules = 1,0,1,0,0
    mass = 1.10
    heatConductivity = 0.06 // half default
    skinInternalConductionMult = 4.0
    emissiveConstant = 0.8 // engine nozzles are good at radiating.
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.2
    angularDrag = 2
    crashTolerance = 10
    maxTemp = 2000 // = 3600
    stagingIcon = LIQUID_ENGINE
    bulkheadProfiles = size1
    MODULE
    {
        name = ModuleEngines
        thrustVectorTransformName = thrustTransform
        exhaustDamage = True
        ignitionThreshold = 0.1
        minThrust = 0
        maxThrust = 325
        heatProduction = 192
        fxOffset = 0, 0, 0.8
        EngineType = LiquidFuel
        PROPELLANT
        {
            name = LiquidFuel
            ratio = 0.9
            DrawGauge = True
        }
        PROPELLANT
        {
            name = Oxidizer
            ratio = 1.1
        }
        atmosphereCurve
        {
            key = 0 300
            key = 1 280
            key = 7 0.001

        }
    }
    MODULE
    {
        name = ModuleJettison
        jettisonName = fairing
        bottomNodeName = bottom
        isFairing = True
        jettisonedObjectMass = 0.1
        jettisonForce = 5
        jettisonDirection = 0 0 1
    }
    MODULE
    {
        name = FXModuleAnimateThrottle
        animationName = HeatAnimationEmissive
        responseSpeed = 0.001
        dependOnEngineState = True
        dependOnThrottle = True
    }
    MODULE
    {
        name = ModuleAlternator
        RESOURCE
        {
            name = ElectricCharge
            rate = 7
        }
    }
    MODULE
    {
        name = ModuleSurfaceFX
        thrustProviderModuleIndex = 0
        fxMax = 0.5
        maxDistance = 30
        falloff = 1.5
        thrustTransformName = thrustTransform
    }
    RESOURCE
    {
        name = ElectricCharge
        amount = 0
        maxAmount = 0
        isTweakable = false
        hideFlow = true
    }
}
 

Share this post


Link to post
Share on other sites
15 hours ago, Sturmgeschutz said:

I do not know if that's correct, more work for me.
I got the first value from the highest point and the lowest point of the engine:

Q3vmTcS.png

FQvrrsD.png
 

For the bottom node, you should pick the egde, rather than the face, to get the accurate number :)

This bit:

5ebe84670c.png

Great work, glad you have it fixed! 

Share this post


Link to post
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.