Page 3 of 9 FirstFirst 12345 ... LastLast
Results 21 to 30 of 82

Thread: 0.20 - PartTools, GameDatabase and new features

  1. #21
    This is exactly what I discovered Razchek.

  2. #22
    Quote Originally Posted by Razchek View Post
    To get the attachment nodes to work you must place them in your config like so:

    Code:
    NODE
    {
       name = top
       transform = topTransform // Or whatever your transform name is.
       size = 1.0 // Will always be 0 until fixed.
       method = FIXED_JOINT // will always be FIXED_JOINT until fixed.
    }
    Original post suggests:
    Code:
    ATTACH
    {
       name = top
       transformName = topTransform
    }
    Size and Method are not being respected, so they will just be place-holders until it's fixed in the AttachNode class.

    Place the transform (empty game object) in unity so that the blue arrow is facing away from the point you want to attach to.
    I.e. Have the blue arrow facing down if the node is at the top of your model so that you can stack objects on top of your object.
    From my experience it seems that your nodes do not rescale with you model using this method. Is this what you're experiencing as well?

  3. #23
    Quote Originally Posted by Alskari View Post
    From my experience it seems that your nodes do not rescale with you model using this method. Is this what you're experiencing as well?
    Yeah. They will always be the smallest node size at the moment. Which is fine, as it doesn't seem to actually affect the joints - not to the point where I would notice at least.

  4. #24
    Quote Originally Posted by Razchek View Post
    Yeah. They will always be the smallest node size at the moment. Which is fine, as it doesn't seem to actually affect the joints - not to the point where I would notice at least.
    My issue is that the nodes remain in the same position regardless of the rescale factor on the part. Although the tiny nodes do irritate me.

  5. #25
    Quote Originally Posted by Alskari View Post
    My issue is that the nodes remain in the same position regardless of the rescale factor on the part. Although the tiny nodes do irritate me.
    Oh wow. I didn't even bother trying that out. That sucks!

  6. #26
    Made my own thread about the issue
    Last edited by Nicky89107; 13th June 2013 at 16:31.

  7. #27
    Code:
    MODEL
    {
       model = Squad/Parts/Command/cupola/model
       position = 0.25, 0.5, 1.0
       scale = 2.0, 2.0, 4.0
       rotation = 0, 90, 0
       parent = anotherModelTransform
       texture = model000 , Squad/Parts/Command/landerCabinSmall/model000
       texture = oldTextureName , newTextureURL
    }
    I just took my first whack at this and two things stuck out

    My part with scale = 1.0, 1.0, 1.0 and rescaleFactor = 0.5 appeared in game as one quarter of it's normal size, instead of half. Setting scale = 2.0, 2.0, 2.0 resulted in it being one half as intended. Relying on rescaleFactor means I get to use regular attachment node definitions which do respect rescaleFactor.

    texture = etc, only works if the model you're referencing had a normally loaded texture file applied to it already, you cannot simply have a model file shared between similar parts and have each part apply it's texture, there must be a model000 texture file present in the directory with the model or it'll just be white no matter what you say.

  8. #28
    I've had a little play with the MODEL{} module as well, made some interesting things.

    A dual turbofan engine:

    A turbofan and air intake, with a nacelle for structure:

    A 4x4 set of structural panels:


    Figuring out the scaling was a bit weird, the jet engines all needed to be 0.8 scale to show up as 1.25m parts for some reason. Having the .mu files being used is pretty great as well because the extra models all inherit the Unity transforms as the original part, you just need to call the same things in the CFG to get them to work. You don't need to individually reference the textures you wish to use either, the model you call using the WWW URL will use the textures in it's own folder by default if you don't include the texture = lines.

    Not quite figured out the parent = line yet, not entirely sure what that does.

  9. #29
    Global Moderator Supernovy's Avatar
    Join Date
    Jun 2012
    Location
    Jun 2012
    Posts
    1,266
    Neat, can you post some of that .cfg stuff, hoojiwana? I'd really like to look over it.

  10. #30
    Sure, here's the config of the 4x4 panel since it's the easiest to understand.

    Code:
    PART
    {
    name = structuralPanel4
    module = Part
    author = NovaSilisko, hoojiwana
    
    MODEL
    {
       model = Squad/Parts/Structural/structuralPanel2/model
       position = 1.0, 0.0, 1.0
       scale = 1.0, 1.0, 1.0
       rotation = 0, 0, 0
    }
    MODEL
    {
       model = Squad/Parts/Structural/structuralPanel2/model
       position = 1.0, 0.0, -1.0
       scale = 1.0, 1.0, 1.0
       rotation = 0, 0, 0
    }
    MODEL
    {
       model = Squad/Parts/Structural/structuralPanel2/model
       position = -1.0, 0.0, 1.0
       scale = 1.0, 1.0, 1.0
       rotation = 0, 0, 0
    }
    MODEL
    {
       model = Squad/Parts/Structural/structuralPanel2/model
       position = -1.0, 0.0, -1.0
       scale = 1.0, 1.0, 1.0
       rotation = 0, 0, 0
    }
    rescaleFactor = 1
    
    // node_stack_right = 1, 0, 0, -1, 0, 0, 0
    // node_stack_left = -1, 0, 0, 1, 0, 0, 0
    
    // node_stack_back = 0, 0, 1, 0, 0,-1, 0
    // node_stack_front = 0, 0,-1, 0, 0, 1, 0
    
    node_stack_top = 0, 0.0275, 0, 0,-1, 0, 0
    node_stack_bottom = 0,-0.0275, 0, 0, 1, 0, 0
    
    // node_attach = 0,-0.045, 0, 0, -1, 0, 0
    node_attach = -2, 0, 0, -2, 0, 0, 0
    
    cost = 1200
    category = Structural
    subcategory = 0
    title = M-4x4 Structural Panel
    manufacturer = Dinkelstein Kerman's Construction Emporium
    description = Four M-2x2 have been arranged in a 4x4 layout for this part, then stuck 
    
    together with really strong super glue.
    attachRules = 1,1,1,1,1
    
    // --- standard part parameters ---
    mass = 1.2
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.2
    angularDrag = 1
    crashTolerance = 80
    breakingForce = 200
    breakingTorque = 200
    maxTemp = 3200
    fuelCrossFeed = False
    }
    The scale doesn't need fiddling with since it works just fine for this part, and the commented out node_stack definitions are the same ones that are in the 2x2 panel. The positions are really simple since the part is 1m by 1m, and that carries straight across to the config. Just move the middle of the model, marked in blue, 1m along the X and Y axis. Do that four times remembering to go into the negatives when needed since the middle of the part is at 0,0,0. Then I just upped the cost and mass to be balanced, and there you go. You can stick the config above where you like and it should still work, as long as it is in GameData.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •