Jump to content

Can't figure out how a part can be scaled down when it is a root 0_o


Recommended Posts

I've had this issue since 0.90 and finally decided to try and track it down while setting up my 1.0.4 install. I couldn't. This is what is happening:

YEZzp9Rm.png 5X2ju1Um.png

left image is a simple craft I launched from the VAB to the pad. Right image is what happens after I return to the Space Center and jump back out to the pad. It seems that whenever I set this RCS tank as the root part, whether at the start of construction or through the root tool, once it's launched and then reloaded the RCS tank shrinks. I've stripped down to Stock + KWR and it still happens. I can't for the life of me figure out what's causing the game to want to shrink that RCS tank. In the more recent versions of KW Rocketry this tank was replaced by a universal tank design, but I have kept the part for compatibility with most of my existing vessels. Here is the part.cfg:


PART
{
// Kerbal Space Program - Part Config

// --- general parameters ---
name = KW1mRCSfuel
module = Part
author = KW Rocketry

// --- asset parameters ---
MODEL
{
model = KWRocketry/Parts/Fuel/KWRCSfuel/KW_Fuel_RCS
scale = 0.335, 0.335, 0.335
}
scale = 1


// --- node definitions ---
node_stack_top = 0.0, 0.2, 0.0, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, -0.2, 0.0, 0.0, 1.0, 0.0, 1
node_attach = 0.0, 0.0, -0.505, 0.0, 0.0, 0.0

// --- editor parameters ---
TechRequired = fuelSystems
cost = 800
category = 0
subcategory = 0
title = SA-1 RCS Fuel
manufacturer = KW Rocketry
description = A 1.25m container of hypergolic fuels for RCS thrusters.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,1,1,0

// --- standard part parameters ---
mass = 0.15
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 12
maxTemp = 2900
fuelCrossFeed = True


// --- rcs fuel tank parameters ---

RESOURCE
{
name = MonoPropellant
amount = 100
maxAmount = 100
}
}

I have not seen this behavior with any other root part in the game. I noticed that the part was named exactly the same as the new part, but that shouldn't make a difference because I never had the newer part included in GameData while all this was going on (and placing it in there didn't change anything). I tried changing the old part name in its .cfg file and in my .sfs file and although that loaded okay the behavior remained.

I'm stumped. I really can't make a connection to anything with this behavior.

Edited by Gaiiden
Link to comment
Share on other sites

the default scale of this part model is 3.75m so it's still weird that it ends up smaller. I tried using a RescaleFactor of 1, even though I don't really understand that property, but it had no effect.

Values of rescaleFactor other than 1 are at the heart of the problem, but only when a MODEL node is defined (which has its own set of scale values). The problem is that rescaleFactor is applied twice to parts that have MODEL defined unless the part is root or you've reverted or switched vessels in flight.

So if you're changing rescaleFactor then you also have to rescale the MODEL scales as well AND rescale the attach nodes as well. (the default value for rescaleFactor is 1.25, so if you don't see it in a config then it's using the default)

This is what I used to use to automatically rescale all KWR parts before they fixed scaling. It tries to fix any KWR part lacking an explicit rescaleFactor line. (there's a second part that deals with KWR parts which DO have it but the part you listed doesn't need that)

I provide it as-is. Please note that I do not currently use this myself anymore and it's probably better for you to adapt it to your specific needs by replacing the bit that says 'KWR*'

If you try to use it in the form that I presented it, I am not sure what will happen with current, up to date KWR parts. In theory it shouldn't cause a problem but I wasn't even willing to take that chance myself.


@PART[KW*]:HAS[~rescaleFactor[]]:FIRST
{
@MODEL,*
{
scale_x = #$scale[0]$
scale_y = #$scale[1]$
scale_z = #$scale[2]$

@scale_x *= 1.25
@scale_y *= 1.25
@scale_z *= 1.25

@scale = #$scale_x$, $scale_y$, $scale_z$
!scale_x = DELETE
!scale_y = DELETE
!scale_z = DELETE
}

rescaleFactor = 1.0

topX = #$node_stack_top[0]$
topY = #$node_stack_top[1]$
topZ = #$node_stack_top[2]$

@topX *= 1.25
@topY *= 1.25
@topZ *= 1.25


@node_stack_top = #$topX$, $topY$, $topZ$, $node_stack_top[3]$, $node_stack_top[4]$, $node_stack_top[5]$, $node_stack_top[6]$


!topX = DELETE
!topY = DELETE
!topZ = DELETE

top1X = #$node_stack_top1[0]$
top1Y = #$node_stack_top1[1]$
top1Z = #$node_stack_top1[2]$

@top1X *= 1.25
@top1Y *= 1.25
@top1Z *= 1.25


@node_stack_top1 = #$top1X$, $top1Y$, $top1Z$, $node_stack_top1[3]$, $node_stack_top1[4]$, $node_stack_top1[5]$, $node_stack_top1[6]$

!top1X = DELETE
!top1Y = DELETE
!top1Z = DELETE



bottomX = #$node_stack_bottom[0]$
bottomY = #$node_stack_bottom[1]$
bottomZ = #$node_stack_bottom[2]$

@bottomX *= 1.25
@bottomY *= 1.25
@bottomZ *= 1.25


@node_stack_bottom = #$bottomX$, $bottomY$, $bottomZ$, $node_stack_bottom[3]$, $node_stack_bottom[4]$, $node_stack_bottom[5]$, $node_stack_bottom[6]$


!bottomX = DELETE
!bottomY = DELETE
!bottomZ = DELETE

bottom1X = #$node_stack_bottom1[0]$
bottom1Y = #$node_stack_bottom1[1]$
bottom1Z = #$node_stack_bottom1[2]$

@bottom1X *= 1.25
@bottom1Y *= 1.25
@bottom1Z *= 1.25


@node_stack_bottom1 = #$bottom1X$, $bottom1Y$, $bottom1Z$, $node_stack_bottom1[3]$, $node_stack_bottom1[4]$, $node_stack_bottom1[5]$, $node_stack_bottom1[6]$

!bottom1X = DELETE
!bottom1Y = DELETE
!bottom1Z = DELETE


// 2
bottom2X = #$node_stack_bottom2[0]$
bottom2Y = #$node_stack_bottom2[1]$
bottom2Z = #$node_stack_bottom2[2]$

@bottom2X *= 1.25
@bottom2Y *= 1.25
@bottom2Z *= 1.25


@node_stack_bottom2 = #$bottom2X$, $bottom2Y$, $bottom2Z$, $node_stack_bottom2[3]$, $node_stack_bottom2[4]$, $node_stack_bottom2[5]$, $node_stack_bottom2[6]$

!bottom2X = DELETE
!bottom2Y = DELETE
!bottom2Z = DELETE
// 3
bottom3X = #$node_stack_bottom3[0]$
bottom3Y = #$node_stack_bottom3[1]$
bottom3Z = #$node_stack_bottom3[2]$

@bottom3X *= 1.25
@bottom3Y *= 1.25
@bottom3Z *= 1.25


@node_stack_bottom3 = #$bottom3X$, $bottom3Y$, $bottom3Z$, $node_stack_bottom3[3]$, $node_stack_bottom3[4]$, $node_stack_bottom3[5]$, $node_stack_bottom3[6]$

!bottom3X = DELETE
!bottom3Y = DELETE
!bottom3Z = DELETE
// 4
bottom4X = #$node_stack_bottom4[0]$
bottom4Y = #$node_stack_bottom4[1]$
bottom4Z = #$node_stack_bottom4[2]$

@bottom4X *= 1.25
@bottom4Y *= 1.25
@bottom4Z *= 1.25


@node_stack_bottom4 = #$bottom4X$, $bottom4Y$, $bottom4Z$, $node_stack_bottom4[3]$, $node_stack_bottom4[4]$, $node_stack_bottom4[5]$, $node_stack_bottom4[6]$

!bottom4X = DELETE
!bottom4Y = DELETE
!bottom4Z = DELETE

stackX = #$node_stack[0]$
stackY = #$node_stack[1]$
stackZ = #$node_stack[2]$

@stackX *= 1.25
@stackY *= 1.25
@stackZ *= 1.25


@node_stack = #$stackX$, $stackY$, $stackZ$, $node_stack[3]$, $node_stack[4]$, $node_stack[5]$, $node_stack[6]$

!stackX = DELETE
!stackY = DELETE
!stackZ = DELETE
}

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