Jump to content

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


Biotronic

Recommended Posts

Im sorry but this is to awesome for me to download, my head may explode....

It's worth getting some brain damage. This has been a godsend for robotic parts. Rotational ones at least. Those that are pistons don't behave well just yet.

- - - Updated - - -

This has to be supported by the part before it can be used?

It comes with modulemanager and some CFGs that will convert stock and a few other parts packs to allow resizing. Give it a try.

Link to comment
Share on other sites

It's worth getting some brain damage. This has been a godsend for robotic parts. Rotational ones at least. Those that are pistons don't behave well just yet.

Now you know why I focused on rotation parts first :P.

I suspect some special code may need to be added for us to allow for this, as the range and speed would need to be scaled (for telescopic pistons at least). Hopefully some checks like Joint Reinforcement does will work.

Link to comment
Share on other sites

Now you know why I focused on rotation parts first :P.

I suspect some special code may need to be added for us to allow for this, as the range and speed would need to be scaled (for telescopic pistons at least). Hopefully some checks like Joint Reinforcement does will work.

If I can figure out how to determine if TweakScale is loaded for an IR part then I could factor in the scale value into the actual min/max translations.

Link to comment
Share on other sites

If I can figure out how to determine if TweakScale is loaded for an IR part then I could factor in the scale value into the actual min/max translations.

The way to do this at the moment is to create your own TweakScaleUpdater and register it with... crud, that function I seem to have removed. Well anyways, a new TweakScaleUpdater for IR, which sets some field on the MuMechToggle(?) to indicate the new size or simply changes the extension length.

I'm currently in the process of testing NathanKell's idea of using reflection. If that works out (I doubt it'll work for every single possibility), you can just define something like this:

TWEAKSCALEEXPONENTS
{
name = MuMechToggle
extensionLength = 1
}

and it'll magically look up extensionLength on your PartModule, multiply the default value by the scale, and store it back in.

Link to comment
Share on other sites

Just a quick question - are engines meant to gain 16x power when doubling their radius, and to reduce by 16x when halving, as opposed to increasing/decreasing as a cube function (8x on doubling, I think...)? I ask because an 1850 thrust NovaPunch 2.5m engine (pretty powerful already, relatively) become 29,600 thrust 5m engines, and though this could do wonders to reduce part counts on my 600-ton lifter, it seems a bit crazy =)

Awesome plugin, thank you for making this.

Link to comment
Share on other sites

Well let me know what will be available. It's really simple for the translations like the Adjustable rail. I would just have to divide translateMin and translateMax by the scaleFactors supplied by the SCALETYPE. How to get that is the part I need to figure out.

Link to comment
Share on other sites

Just a quick question - are engines meant to gain 16x power when doubling their radius, and to reduce by 16x when halving, as opposed to increasing/decreasing as a cube function (8x on doubling, I think...)? I ask because an 1850 thrust NovaPunch 2.5m engine (pretty powerful already, relatively) become 29,600 thrust 5m engines, and though this could do wonders to reduce part counts on my 600-ton lifter, it seems a bit crazy =)

That does seem off. The code says they should scale with the square of the radius (which is not right either, but I figure making smaller engines more powerful may be less of a problem than making huge ones enormously powerful).

Awesome plugin, thank you for making this.

My pleasure.

Link to comment
Share on other sites

Guys, I'm sorry to ask this again, but I really am having a hard time getting this plugin to work. I've just dragged the folder and KSPAPIExtensions.dll into my GameData folder, but still nothing is showing up in the VAB.

Is there something I'm doing wrong, or anything conflicting?

Here is an snapshot of my GameData folder, just to show you the general structure and add-ons I have installed, maybe you can see something done wrong?

YF5fk6o.png

Let me know if I shouldn't be posting this.

Link to comment
Share on other sites

Guys, I'm sorry to ask this again, but I really am having a hard time getting this plugin to work. I've just dragged the folder and KSPAPIExtensions.dll into my GameData folder, but still nothing is showing up in the VAB.

Is there something I'm doing wrong, or anything conflicting?

Here is an snapshot of my GameData folder, just to show you the general structure and add-ons I have installed, maybe you can see something done wrong?

http://i.imgur.com/YF5fk6o.png

Let me know if I shouldn't be posting this.

What do you mean nothing shows up in the VAB? If there are no parts at all in the list on the left, please upload output_log.txt somewhere and link it here. If you mean there are no new parts, everything is working as expected and you should try placing a few stock parts and right clicking them.

Link to comment
Share on other sites

For ease of programming (and avoiding issues) it might make sense for those blocks to be

TWEAK
{
PARAM
{
name = mass
exponent = 2.5
orig = 12.0
}
MODULE
{
name = ModuleEngines
PARAM
{
name = maxThrust
exponent = 2.0
orig = 60.0
}
}
}

This is what RF does; it saves you having to worry about whether you safely recorded the original value or not if you force the user to supply it :)

Link to comment
Share on other sites

What do you mean nothing shows up in the VAB? If there are no parts at all in the list on the left, please upload output_log.txt somewhere and link it here. If you mean there are no new parts, everything is working as expected and you should try placing a few stock parts and right clicking them.

I should clarify, I mean that when right clicking, no option for scale shows. I've tried Stock and NASA parts, and there is nothing. I have used the Godspeed pack, and I've seen how it was implemented in that mod.

Link to comment
Share on other sites

For ease of programming (and avoiding issues) it might make sense for those blocks to be

TWEAK
{
PARAM
{
name = mass
exponent = 2.5
orig = 12.0
}
MODULE
{
name = ModuleEngines
PARAM
{
name = maxThrust
exponent = 2.0
orig = 60.0
}
}
}

This is what RF does; it saves you having to worry about whether you safely recorded the original value or not if you force the user to supply it :)

The problem with this is the value will be different for each part. The current solution grabs the value from the prefab part. I haven't experienced any problems with that approach, but I guess there may be some.

Link to comment
Share on other sites

Hello hello - wanted to let you know that (I think) there's a conflict between TweakScale and Procedural Parts. I've tried this on a clean install where only those two mods are present. I don't know what information will be most useful, but here's what happens:

-TweakScalable parts (like Squad stuff) can be scaled as normal.

-Procedural tanks can be scaled in diameter in length, but the shape can't be changed.

-When the procedural tanks are scaled, the attach nodes scale in size but do not move with the new, larger size of the tank (they remain in space where they would have been for the initial 1.25m size).

-However, when you then attach the procedural tank to a command pod, for instance, using one of the nodes that are now visually inside the part, the pod is pushed to the top surface of the tank anyway as if the node were actually on top.

With a lot of other mods installed, and after trying random attempted fixes like deleting all but one KSPAPIExtensions.dll, I managed to make it so that no parts showed up in the VAP/SPH part lists at all, but I don't know how to replicate that.

Removing the KSPAPIExtensions.dll from the ProceduralParts/Plugins directory (thinking that might be the conflict) makes procedural parts all appear identical in the VAB (as opposed to the decoupler appearing flatter, the RCS tank being more squat and having a different texture, etc.) and breaks their scaling completely.

Here's a link to a log file (from the attempt where I did NOT delete Proc Parts' .dll), let me know if something else would be more helpful: https://dl.dropboxusercontent.com/u/59567837/KSP.log

Link to comment
Share on other sites

That should be fine (just be careful you don't run the module *on* the prefab, else everything will be changed when you run it again to find the defaults). But yeah, I thought you *would* be writing a cfg for each part, so having in the confignode some part-specific numbers would be ok. But if you're wildcarding...

Link to comment
Share on other sites

That should be fine (just be careful you don't run the module *on* the prefab, else everything will be changed when you run it again to find the defaults). But yeah, I thought you *would* be writing a cfg for each part, so having in the confignode some part-specific numbers would be ok. But if you're wildcarding...

I guess I could add the option of specifying it like that, and fall back on prefab for anything not specified:


MODULE
{
name = TweakScale
type = stack
DEFAULTVALUES
{
name = ModuleEngines
maxThrust = 650
}
}

But I think it better to wait until someone requests that feature.

Link to comment
Share on other sites

Question. With the reflection version. How does one specify for example changing the translateMin, and translateMax of a specific part(AdjustableRail for example) with relation to size within MuMechToggle? Is this possible through the plugin? I don't want to affect anything that is rotational as scale doesn't matter in "their" case.

Link to comment
Share on other sites

Do you still have the Goodspeed plugin installed? If so, you should delete it as the two aren't compatible.

Looks like that and the new version solved the problem. I tried deleting the Godspeed plugin when 1.1 of TweakScale was released and it didn't seem to work, but as of this release, it's all golden. :D

I appriciate the help and I am loving this plugin.

Link to comment
Share on other sites

Hello hello - wanted to let you know that (I think) there's a conflict between TweakScale and Procedural Parts. I've tried this on a clean install where only those two mods are present. I don't know what information will be most useful, but here's what happens:

-TweakScalable parts (like Squad stuff) can be scaled as normal.

-Procedural tanks can be scaled in diameter in length, but the shape can't be changed.

-When the procedural tanks are scaled, the attach nodes scale in size but do not move with the new, larger size of the tank (they remain in space where they would have been for the initial 1.25m size).

-However, when you then attach the procedural tank to a command pod, for instance, using one of the nodes that are now visually inside the part, the pod is pushed to the top surface of the tank anyway as if the node were actually on top.

With a lot of other mods installed, and after trying random attempted fixes like deleting all but one KSPAPIExtensions.dll, I managed to make it so that no parts showed up in the VAP/SPH part lists at all, but I don't know how to replicate that.

Removing the KSPAPIExtensions.dll from the ProceduralParts/Plugins directory (thinking that might be the conflict) makes procedural parts all appear identical in the VAB (as opposed to the decoupler appearing flatter, the RCS tank being more squat and having a different texture, etc.) and breaks their scaling completely.

Here's a link to a log file (from the attempt where I did NOT delete Proc Parts' .dll), let me know if something else would be more helpful: https://dl.dropboxusercontent.com/u/59567837/KSP.log

After a short test, it seems to me that removing Procedural Parts's copy of KSPAPIExtensions.dll fixes the problem.

I strongly disagree with their placement of the dll, as it's a dll that is used by other projects and should therefore reside in a common directory, and I've thus informed the mod creator.

[EDIT]A short talk with swamp_ig later, I've found his reasons to be sound. Please delete KSPAPIExtensions.dll in the Gamedata directory, and install TweakScale 1.5.0.1.[/EDIT]

Edited by Biotronic
New information
Link to comment
Share on other sites

Sorry missed that post.

Sadly removing the dll from either PP or PF breaks them (so each needs it's own to function). I won't argue with swamp_ig, but do agree that the root folder is the most GAC like thing KSP offers.

Well, I suppose there will be new builds soon, so I'll live with it :)

Thanks for your response.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...