Jump to content

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


Biotronic

Recommended Posts

Ya, right now the mod doesn't affect crew capacity, but it'd be really cool if it did. If it scaled directly, a mark 2 inline cockpit could hold 6 times as many (12) Kerbals if you scaled it up to 7.5 metres.

At this time you can store 4 or more kerbals in a 62cm x 0.5t module, it is cool too, but not realistic at all!

Link to comment
Share on other sites

Something now blows up with the latest version when using Infernal Robotics. Nothing has changed on my end so something happened. When resizing i get this error:


119290 [TweakScale] Setting mass from 0.1 to 0.05
119291 (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)
119292 ArgumentException: Object type System.Double cannot be converted to target type: System.Single
119293 Parameter name: val
119294 at System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
119295 at System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) [0x00000] in <filename unknown>:0
119296 at TweakScale.MemberUpdater.Set (System.Object value) [0x00000] in <filename unknown>:0
119297 at TweakScale.ScaleExponents.Rescale (TweakScale.MemberUpdater current, TweakScale.MemberUpdater baseValue, System.String name, ScalingMode scalingMode, ScalingFactor factor) [0x00000] in <filename unknown>:0
119298 at TweakScale.ScaleExponents.UpdateFields (System.Object obj, System.Object baseObj, ScalingFactor factor, .Part part) [0x00000] in <filename unknown>:0
119299 at TweakScale.ScaleExponents.UpdateObject (.Part part, .Part prefabObj, System.Collections.Generic.Dictionary`2 exponents, ScalingFactor factor) [0x00000] in <filename unknown>:0
119300 at TweakScale.TSGenericUpdater.OnRescale (ScalingFactor factor) [0x00000] in <filename unknown>:0
119301 at TweakScale.TweakScale.OnTweakScaleChanged () [0x00000] in <filename unknown>:0
119302 at TweakScale.TweakScale.Update () [0x00000] in <filename unknown>:0
119303 (Filename: Line: -1)

I would also like to add that it works in version 1.43 but any version newer than that it fails.

Edited by sirkut
Link to comment
Share on other sites

Wow, this new update changes everything. Did you saw my post or were contacted by EnterElysium? Because yesterday, we were talking about a mod that could rescale all parts at once. I even asked in the welding mod thread: Here a link

Thank you for making this mod even more awesome!

My pleasure. EnterElysium did indeed contact me. The idea has been brewing in the back of my head for a while, but now I got a much-needed kick to the butt. Thanks, EE!

Edit: I have one more wish, can you add the option that the Rescale chaining applies to all scaletypes? So I rescale parts with different scaletypes. Would be helpful. Maybe make the option that all parts are the "free scaletype".

As for having it apply to all scaletypes, there are numerous problems, (some of) which I enumerated for EnterElysium's reading pleasure. Chief among them is probably this: I have a 3.75m tank mounted on a 1.25m tank. I rescale the 1.25m one to be 2.5m. What size should the 3.75m one be? 7.5m is not an option. I'm not willing to accept 5m, either.

Oh, and I plain forgot to mention: if you need to rescale only one part (not a chain), you can hold down shift when using the slider/buttons. Maybe I should mention that somewhere.

If you desperately want all scaletypes to be freescale, you can use this cfg:

@PART[*]:HAS[@MODULE[TweakScale]]:Final {
@MODULE[TweakScale] {
@defaultScale = 100
@type = free
}
}

I feel this is such a niche feature that it's better to offer it as a more advanced opt-in, rather than bundle it with standard TweakScale.

Link to comment
Share on other sites

Thanks, Biotronic, the new features are much appreciated. This plugin keeps getting better and better.

I don't know which problems you were referencing regarding, "I'm looking into it." I'm not trying to pester or be annoying by repeating the same post with different words. If, on the other hand, you were partly thinking of my post regarding RCS thrust, then I thought I'd include a few screenshots. I thought that it might help you in some form.

Image 1 shows a basic RCS thruster that is not Tweakscaled at all (it's from the HGR mod, but my observations apply to any RCS port).

Image 2 demonstrates that changing the thrust power works as intended on both ports, the second of which is placed in symmetry on the starboard side.

Image 3 shows the bug. All I have done is left-click the port RCS port to move it. Immediately after clicking it, the opposing RCS port's thrust power changes.

http://imgur.com/a/jQVe9

Again, I hope this helps. My intent is not to pester, but to help in some way.

Regards

I've now taken (more than) a few closer looks at this, and it seems I cannot reproduce the exact problem - not with 1.44, 1.45, 1.46, nor with what will in a few minutes be 1.47.

I have, however, been able to reproduce a similar bug:

Using mods TweakScale, TweakableEverything, and RCS Build Aid.

Placing two RCS thrusters in symmetry. Note that their thrust vectors are of equal magnitude.

Rescale thrusters. Note that thrust vector changes magnitude for one frame, then reverts.

Pick up one thruster. Note that other thruster's thrust vector changes to expected magnitude.

Right-click one thruster, change Thrust Limiter. Note that thrust vectors react differently to changing Thrust Limiter.

Without TweakableEverything, thrusters behave sensibly, so clearly this is an interaction between TE and TS.

I don't have the time to finish this today, so I will release 1.47, which fixes the issue with Infernal Robotics, as well as velve's fuel tank issue, and hope to get more insight tomorrow.

Edited by Biotronic
Link to comment
Share on other sites

Apologies, Biotronic. I bow my head in shame for not adhering to the guidelines. I actually thought I had said that it was TweakableEverything and RCSBuildAid that brings the issue to light. I think I may have done so, but then gone back and edited it out by accident when I re-read my post before clicking publish. Sometimes, my air-headed-ness makes me laugh.

Yeah, you've just reproduced the same thing that I am seeing on my end. You, however, described the behavior in much better detail.

Cheers!

Link to comment
Share on other sites

Yay, updates!

One thing: would it be possible to add KSP-AVC support? I have a basic outline for the current version here:

{
"NAME": "TweakScale",
"DOWNLOAD": "https://github.com/Biotronic/TweakScale/releases",
"VERSION": {
"MAJOR": 1,
"MINOR": 46,
"PATCH": 0,
"BUILD": 0
},
"KSP_VERSION": {
"MAJOR": 0,
"MINOR": 25,
"PATCH": 0
}
}

I think that's right... Feel free to add in a Download link and change logs and stuff if you take it on board.

Link to comment
Share on other sites

Nice!

My pleasure. EnterElysium did indeed contact me. The idea has been brewing in the back of my head for a while, but now I got a much-needed kick to the butt. Thanks, EE!

As for having it apply to all scaletypes, there are numerous problems, (some of) which I enumerated for EnterElysium's reading pleasure. Chief among them is probably this: I have a 3.75m tank mounted on a 1.25m tank. I rescale the 1.25m one to be 2.5m. What size should the 3.75m one be? 7.5m is not an option. I'm not willing to accept 5m, either.

Oh, and I plain forgot to mention: if you need to rescale only one part (not a chain), you can hold down shift when using the slider/buttons. Maybe I should mention that somewhere.

If you desperately want all scaletypes to be freescale, you can use this cfg:

@PART[*]:HAS[@MODULE[TweakScale]]:Final {
@MODULE[TweakScale] {
@defaultScale = 100
@type = free
}
}

I feel this is such a niche feature that it's better to offer it as a more advanced opt-in, rather than bundle it with standard TweakScale.

Thanks for the info! I already changed the part I needed to free scale per hand, the result was the Reaper. It worked perfectly. Anyways, I thankfully will take your cfg. ;)

I should have asked you much more earlier for this. I wanted such a feature since last year, but never really thought about asking here. And on the last weekend, EE and me were talking about rescaling, welding and stuff. Looks like everything got solved. :cool:

Link to comment
Share on other sites

Wow awesome support, very fast biotronic you are legend!

Testing new version right now. Thank you.

//All the issues I was having have been resolved with this new update, Thank you. Only problem now is with KER and the mass values it reports, seems to be a bit buggy. If I go from a 1.25 engine to a 62.5 engine the mass only reduces by about 2%, same applies with upscaling, yet now and then the values do seem appropriate after removing and re-attaching, but only now and then.

But that I'm sure is quite a mission to try and get working, I am no way trying to sound like I'm whining, just trying to help. and if I recall was there in 1.44 as well so no biggie.

Edited by velve
Link to comment
Share on other sites

Request: could parts guess what size they should be by what size attach node they're attached to? The Mk16 chute wants to default to 1.25m when placed on top of the Mk1 pod which is less than ideal.

9QRYviR.jpg

(This is also a problem for KER as it incorrectly reports vessel mass now, brb going to post on KER thread)

Link to comment
Share on other sites

Posted this in the IR thread too, and don't know which end is responsible (the tweakscaling or the IR stuff) - but if someone happens magically to drop some free time in your lap, figuring out how to make tweakscale work for IR parts (not just scaling downward, as they do now, but scaling to any size for any of the parts) would be world-changing. Epic. You know, pretty neat =)

EDIT: if I could make a suggestion too, it would be this: the auto-resizing thing is neat, but it's annoying when you really do want a big part on a small stack or vice versa. Could it be made so that you have to hold down a key while attaching the part in order for the auto-resize to happen?

EDIT AGAIN: There still seems to be something wonky going on in 1.47 with fuel in scaled tanks. The max value is often far lower than the amount of fuel, or the amount of fuel is lower than the max value, when you scale things up and down. Scale FLT-800 up one (to 2.5m): no problem. Scale to 3.75m? 9.72k out of 77k fuel in tank. Lots of weirdness like that. Scaling it back down gives you 663k fuel max in the tank or so. If you just scale up & down a few times, quickly gets into the hundreds of millions or billions or whatever.

Edited by AccidentalDisassembly
Link to comment
Share on other sites

If you desperately want all scaletypes to be freescale, you can use this cfg:

@PART
[*]:HAS[@MODULE[TweakScale]]:Final {
@MODULE[TweakScale] {
@defaultScale = 100
@type = free
}
}

Where do I add this?

Link to comment
Share on other sites

Scaling seems to be generally bugged in 1.46. For example if you scale upwards then scale back the size will be scaled correctly but not the mass nor any other property like fuel capacity.

Also mk16 parachute are not scaled correctly when placed on a mk1 command pod.

I'll attach pics when I get back home.

http://imgur.com/a/Nre8G#0

Sorry to bother you but have you been able to fix this?

Link to comment
Share on other sites

I have yet to try 1.47 but I noticed that if you rescale certain parts that have symmetry (floodlights for instance,) the other symmetrical parts are the wrong size and position. Keep up the good job on the updates though!

Link to comment
Share on other sites

EDIT: if I could make a suggestion too, it would be this: the auto-resizing thing is neat, but it's annoying when you really do want a big part on a small stack or vice versa. Could it be made so that you have to hold down a key while attaching the part in order for the auto-resize to happen?

Agreed. It seems hit-or-miss when guessing the size of parts causing more frustration than anything else. A hot key or a setting to simply disable it entirely would be appreciated.

Link to comment
Share on other sites

Request: could parts guess what size they should be by what size attach node they're attached to? The Mk16 chute wants to default to 1.25m when placed on top of the Mk1 pod which is less than ideal.

http://i.imgur.com/9QRYviR.jpg

I believe there are two main problems here:

1. Some parts are incorrectly scaled as 'stack' while they would more correctly be classed as 'adapters'. Command Pod Mk1 and Mk1-2 Command Pod come to mind here. While you probably don't think of them as adapters, they have a wide end and a smaller end, and thus perfectly fit that category.

2. Adapters should automagically scale correctly in both ends. This is a somewhat involved problem, and would require some sort of configuration. I'll look into what can be done here.

In the meantime, and probably permanently, I'll be using some key to disable autoscaling. Expect that feature tonight (UTC) or tomorrow.

Link to comment
Share on other sites

Hi all,

First of all, thank you for this very usefull add-on.

Yesterday, I update to 1.47, and after loazding my sandbox game, I found that my space station was a little bit different. It seems that elements were resized (especially, Stratus-V Cylindrified Monopropellant Tank). I keep on playing since everything else looks fine. I loaded a rocket and discovered that a radial decoupler was oversized so much that it disable rocket laucnh because of its weight. I went on and made some docking operations.

But this morning, I thought I had to make some pictures of it to show this issue. But as soon as I go to the station or use the last quicksave, the station simply blows up. While physics are back, KSP is discovering that monopropellant tanks are merged/in conflict, and the whole station is destroyed.

I guess I can recover the save made before yesterday, but I am afraid the same causes leads to same effects. I will try to provide pictures and/or log during the week.

Thanks again.

Link to comment
Share on other sites

Hi, i have a problem i haven't found being mentioned in the last couple of pages. The problem appeared when i updated TweakScale from 1.44 to 1.47, deleting the old files in the process. Going back to 1.44 fixes it.

The problem is twofold:

One, i get ridiculous masses when upscaling parts, like here: Link. The mass increase for one step gets larger than a factor of 1000.

Two, when i upscale a part and then downscale again the mass is still nearly as high as it was upscaled. By continually up- and downscaling the mass will get even more ridiculous.

After a few experiments this problem seems to appear only in mod parts though, stock parts act normally as far as i am aware. Also, i am using a lot of mods including RealismOverhaul, (hopefully complete) list here, so it may be some kind of mod issue. I am wondering though if this is a problem only i am having.

So, anyone else got this problem? Any suggestions as to what the problem is? If this problem didn't come up before i can delete mods to see if there's a conflict.

Link to comment
Share on other sites

I'm also having some weird problems.

http://i57.tinypic.com/232m3d.png

It only happens if I try to edit last craft in SPH (VAB doesn't seem to be affected). I can grab any part without breaking symmetry and parts under. Trying to launch that vehicle gives this:

http://i57.tinypic.com/14xm2jq.png

Basically everything is frozen, camera is always in the same place, you don't see the craft, there are some weird lights and if you time accelerate it starts going in a straigt line towards the ground or up in the sky (without any control)

I'm on very heavily modded KSP install on linux 64bit. This bug occurs only on TweakScale version higher than 1.44

Link to comment
Share on other sites

Hi, i have a problem i haven't found being mentioned in the last couple of pages. The problem appeared when i updated TweakScale from 1.44 to 1.47, deleting the old files in the process. Going back to 1.44 fixes it.

The problem is twofold:

One, i get ridiculous masses when upscaling parts, like here: Link. The mass increase for one step gets larger than a factor of 1000.

Two, when i upscale a part and then downscale again the mass is still nearly as high as it was upscaled. By continually up- and downscaling the mass will get even more ridiculous.

After a few experiments this problem seems to appear only in mod parts though, stock parts act normally as far as i am aware. Also, i am using a lot of mods including RealismOverhaul, (hopefully complete) list here, so it may be some kind of mod issue. I am wondering though if this is a problem only i am having.

So, anyone else got this problem? Any suggestions as to what the problem is? If this problem didn't come up before i can delete mods to see if there's a conflict.

I've the same... if I look at tanks. The amount of fuel is multiplied with 8 for double diameter, which is ok. But when rescaling it, the amount is going to be the same. Also if I copy the upscaled part with Alt+Left Click the amount of fuel is multiplied with 8 again, though it's the same diameter. This could be done again and again... Occured with NFT Xenon tanks.

Further existing ships explode when I entry timewarp. Happens with a B9 Spaceplane and a stock rocket. I'm not sure at all ships, but at one ship, there wasn't even a scaled part.

Going back to 1.44 solve all problems.

Link to comment
Share on other sites

Pretty sure I was using 1.43. This is completely incompatible with Infernal Robotics, any IR part on my ship causes what would appear to be the ship losing its root node. My ship is destroyed, and if I manage to get it to the launch pad, the save is irrevocably damaged as well.

Upgrading to 1.47 "seemed" to fix the IR issues. However, weirdness as well happens. RCS parts on pre-built ships are much larger, probably scaled to the largest setting. I only noticed this on the stock rcs thrusters and the smaller circular side mount tanks, because those were the only RCS parts I had unlocked. Attaching new RCS parts in the VAB worked as expected.

In the SPH, when building a space plane, I was not able to attach any air intakes in mirror mode. I could hack an attach by going in singular mode and then grabbing a new part and attaching in the same place on the other side of the vehicle. However, upon launch, the vehicle was destroyed and on loading the auto save, the ship seemed to have lost its root node like from the original IR issue.

Whenever attaching to a decoupler a part will resize to whatever diameter the decoupler is.

TLDR:

RCS, Air Intakes, and decouplers might be a productive avenue of research. I can provide screenshots, but the descriptions should be pretty self-explanatory. Logs too, if wanted.

Cheers

Link to comment
Share on other sites

Also running into a bug with mass scaling up, but not down. Which is exacerbated by the auto-resize.

Personally i expect to resize a part manually to fit, but when the computer guesses and gets it wrong it drives me nuts. :P

I would love to see this feature be an optional checkbox, so to speak, somewhere. Not something i have to press and hold every time i add a part.(Assuming that is what you meant from an earlier post.)

Link to comment
Share on other sites

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