Jump to content

[0.90] TweakScale - Rescale Everything! (v1.50 - 2014-12-24 10:40 UTC)


Recommended Posts

You should be safe doing it OnLoad.

Speaking of--the "jumping" on launch is symptomatic of scale being set OnStart rather than OnLoad. Stretchy moved to setting scale OnLoad and it doesn't have that issue anymore.

Sorry, I wasn't clear, I meant more-than-one-axis, i.e. non-uniform scaling.

ha, remember that i asked you about RF ModuleEngineConfigs's configMaxThrust got set in OnLoad()? at that moment i was trying to fork this project and add support for MEC configured engines when rescaling them.

Link to post
Share on other sites

I really like this idea, but I just cannot get this to work. I see the MM cfgs in there and I read the first post, so I assume I shouldn't have to add any parameters myself, but nothing about scale shows up when right clicking parts.

Should I be deleting the plugin from the Godspeed pack first? I read the post answering that question when it was already asked, but wasn't sure, because I have a few crafts with the Godspeed parts and want to make sure that I'm doing something else wrong before I lose them.

Does anyone know of what I didn't do to not make it work? I just dropped it into GameData folder, anything else?

Link to post
Share on other sites

OK, bug reports

1) B9 rescales doesn't work because an error in MM patch, here's a fix also including B9 fuselage rescales and some more scales for type=stack

2) Use type=free in game, the default scale is always 25, no matter how you set DefaultScale.

Link to post
Share on other sites

The MM patch for the TCS pack isn't working either (looks like missing @ before part names)

This config will add tweakscale to all of the TCS parts:

@PART[TALMediumCargo*]
{
MODULE
{
name = TweakScale
type = stack
defaultScale = 2.5
}
}

@PART[TALLargeCargo*]
{
MODULE
{
name = TweakScale
type = stack
defaultScale = 3.75
}
}

and I'll include it in the configs for the next update, so a MM patch won't be needed.

Btw, great work! I'll be getting a LOT of use out of this plugin

Link to post
Share on other sites

Reporting a bug:

The Squad part "batteryBank" (Z-1k Rechargeable Battery Bank) throws an error in the log, the right-click on the part in the VAB shows the following and when you head to the launchpad any of these fall to the ground and explode, leaving gaps in your rocket.

log error

[EXC 21:18:11.586] InvalidOperationException: Operation is not valid due to the current state of the object

image:

TXUnxh5l.png

Link to post
Share on other sites
Reporting a bug:

The Squad part "batteryBank" (Z-1k Rechargeable Battery Bank) throws an error in the log, the right-click on the part in the VAB shows the following and when you head to the launchpad any of these fall to the ground and explode, leaving gaps in your rocket.

log error

[EXC 21:18:11.586] InvalidOperationException: Operation is not valid due to the current state of the object

The NASA_TweakScale.cfg is adding the TweakScale module to batteryBank 34 times.

Link to post
Share on other sites

I love it!

And if somehow landing gear could be added to the list... tried in the part.cfg a long time ago. Didn't work. I have a good use for it.

Edit: It seems Procedural Parts and Tweakscale are incompatible due to two KSPAPIExtensions.dll files. I tried using only PP's version but the during loading I get an exception. If I install with your dll together with PP's, PP rescaling won't work.

Edited by Azimech
Link to post
Share on other sites

Very nice. This is quite handy. I can finally make a .625 fuel depot...

I'm only kidding. This is quite useful. It can help to keep part count down in large vehicles.

Edited by BigD145
Link to post
Share on other sites

Maybe it's just me, but KSPAPIExtensions v 1.4.3.1 that comes with Procedural Parts breaks TweakScale (ksp hangs on load, log says can't load KSPAPIExtensions 1.4.1.0).

PP does however not seem to mind using the older version of KSPAPIExtensions.

Link to post
Share on other sites
One idea I tried to push for stretchy tanks several months ago was a modular way of scaling, by repeating middle section models and capping with end cap models. This could be implemented in a couple different ways.

R2aNt53.png

Here's my take. I haven't looked much into this, so I'm not sure this would be possible, but here goes:

MODULE
{
name = TweakScale
type = free // Or whatever.
SEGMENT
{
mesh = myCap
role = endcap_1
rotation = 0.0, 0.0, 0.0, 0.0 // Axis/angle, quaternion, whatever.
offset = 0.0, 0.0, 0.0
node_stack_bottom = 0.0, 0.3, 0.0, 0.0, 1.0, 0.0, 1
}
SEGMENT
{
mesh = myCap
role = endcap_2
rotation = 0.0, 0.0, 0.0, 0.0 // Axis/angle, quaternion, whatever.
offset = 0.0, 0.0, 0.0
node_stack_top = 0.0, 0.3, 0.0, 0.0, 1.0, 0.0, 1
}
SEGMENT
{
mesh = myTruss
role = section
// rotation, offset, nodes
cumulativeRotation = 0.0, 0.0, 0.0, 0.0
}
SEGMENT
{
mesh = myMidCap
role = midcap
// rotation, offset, nodes
cumulativeRotation = 0.0, 0.0, 0.0, 0.0
}
sectionLength = 0.625
}

This would be ZodiusInfuser's truss. The roles describe what rule to use to place each segment, and can thus be extended in the future should one want e.g. a 2D grid of M-1x1 Structural Panel.

As you can see, type is still available, so a part could be rescaled in addition to being tiled along an axis.

cumulativeRotation lets the next segment be rotated 90 degrees (or of course any other number), as ZodiusInfusers mentioned his trusses were.

However, this is an advanced feature that I will not promise to implement.

Link to post
Share on other sites
This is surprising. AFAIK Daishi has parts with optional meshes that you can make appear or disappear in the VAB. Maybe he can help you here.

I guess it depends on whether the solution needs to create fresh geometry or just modify existing elements within a .mu file. I suspect the optional meshes in Universal Storage perform the latter approach, and to be honest that would be fine for my applications, since it gives the greatest control over final model style.

Edit: Looks like Universal Storage makes use of the AdvancedAnimator plugin to be able to have meshes be hidden and shown, by having a fade in animation occur extremely fast.

Edited by ZodiusInfuser
Link to post
Share on other sites

New version out and available in the first post or here. For the record, I hate Curse's review system.

This is surprising. AFAIK Daishi has parts with optional meshes that you can make appear or disappear in the VAB. Maybe he can help you here.

Yeah, it's probably not that hard, so let's say it's not my #1 priority at the moment. There's also quite a few things I'd need to read up on before embarking on such a project. Mostly, I'm saying it will happen when I'm ready, so don't expect anything.

The NASA_TweakScale.cfg is adding the TweakScale module to batteryBank 34 times.

Uhm... I have no excuse. I'm... sloppy? :P Fixed in the new release, at least.

Any way to have the mod display the volume (in liters) of the resized part? Very cool mod, BTW - totally going to check this one out.

Not sure what you mean here - when you resize a fuel tank, its new volume is displayed. Do you want it to display the volume of non-fueltank parts?

You should be safe doing it OnLoad.

Speaking of--the "jumping" on launch is symptomatic of scale being set OnStart rather than OnLoad. Stretchy moved to setting scale OnLoad and it doesn't have that issue anymore.

Done! It's much better now. Thanks a lot!

Maybe it's just me, but KSPAPIExtensions v 1.4.3.1 that comes with Procedural Parts breaks TweakScale (ksp hangs on load, log says can't load KSPAPIExtensions 1.4.1.0).

PP does however not seem to mind using the older version of KSPAPIExtensions.

Fixed. The new version comes with KSPAPIExtensions 1.4.3.6.

Edited by Biotronic
Link to post
Share on other sites
Done! It's much better now. Thanks a lot!

Can you add support to ModuleEngineConfigs? which has configureMin/MaxThrust to set when rescaling engines, just like what you did to ModuleEngines & ModuleEnginesFX.

I made a forked version for my own personal use, but the implementation is rather bad and it's based on a quite old version. so...

Link to post
Share on other sites

I will need to add a handler to MEC for this, since otherwise you would have to grab the confignodes and manually change the max and min thrusts in them (as well as changing configMax and configMin vars). Right now ChangeThrust works only for engines (like solids) that are always the same thrust in their config(s); for LF engines with multiple fuel modes and multiple thrust levels (i.e. hydrolox has only 75% of the thrust of kerolox, ethanol/LOX has lower thrust, etc...and let's not even get started on RCS!) you can't use ChangeThrust.

Link to post
Share on other sites
I will need to add a handler to MEC for this, since otherwise you would have to grab the confignodes and manually change the max and min thrusts in them (as well as changing configMax and configMin vars). Right now ChangeThrust works only for engines (like solids) that are always the same thrust in their config(s); for LF engines with multiple fuel modes and multiple thrust levels (i.e. hydrolox has only 75% of the thrust of kerolox, ethanol/LOX has lower thrust, etc...and let's not even get started on RCS!) you can't use ChangeThrust.

That sounds great. though I would still prefer a way to do this by simply changing a variable's value other than calling a certain function... maybe by provide some sort of thrust multiplier? though I remember there's already something with similar name in your code.

Link to post
Share on other sites
Hmm. Could set a persistent thrust multiplier. But also (whew, just remembered) need to set a persistent mass multiplier too, since RF changes a part's mass itself. :]

Oh then we have some complex interaction between them.

TS will update the mass by scale^3 as well, which i think should be corresponding to the origMass in MEC right?

And if possible, I hope that the Isp can reduce a little bit when an engine is up-scaled...

Perhaps... just perhaps, here is my opinion of this:

what if we reverse it, what if MEC actively tries to (because it might fail) acquire TS module and its scale information and do the tweaking of thrust, mass, Isp, etc by itself? All the TS does is: provides a scale, do scaling of the engine's size.

EDIT: I was even thinking if some sort of IRescaleable interface (with OnRescale(...) function inside of course) can be implemented and shared by multiple plugins...

Edited by HoneyFox
Link to post
Share on other sites

Found a bug using a custom tweakscale type. While working in the VAB, the small option shows up fine. If I save the craft and reload it, the smaller scale is then reverted back to the medium scale (even says medium scale). Let me know what data do you need and I'll supply it.

I'm using:

SCALETYPE

{

name = IR_Robotic

freeScale = false

scaleFactors = 0.25, 0.5, 1.0

scaleNames = Small, Medium, Large

defaultScale = 1.0

}

and in the part CFG(the only caveat that I have is my scale=1 and rescaleFactor=0.5):

MODULE

{

name = TweakScale

type = IR_Robotic

}

Link to post
Share on other sites
Found a bug using a custom tweakscale type. While working in the VAB, the small option shows up fine. If I save the craft and reload it, the smaller scale is then reverted back to the medium scale (even says medium scale). Let me know what data do you need and I'll supply it.

I'm using:

and in the part CFG(the only caveat that I have is my scale=1 and rescaleFactor=0.5):

Fixed in 1.3. Sadly, at the cost of supporting loading of older TweakScale/GoodSpeedTweakScale parts. I've now added a version number to avoid such problems in the future, but the sad fact is, this release is breaking compatibility with old versions.

Link to post
Share on other sites
Fixed in 1.3. Sadly, at the cost of supporting loading of older TweakScale/GoodSpeedTweakScale parts. I've now added a version number to avoid such problems in the future, but the sad fact is, this release is breaking compatibility with old versions.

No problem, sometimes it happens. Thanks for fixing it!

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...