Jump to content

0.20 - PartTools, GameDatabase and new features


Mu.

Recommended Posts


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.

Link to comment
Share on other sites

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

A dual turbofan engine:

friehWi.jpg

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

GgPXYvg.jpg

A 4x4 set of structural panels:

SMSgut8.jpg

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.

Link to comment
Share on other sites

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

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.

NmBaJVi.jpg

Link to comment
Share on other sites

Visual example of what I'm experiencing

03t9CXd.jpg

All of the hexcans are defined with

	MODEL
{
model = HexCans/Models/HexCan
position = 0.0, 0.0, 0.0
scale = 2.0, 2.0, 2.0
rotation = 0.0, 0.0, 0.0
texture = HexCan000, HexCans/Parts/HexCanLiquidFuel/LF
}

and

rescaleFactor = 0.5

rescaleFactor = 1.0

rescaleFactor = 2.0

to vary the size.

Here's the catch

The racks are exactly the same.

Here's another catch.

If you were to say that MODEL{scale = x, x, x} and rescaleFactor = y

Y=0.5 & x = 2.0 results in the part being 0.5:1.0 scale

y=2.0 & x = 0.5 results in the part being 2.0:1.0 scale

Y=1.0 & x = 1.0 ALSO RESULTS IN 2.0:1.0 SCALE

H28DJpk.jpg

Link to comment
Share on other sites

I read somewhere that iva making was easier with the new partools so i downloaded them, started a new project in unity, set my gamedata path.

But then the window of ksp parttools doesnt show anything, and i get a lot of error from the window file of ksp tools . Tried the search button but have no idea what i did wrong haha =S thanks for your time

Link to comment
Share on other sites

  • 2 weeks later...

How do you get the Part Tools window to go away after you have chosen the Game folder?

It sits all by itself and then after you pick the game folder you're left with a blank small window. I got it to go away by choosing Window-Layouts-Default, but I can't click on the X to close it.

Link to comment
Share on other sites

Redwork, place the PartTools.unitypackage file into the Unity packages folder. On my machine it's C:\Program Files (x86)\Unity\Editor\Standard Packages.

http://forum.kerbalspaceprogram.com/showthread.php/25040

kerbtreak rocks! I finally got at least the tools working.

A different way is to create a new project then drag that file into the Project folder. It comes in differently.

Edited by Gary_P
Link to comment
Share on other sites


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
}

Question is how to use this function with .DAE files, so they can be rendered properly?
Link to comment
Share on other sites

  • 3 weeks later...

don't know how you guys have the patience for this, plus as soon as 22 comes out it'll all be moot, or someday it will be, guaranteed

I can barely keeps up with game revisions killing old stuff and I only make crafts

Link to comment
Share on other sites

  • 2 weeks later...

I'm trying to use the MODEL{} argument to reduce overhead by calling repetitive structures (in this case engines) onto a larger model

However, while the engines appear in the right spots, they're all appearing under their decoupler shrouds, and when I start/stage the combined model the thrust from the called engine models is also occurring but it is coming out perpendicular to the engine models as per picture below

kqH8SF4.jpg

You can see the thrust/exhaust from the instanced models coming off to the right when all thrust should all be going straight down.

Is there any way to correct the appearance of the engines or the direction their thrust is emerging?

The example says you can use the 'parent = anotherModelTransform' argument but this doesn't seem to do anything, is there a particular syntax required for this argument (neither thrustTransform nor engine_thrust seemed to work either)?

Link to comment
Share on other sites

I can't help you with most of that, but parent= is only necessary for multiple MODEL{}s, the first, root model doesn't need one, then everything after that has to be parented onto that first one, with parent= telling the system where to stick the additional models on the root model. like telling your kids where to hang an ornament on the christmas tree.

So, it shouldn't do anything for your problem.

Link to comment
Share on other sites

I've been working on and off trying to solve the fairing problem, but it seems that the jettison module only hides the first mesh it finds.

If you have one jettison module, only the first fairing will hide and only the first fairing will jettison. If you have as many jettison modules as engines, they will all jettison, but only the first one will hide.

You might be able to solve this in a plugin, but I don't know.

Link to comment
Share on other sites

ok, thanks Supernovy and Greys, please let me know if there is something that can be done for/with this (might need a separate model without the trustTransform and/or fairings just for this), will just have to try something else with that for now

Different yet related question, working on a modular setup with 6 small 'partial' part models which can be combined a lot of ways to make various full parts using the MODEL{} calls, what kind of memory/cpu-load savings are there with this approach vs. having what would otherwise be ~16 fully separate 'whole thing' models, I was thinking of constructing those with rescaleFactor and MODEL{} within 16 different part.cfg files? How resource efficient is the node calling?

Edited by NoMrBond
Link to comment
Share on other sites

Most models are less than a tenth of a meg in size for an entire part, so the savings is pretty minimal. You'll save a lot more by sharing textures between parts, which you can do without sharing models but why not. If you use MBMs (uncompressed) you could probably get the texture under a meg for each nozzle so if you use that nozzle four times on each engine and have sixteen engines, that's not an insignificant savings.

Link to comment
Share on other sites

so, this is on the FAQ for the download site:

"For how long will my files be here ?"

--------------------------------------------------------------------------------

"As long as someone downloads them at least once every 30 days. "

Looks like it's been more than 30 days since the last download, it's probably been deleted from the site, anyone got any ideas on how to put it back up? Because I'd really like to get that file.

Benz

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