Jump to content

Scaling up parts not staying scaled up


RuralTowner

Recommended Posts

Not sure if this is the right part of the forum for this but its a simple issue with a stock part.

I'm trying to scale-up the structural panels for use on large vessels (ie stations) to keep part count down. I've copied the original 1x1 and 2x2 part folders to make new ones with new names. UNFORTUNATELY merely going into the CFG and raising it from 1.0 to 2.0 only "kind of" works. I can initially build with the king-size panels, but half the time when I attempt to launch, the panels are back to original size (leaving MASSIVE gaps in the hull). Same result if I load a save of the ship.

I'm sure its something simple I'm missing. It'd be nice to finally be able to build up a dockyard where my smaller ships can dock internally.

Link to comment
Share on other sites

You probably didn't change the name= line. That means the new copies will have the same name as the old copies, so when KSP loads your ship it loads the part-with-the-name-that-got-saved, and the first part it finds of that name is the old part.

That said, please do a search on the forums for welding; after KSP 0.20, there's no reason to copy models. Instead use MODEL nodes to reference the existing assets.

Link to comment
Share on other sites

I think I'll try TweakScale since I can then do the same with other structural parts. However...I'm using v23.5 while the TS says its for 24.2. Haven't seen an update prompt from KSP and don't even see it in My Account as before.

As for MODEL nodes...clarification please as I have no clue what that is beyond a very vague notion.

EDIT: Just found the update. Now lets hope it doesn't break too much stuff.

Edited by RuralTowner
Link to comment
Share on other sites

Ugh. 24.2 doesn't like me. Tried both the regular and x64. Likes to freeze when building new. Especially when staring out with a command module which then becomes unresponsive...acts like its not even there. Can't highlight any parts for right-click on loaded saved craft. AND is it normal to see RCS, decoupler...and engine exhaust effects in the SPH (and presumably VAB as well...though haven't been in there for awhile)?

Edited by RuralTowner
Link to comment
Share on other sites

You probably didn't change the name= line. That means the new copies will have the same name as the old copies, so when KSP loads your ship it loads the part-with-the-name-that-got-saved, and the first part it finds of that name is the old part.

That said, please do a search on the forums for welding; after KSP 0.20, there's no reason to copy models. Instead use MODEL nodes to reference the existing assets.

Nope, I just recently had the same problem with one particular part. Whenever "Model" was used, the scaling messed up after reverting to launch, even if the crafts were built from scratch. Heck I even tested it on an unmodded installation with a new save.

Went back to "mesh" and scaling is working fine since then...

So yeah, I wouldn't recommend your recommendation of using "Model", at least not for parts with bugged scaling.

Edited by slumpie
Link to comment
Share on other sites

rescaleFactor is currently bugged when MODEL nodes are involved. You need to leave it as =1, always, or these bugs will occur.

Here's my usual spiel on scaling:

Three things affect scale.

First, does the part use MODEL nodes? Skip to part B.

A (MODEL node not used; instead "mesh = blah" used)

1. "scale = foo" determines how the first three numbers for each attach node line (the X, Y, Z coords of the node) are scaled. It does *not* affect anything else. Default = 1.0 if not present

2. "rescaleFactor = bar" scales both the model (and its transforms) *and* the attach nodes. Default = 1.25 if not present.

B (MODEL node(s) used)

1. Inside the MODEL node, "scale = blahX, blahY, blahZ" determines the scaling of the model and its transforms. Default is 1.0, 1.0, 1.0. It does not affect node positions.

2. Outside the MODEL node, "scale = foo" works as above.

3. Outside the MODEL node, rescaleFactor works as above.

HOWEVER, there is a bug in scaling. For parts with MODEL nodes, rescaleFactor is applied twice to the mu, *unless* (a) the part is the root part of the vessel and (B) you've reverted to launch (or perhaps switched in flight? Don't recall). All other times, it is applied twice. What this means is that if you have scale = 1.0, 1.0, 1.0 in the MODEL node (or no scale at all), and rescaleFactor = 1.25, then your mesh will actually be 1.5625 as big, but your nodes will be scaled outwards 1.25.

For this reason, when scaling parts using MODEL nodes, it is suggested to leave scale (outside the MODEL node) and rescaleFactor both at 1.0, and instead both change the scale = x, y, z inside the MODEL node and manually scale the positions of the attach nodes.

Link to comment
Share on other sites

Still don't understand what is meant by "scale inside model". This still performed in the CFG?

I'm an absolute novice when it comes to modding beyond the simplest cfg (or tbl - used in FS2) changes. Once I get how though, anything done in the future will less likely require posting questions.

Here is what is below from a separate part folder so as to leave the original intact.

mesh = model.mu

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 = -1, 0, 0, -1, 0, 0, 0

Link to comment
Share on other sites

Here's a tutorial on MODEL nodes.

Before KSP 0.20, each part had to have its own model.mu file (signified by mesh = model.mu)

With KSP 0.20 and later, a part.cfg can reference *any* model in KSP. This is because models, textures, and cfgs are all loaded independently now (first all models and textures, *then* all cfgs, and *then* all cfgs are processed and parts are compiled). Note that GameDatabase references are the relative-to-GameData path to the file, minus its extension.

So instead of copying all the stuff, you could do:

(replacing the mesh = model.mu and the node lines with:)


MODEL
{
model = Squad/Parts/Structural/structuralPanel1/model
scale = 2.0, 2.0, 2.0
}

node_stack_top = 0, 0.055, 0, 0,-1, 0, 0
node_stack_bottom = 0,-0.055, 0, 0, 1, 0, 0

node_attach = -2, 0, 0, -1, 0, 0, 0

Link to comment
Share on other sites

 Tried this a couple of times and my sizes stay what, I put them at and you said you copyed the part folder ? You just need to copy the part.cfg and 
name like part2.cfg and leave it in that part folder so now you still have both sizes

PART
{
name = structuralPanel[COLOR="#FF0000"].5[/COLOR] <----here, I change the # to match
module = Part
author = NovaSilisko

mesh = model.mu
[COLOR="#FF0000"]scale = 1[/COLOR] <---- Added most of the time stock is 1
rescaleFactor = [COLOR="#FF0000"]0.5[/COLOR] <-----changed # to what you want *

// node_stack_right = 0.5, 0, 0, -1, 0, 0, 0
// node_stack_left = -0.5, 0, 0, 1, 0, 0, 0

// node_stack_back = 0, 0, 0.5, 0, 0,-1, 0
// node_stack_front = 0, 0,-0.5, 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 = -0.5, 0, 0, -1, 0, 0, 0

TechRequired = composites
entryCost = 7200
cost = 30
category = Structural
subcategory = 0
title = M-[COLOR="#FF0000"].5x.5[/COLOR] Structural Panel <------Change # to match
manufacturer = Dinkelstein Kerman's Construction Emporium
description = A sturdy metal plate, perfect for constructing all sorts of things.
attachRules = 1,1,1,1,1

// --- standard part parameters ---
[COLOR="#0000FF"]mass = 0.075[/COLOR] <--------And I forgot if you want to get picky change the Mass
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 1
crashTolerance = 80
breakingForce = 200
breakingTorque = 200
maxTemp = 3200
fuelCrossFeed = False
}

And @NathanKell lol and in very dummy term's how you make this small like what you done or a spoiler ?

EDIT- HEHE thanks NathanKell :D

Edited by Mecripp2
Link to comment
Share on other sites

Adding "scale = <size wanted here>" appeared to do it. Launched a simple craft...panels stayed the wanted size (and left it in orbit)...restart KSP and its still there (intact as wanted)...and reloading in VAB is still correct.

Thanks. Now I know what to tweak where for other parts bound for "starbase" sized stations.

Link to comment
Share on other sites

MeCripp: ['code] and ['/code] (remove the ') tags.

Here's my usual paste on scaling btw, might be helpful.

Three things affect scale.

First, does the part use MODEL nodes? Skip to part B.

A (MODEL node not used; instead "mesh = blah" used)

1. "scale = foo" determines how the first three numbers for each attach node line (the X, Y, Z coords of the node) are scaled. It does *not* affect anything else. Default = 1.0 if not present

2. "rescaleFactor = bar" scales both the model (and its transforms) *and* the attach nodes. Default = 1.25 if not present.

B (MODEL node(s) used)

1. Inside the MODEL node, "scale = blahX, blahY, blahZ" determines the scaling of the model and its transforms. Default is 1.0, 1.0, 1.0. It does not affect node positions.

2. Outside the MODEL node, "scale = foo" works as above.

3. Outside the MODEL node, rescaleFactor works as above.

HOWEVER, there is a bug in scaling. For parts with MODEL nodes, rescaleFactor is applied twice to the mu, *unless* (a) the part is the root part of the vessel and (B) you've reverted to launch (or perhaps switched in flight? Don't recall). All other times, it is applied twice. What this means is that if you have scale = 1.0, 1.0, 1.0 in the MODEL node (or no scale at all), and rescaleFactor = 1.25, then your mesh will actually be 1.5625 as big, but your nodes will be scaled outwards 1.25.

For this reason, when scaling parts using MODEL nodes, it is suggested to leave scale (outside the MODEL node) and rescaleFactor both at 1.0, and instead both change the scale = x, y, z inside the MODEL node and manually scale the positions of the attach nodes.

Link to comment
Share on other sites

(replacing the mesh = model.mu and the node lines with:)


MODEL
{
model = Squad/Parts/Structural/structuralPanel1/model
scale = 2.0, 2.0, 2.0
}

node_stack_top = 0, 0.055, 0, 0,-1, 0, 0
node_stack_bottom = 0,-0.055, 0, 0, 1, 0, 0

node_attach = -2, 0, 0, -1, 0, 0, 0

Ehm... if he used rescale factor 1 for the original part, wouldn't a scale 2 inside Model in combination with a non defined rescale factor give wrong results?

1.25*1.25*Mscale = 3.125

EDIT: Ah I see, you said he should only replace the mesh line. Well then, as long as he keeps the rescale... :)

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