pellinor

[1.4.x] TweakScale v2.3.12(Apr-16)

Recommended Posts

I suppose, without the internal, creating a scaletype with three scale factors that are all identical to the default scale, and creating an explicit exponent modifier for it, might work. However, I'm unsure of the exponent modifier system can set exact numbers like that. I also do not think TweakScale can modify strings in that way. I would probably look into grabbing the source for one of the fuel switchers and trying to rewrite the code to handle crew capacities instead of fuel.

Scale drives the other properties, so I guess if the scale does not change the dll will think that there is nothing to do. I also agree about the strings, there probably are hardcoded assumptions in a few places that the scaled values are numbers.

- - - Updated - - -

Is there any way to scale kerbal heads?

Not supported out of the box, because Kerbal heads are not configured as parts.

- - - Updated - - -

Is there a config for the stock antennas?

To scale the model, just copy an MM patch from the config files and fill in the antenna's name. I don't think there are exponents for the antenna module yet, so the properties would stay the same.

- - - Updated - - -

Sorry if this has already been reported, but it looks like parts are considered at their default scale for purposes of drag computation.

I couldn't find an "issues" link in pellinor's github, so I created an issue in Biotronic's. https://github.com/Biotronic/TweakScale/issues/35

This is new to me. So it sounds like we either need to scale some drag property of the part, or trigger a recalculation of its drag model. Is anyone familiar with this new drag mechanic?

Concerning the issue, biotronic's github is not the right place because issues are not inherited across forks. Since I am not very good at keeping the issue list in the first post, I'll use the github feature from now on. Already made a copy of yours: https://github.com/pellinor0/TweakScale/issues/2

- - - Updated - - -

Is it possible to override the standard Tweakscale exponents for a single part in it's config?

What Gaalidas said. The TWEAKSCALEBEHAVIOR nodes in ScaleExponents.cfg are an example, they contain a TweakScale module with embedded exponents that override the global defaults.

Edited by pellinor

Share this post


Link to post
Share on other sites

This is new to me. So it sounds like we either need to scale some drag property of the part, or trigger a recalculation of its drag model. Is anyone familiar with this new drag mechanic?

The drag mechanics are a bit hard to work around/with/change. When the part is -first- loaded (like..the very first time ever) the game engine will calculate the drag-cubes based upon the part geometry and planar projections. It then stores all of this information in the PartDatabase.cfg file (in the root KSP directory, next to the main game config file).

Now, even if the model for that part changes (through recompiling the model, changing geometry, whatever); that initial drag-cube calculation will be used and -never- updated or re-calculated, unless/until the user deletes either the entire PartDatabase.cfg file or the entries for the relevant part(s).

In the case of in-game-scaling, I would wager that the initial non-scaled drag-cube will always be loaded (if the part were rescaled manually in the part.cfg file prior to the PartDatabase entry being created, it would have the correctly rescaled drag cube). I have not dug into the source to confirm this (just starting work on drag cube stuff for my plugins), but I would highly doubt that the stock Part recalculates the drag-cube when it detects it has been rescaled; however, I did notice some drag-cube scaling code related to stock animations (it was actually interpolating between two drag cubes for the start and end state of animations), so there -might- be a chance that you can rescale the drag cubes on a per-active-part basis.

Drag cubes, their bugs, and the static nature of the PartDatabase file have been nothing but headaches in my mod development....why would it be any different here?

Share this post


Link to post
Share on other sites
I wonder if anyone else is experiencing this... I've got a set of wheels (the KF wheels, in which I implemented the original TweakScale options for, which worked fine with the same scale type setup a while back) and at least from the launch of 1.0.2 of kSP and onward I am getting not only no option to scale them, but the place where the scale would be is replaced by a blank entry. What I mean is the context menu has a blank spot in it where I believe it is trying to render the scale slider and failing. In addition to this, the log is spammed with: "ItemPrefab for control type 'UI_ChooseOption' not found." Now I did some digging of my own and 'UI_ChooseOption' is a KSPAPIExtensions thing which, when browsing that DLL, in the version specified by the references for TweakScale's DLL, the item does in fact exist. What's even more irritating is that the same scale type options for another part type (the KF repulsors) works perfectly fine. I'm about ready to pull my hair out trying to fix this. Has some form of game-changing modification been done to how the scale type has to be defined in order for this mod to continue working as it has in the past?

The repulsors (as in the KerbalStuff download) are different, they have freeScale=true so they use the continuous tweakable. I'll have a look at this mod and its TweakScale config. At first glance there are a few deprecated notations but the config should still work.

Share this post


Link to post
Share on other sites
To scale the model, just copy an MM patch from the config files and fill in the antenna's name. I don't think there are exponents for the antenna module yet, so the properties would stay the same.

Thanks for your reply. I did just that and it works fine (see code below). However, since I am using AntennaRange, this simple tweakscale config also changes the ranges value implemented by AntennaRange. How can I exclude those from being scaled as well (and only scale the visual size of the antennas)?

Edit: Disregard my question, it didn't change the values of AntennaRange, everything is fine! :)


@PART[commDish]
{
%MODULE[TweakScale]
{
type = stack
defaultScale = surface
}
}

@PART[mediumDishAntenna]
{
%MODULE[TweakScale]
{
type = stack
defaultScale = surface
}
}

@PART[longAntenna]
{
%MODULE[TweakScale]
{
type = stack
defaultScale = surface
}
}


Edited by Andy81le

Share this post


Link to post
Share on other sites
Drag cubes, their bugs, and the static nature of the PartDatabase file have been nothing but headaches in my mod development....why would it be any different here?

I suspected that KSP might have a hardcoded assumption that part geometry never changes. Since we just do linear rescaling it might be enough to just rescale some drag coefficient. Any idea if that will conflict with other mods? Any idea how others work around this problem? (like procedural parts, B9/pwings...)

- - - Updated - - -


%MODULE[TweakScale]
{
type = stack
defaultScale = surface
}

Where did you copy this from? "defaultScale=surface" does not make any sense and will at best be silently ignored. You probably just want "type=free" and no defaultScale (which will give a 10-400% range).

EDIT: argh, it even comes from my own configs, will correct it.

Edited by pellinor

Share this post


Link to post
Share on other sites

Hey, I'm having an issue where I can't tweak any of the NFT solar panels. I've tried stock parts and some other mod parts and those work fine, but the NFT parts don't give me the option to scale them. Any idea why?

Share this post


Link to post
Share on other sites
I suspected that KSP might have a hardcoded assumption that part geometry never changes. Since we just do linear rescaling it might be enough to just rescale some drag coefficient. Any idea if that will conflict with other mods? Any idea how others work around this problem? (like procedural parts, B9/pwings...)

That is a good question (how others are handling it). I hadn't quite gotten that far in my investigations. But it looks like I'm tackling some drag-cube stuff tonight and will let you know what I find out. Hopefully there is a per-part-instance drag cube that can just be scaled relative to its default. I mean... there has to be, as I can see the stock solar panel and animation code interpolating a (per-part-instance) drag cube between two others -- will post any info that I find / links to source if possible.

Share this post


Link to post
Share on other sites

The tweakscale config for NFT panels is outdated. Try asking Nertea, the dev of NFTs, about the tweakscale configs.

Share this post


Link to post
Share on other sites
The tweakscale config for NFT panels is outdated. Try asking Nertea, the dev of NFTs, about the tweakscale configs.

What's wrong with it? Nertea probably does not use TweakScale with these panels, otherwise he'd already have complained.

EDIT: ah, didn't read the posts before, will have to check the part names.

- - - Updated - - -

Hey, I'm having an issue where I can't tweak any of the NFT solar panels. I've tried stock parts and some other mod parts and those work fine, but the NFT parts don't give me the option to scale them. Any idea why?

Parts only scale if they are explicitely supported by a patch in one of the .cfg files that come with TweakScale (or with the part mod). I'll have a look at those panels, maybe some part names changed.

Share this post


Link to post
Share on other sites

Thanks for looking into it, tried to figure it out for myself but couldn't figure out what was what.

Share this post


Link to post
Share on other sites

Hey everybody!

For some reason I can't scale cockpits. I don't know what it is but every cockpit I try (I even went into the Squad configuration and changed the mk2 cockpit to it's new proper name) and it still doesn't work. Any help?

Share this post


Link to post
Share on other sites

Cockpits have reaction wheels. Last time I tried, reaction wheels scaled so bad, rescaling made them unusable. Maybe that's why?

Share this post


Link to post
Share on other sites
Hey everybody!

For some reason I can't scale cockpits. I don't know what it is but every cockpit I try (I even went into the Squad configuration and changed the mk2 cockpit to it's new proper name) and it still doesn't work. Any help?

IVA's possibly?

Share this post


Link to post
Share on other sites
Hey everybody!

For some reason I can't scale cockpits. I don't know what it is but every cockpit I try (I even went into the Squad configuration and changed the mk2 cockpit to it's new proper name) and it still doesn't work. Any help?

Are you using the free scale module? It has worked before when I tried this. The big problem is when you revert to launch or save reload. The root part wants to scale back to it's default scale.

Share this post


Link to post
Share on other sites
Hey everybody!

For some reason I can't scale cockpits. I don't know what it is but every cockpit I try (I even went into the Squad configuration and changed the mk2 cockpit to it's new proper name) and it still doesn't work. Any help?

There is a switch TWEAKSCALESETTINGS/noScaledCrewPods=1 in ScaleExponents.cfg. Change this to 0 to allow scaling for crewed parts. Be aware that crew capacity does not scale, and stuff like hatches may look out of place if scaled too much.

- - - Updated - - -

Last time I tried, reaction wheels scaled so bad, rescaling made them unusable.

What exactly does 'so bad' mean?

Share this post


Link to post
Share on other sites
Can someone tell me how to add a new part to tweakscale?

Or would someone be kind nuff to add this Capsule ?

http://forum.kerbalspaceprogram.com/threads/125114-1-0-2-Super-100-Shooting-Star-Command-Pod

I was able to look at the configs for other mods in the TweakScale/patches/ folder, and reverse engineer them when I learned how to make TweakScale configs. In order to rescale crew pods however, you'll have to follow directions to allow crew pod scaling. You'll need to go into ScaleExponents.cfg, scroll to the bottom, and change noScaledCrewPods = 1 to noScaledCrewPods = 0. Then, you can make your config. I've made a TweakScale config for the Tantares mod that has crew pods in it that scale. Still in testing. Feel free to reverse engineer it. You just need to create a scale type that defines the sizes the pod can be, and then assign the scale type to the part when you declare it in the config.

Hope this helps. If you can't get your head around it, I'll make one for you, and then show you how I did it so you can learn. :)

Share this post


Link to post
Share on other sites
I was able to look at the configs for other mods in the TweakScale/patches/ folder, and reverse engineer them when I learned how to make TweakScale configs. In order to rescale crew pods however, you'll have to follow directions to allow crew pod scaling. You'll need to go into ScaleExponents.cfg, scroll to the bottom, and change noScaledCrewPods = 1 to noScaledCrewPods = 0. Then, you can make your config. I've made a TweakScale config for the Tantares mod that has crew pods in it that scale. Still in testing. Feel free to reverse engineer it. You just need to create a scale type that defines the sizes the pod can be, and then assign the scale type to the part when you declare it in the config.

Hope this helps. If you can't get your head around it, I'll make one for you, and then show you how I did it so you can learn. :)

Its midnight here and i already drank quite a bit, would you make me one ?

Normally im not scared to learn new things but not in the shape im at the moment :D'

(I already tried to do it myself while on the KSPModders IRC, but no :S)

And thank you very much

// Just an idea, if the steps to create a .cfg for Tweakscale are the same everytime, why not create a program where you just point to the part you want and it adds a tweakscale .cfg ?

would make life a hell lot easier as there are so many part mods out there!

Or even try to automate it in the mod itself @OP, would that be possible ?

The mod checks if there are parts with no respective TweakScale .cfg and just creats a standard one to switch between 0.625 all the way up to 3.75?

Edited by fatjoe2015

Share this post


Link to post
Share on other sites
Can someone tell me how to add a new part to tweakscale?

Or would someone be kind nuff to add this Capsule ?

http://forum.kerbalspaceprogram.com/threads/125114-1-0-2-Super-100-Shooting-Star-Command-Pod

This should do it (change "yourPart" to the part you want to scale):


@TWEAKSCALESETTINGS:BEFORE[TweakScale]
{
@noScaledCrewPods = 0 // set to 0 for scaleable pods
}
@PART[yourPart]
{
%MODULE[TweakScale]
{
type = stack
defaultScale = 3.75
}
}

Keep in mind that crew capacity does not scale and things like hatches will look out of place when scaled far from their original size.

Share this post


Link to post
Share on other sites
Its midnight here and i already drank quite a bit, would you make me one ?

Normally im not scared to learn new things but not in the shape im at the moment :D'

(I already tried to do it myself while on the KSPModders IRC, but no :S)

And thank you very much

// Just an idea, if the steps to create a .cfg for Tweakscale are the same everytime, why not create a program where you just point to the part you want and it adds a tweakscale .cfg ?

would make life a hell lot easier as there are so many part mods out there!

Or even try to automate it in the mod itself @OP, would that be possible ?

The mod checks if there are parts with no respective TweakScale .cfg and just creats a standard one to switch between 0.625 all the way up to 3.75?

Try it with pellinor's advice first. It's really not that hard. What sizes do you want it to scale up or down to?

Share this post


Link to post
Share on other sites
Try it with pellinor's advice first. It's really not that hard. What sizes do you want it to scale up or down to?

its 3.75m standard and i want it to scale down to 2.5 and 1.25m.

This should do it (change "yourPart" to the part you want to scale):


@TWEAKSCALESETTINGS:BEFORE[TweakScale]
{
@noScaledCrewPods = 0 // set to 0 for scaleable pods
}
@PART[yourPart]
{
%MODULE[TweakScale]
{
type = stack
defaultScale = 3.75
}
}

Keep in mind that crew capacity does not scale and things like hatches will look out of place when scaled far from their original size.

Where should i put this ?

Or should i create a new textfile in the "patches" folder called "RaptorAerospacial" (because thats the name of the mod Capsule) ?

Edited by fatjoe2015

Share this post


Link to post
Share on other sites
its 3.75m standard and i want it to scale down to 2.5 and 1.25m.

Where should i put this ?

Agh. Hang on. Testing the config now. Give me a few minutes.

Share this post


Link to post
Share on other sites
// Just an idea, if the steps to create a .cfg for Tweakscale are the same everytime, why not create a program where you just point to the part you want and it adds a tweakscale .cfg ?

would make life a hell lot easier as there are so many part mods out there!

Or even try to automate it in the mod itself @OP, would that be possible ?

The mod checks if there are parts with no respective TweakScale .cfg and just creats a standard one to switch between 0.625 all the way up to 3.75?

This is clearly out of the scope of TweakScale. It is also not TweakScale-specific, the same applies to things like MechJeb, ScienceContainer or KIS-Inventory modules. If you consider it useful and doable, feel free to implement it, that's how mods are born.

Share this post


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