Jump to content

[WIP] TweakScale - Development Thread


pellinor

Recommended Posts

Looks like currentScale(Cs) used to be a multitude reference to defaultScale(Ds)... and that you're converting all the Ds's to a base 100 system, with literal percentages. The .craft file I'm looking at is showing me that all the Ds's are being updated to the 100% system, but the Cs's are not being scaled along with it. So what used to be Ds=1, Cs=4, is now Ds=100, Cs=4.

Net result: Hilariously tiny wing parts hiding inside of strut ends. :D

[uPDATE]

I was able to manually edit the craft file, searching for every instance of "defaultScale = 1" and convert the tweakScale, currentScale, and defaultScale values for the offending parts to their values * 100 and all's well in my craft file now.

- - - Updated - - -

Sorry to spam the thread, but now that I've got my craft file back together I remember why I came looking for the WIP version of tweakscale in the first place. My jet engines aren't scaling in terms of thrust. Thrust and (I think) fuel flow are not currently being affected by scaling, at least in the air breathing engines. I haven't tested beyond that.

Edited by Roninpawn
Link to comment
Share on other sites

Looks like currentScale(Cs) used to be a multitude reference to defaultScale(Ds)... and that you're converting all the Ds's to a base 100 system, with literal percentages. The .craft file I'm looking at is showing me that all the Ds's are being updated to the 100% system, but the Cs's are not being scaled along with it. So what used to be Ds=1, Cs=4, is now Ds=100, Cs=4.

I can not replicate this on my install:

* I saved a craft with a part of scaleType 'stack', the craft file says Ds=1.25, Cs=1.25.

* After changing the TweakScale config to free, I restart KSP, reload (looks ok) and save the craft. Now the craft file says Ds=100, Cs=100.

* Then I edit the craft file to Ds=0.5, Cs=1. The part correctly shows up double-size and is later saved to Ds=100, Cs=200.

The feature of surviving changes like these is pretty recent but was added before recompiling for KSP1.0 and moving parts from scaleType surface (Ds=1) to free (Ds=100%). So at the moment I could only explain what you see by the combination of an old Scale.dll and younger TweakScale configs.

Link to comment
Share on other sites

I have some weird behaviour with the Nose Cones in the aero section of the part list. Two things I observed: 1. If you place two in symmetry mode (putting em on boosters for example) the one you place with the cursor is in the correct size, the other one scales extra small. 2. When upscaling the "small nose cone" it scales so big it goes outside the VAB.

Edit I think its the current dev build:

VERSION":{

"MAJOR":1,

"MINOR":54,

"PATCH":0,

"BUILD":0

Edit2: Oh I found another thing. If you downscale the Hydraulic Detachment Manifold (in my test to 10%), it instantly explodes on the launchpad due to "overheating". I tested this with an unscaled version, it stays intact. If you upscale it, it stays intact too. Seems scaling down lowers heat resistance or something?

Edited by DaniDE
Link to comment
Share on other sites

I have some weird behaviour with the Nose Cones in the aero section of the part list. Two things I observed: 1. If you place two in symmetry mode (putting em on boosters for example) the one you place with the cursor is in the correct size, the other one scales extra small. 2. When upscaling the "small nose cone" it scales so big it goes outside the VAB.

Oh, stupid copy&paste errors when changing lots of config lines. fixed. Thanks for reporting!

- - - Updated - - -

If you downscale the Hydraulic Detachment Manifold (in my test to 10%), it instantly explodes on the launchpad due to "overheating". I tested this with an unscaled version, it stays intact. If you upscale it, it stays intact too. Seems scaling down lowers heat resistance or something?

The small manifold works for me, you probably have some version from yesterday where the exponent for maxTemperature is still in. It was always there (and never made any sense), but did not attract any attention because maxTemp did not do much before 1.0.

As for the versions, I usually increase the version number only when the dll is recompiled, so it does not reflect every single config change.

- - - Updated - - -

My jet engines aren't scaling in terms of thrust. Thrust and (I think) fuel flow are not currently being affected by scaling, at least in the air breathing engines. I haven't tested beyond that.

Good finding. TweakScale and MechJeb agree that thrust scales as it should. Just KSP seems to ignore it. So the jets have the maxThrust value like other engines but seem to ignore it in their calculations...

Link to comment
Share on other sites

I'm talking about a craft that was built from scratch in .90 KSP using the .90 stable version of tweakscale without custom configs or changes. When brought into the 1.0 WIP Tweakscale (to which I have also not made any custom changes), around 30% of my wings - mainly but not exclusively type A wings - end up becoming micro-size as described.

I have a .craft file if you'd like to see it. But I can't share it publicly at this time. I'll PM you with a link and an NDA.

Edited by Roninpawn
Link to comment
Share on other sites

Update: fixed thrust scaling. Though the config values still are min/maxThrust, the kspFields that matter are now called min/maxFuelFlow. RCS still seems to work the old way.

- - - Updated - - -

Any more test results? I'd also be pleased to hear if any of the new modules work as intended. Haven't found the time yet to build a single plane in 1.0 myself.

Link to comment
Share on other sites

"sorry" to say this, but right now everything seems to be fine :) I have not noticed anything weird, given that the mechjeb delta-v window is accurate and working. Anything in particular you need tested?

- - - Updated - - -

Upscaling a less advanced (or smaller) engine is less efficient than downscaling a more advanced (/larger) engine, which makes sense imho. After playing around with it while now, I think I like it how it is.

Edited by DaniDE
Link to comment
Share on other sites

I was about to write 'the new stuff', just when realizing that I put in all the the exponents to support the new modules but the parts are not maked as scaleable yet! I'm off to write patches...

- - - Updated - - -

Upscaling a less advanced (or smaller) engine is slightly less efficient than downscaling a more advanced (/larger) engine, which makes sense imho. After playing around with it while now, I think I like it how it is.

What does 'efficient' mean? At the moment scaling in both directions should have 'neutral' efficiency in the sense that the gameplay-relevant properties (ISP, TWR, and cost/thrust) are conserved. I'm actually thinking about giving upscaling a slight advantage so you would prefer using one large engine to spamming small ones.

Link to comment
Share on other sites

Please note that the TWR displays for MJ2 build 437 is semmingly borked somehow right now. Things start to lift at 2.01 TWR atm. So I will roughly halve the numbers here. Its not correct to the last decimal.

What does 'efficient' mean?.

Not speaking purely of ISP, let me fetch a few numbers out of my VAB. KR-2L downscaled from 3.75 to 2.5 gives me a TWR of 0.57 and 3216 dV, the mainsail which is at 2.5m gives me 1,15 TWR and 4748 dV. Huh. Let me restart KSP, that was different earlier. It was not that much of a difference. I will fetch the newest dev build of tweakscale again also.

- - - Updated - - -

Ah great. Engineer shows double TWR too. But the scaling is back in business. So. KR-2L down to 2.5m gives me 2.94 TWR 3.363 dV. Mainsail at its stock size gives me 2.56 TWR, 2562 dV. So the downscaled larger engine is more efficient. Both get beaten by upscaling the LV-T45 at TWR 3.77 / but only 2325 dV.

- - - Updated - - -

So I would take the downscaled KR-2L , because it can go "further".

- - - Updated - - -

If upscaling the LV-T45 would make it actually beat the KR-2L in the dV even if it has slightly less TWR and can still do the job, I would take that one. But right now, the downscaled version is more attractive. 1000 dV more attractive :D

Edited by DaniDE
Link to comment
Share on other sites

The current mechjeb does not see the scaled thrust, it worked with the old exponent (which KSP now ignores) and stopped working with the new ones that work with KSP. But when I launch and read the right click menu of the parts in flight, the thrust seems correct.

Delta-v is not a property of an engine, and I would be wary with the current calculators because the mechanics have changed.

Link to comment
Share on other sites

Yes. I think I understand. But thats how I can compare what I do and scale, and how I would decide what to scale and choose as engine. Downscaling larger engines seems to be a winner somewhat.

Edit: Its still good for comparison actually, I compare the scaled and unscaled engine with the same vessel/fuel tank, and the same underlying calculation in engineer. Even if the values are not correct in the end with the new flight model, it should still give you the right idea in comparison under the same circumstances, right?

I fear I suck at QA :D

Edited by DaniDE
Link to comment
Share on other sites

Dev Update:

* scaling support for new stock parts: Fairings, Airbrake etc.

* switch for scaleability of crewed parts (defaults to OFF)

- - - Updated - - -

Yes. I think I understand. But thats how I can compare what I do and scale, and how I would decide what to scale and choose as engine. Downscaling larger engines seems to be a winner somewhat.

Edit: Its still good for comparison actually, I compare the scaled and unscaled engine with the same vessel/fuel tank, and the same underlying calculation in engineer. Even if the values are not correct in the end with the new flight model, it should still give you the right idea in comparison under the same circumstances, right?

I fear I suck at QA :D

Ok now I also have engineer installed and its values look reasonable. Mechjeb just saw no thrust scaling at all, so it would not give useful results.

Link to comment
Share on other sites

Yes, but my MJ scaled the numbers along, the latest dev build from an hour ago. Sarbian does not seem to sleep. :D

Anyways! I just clustered several 1.25m downscaled KR-2L and like them. They perform much better than any smaller and upscaled or 1.25m engine. The formula seems to be upscale for more TWR and only slight increase fuel efficiency and downscale for fuel efficiency but worse TWR than upscaled engines. I might be wrong, I have not tested every single engine. Any scaled engine however seems to beat the stock size.

Except the worst tiny engines who have such bad isp and thrust that the scaling exponent cant beat the more efficient engines.

Edited by DaniDE
Link to comment
Share on other sites

Ok, fairings do not work (large gaps between the pieces, can't relate them to any config value). Commented the patches out. Feel free to tinker with them, I'll gladly include them if someone gets this to work.

Link to comment
Share on other sites

It is also getting late for me. So if no large issues pop up until then I will release tomorrow. This will be TweakScale 2.0, because the mayor things I thought were wrong are now in:

* usable free scaling support for everything

* conservation of both TWR and fuel fraction

Link to comment
Share on other sites

Thank you so much for all your hard work and for getting us a timely update for this crucial mod!

- - - Updated - - -

I'm building a giant Helicarrier and have Basic Jet Engines scaled to 5m... Each of them is nowhere near any other engine, but simply running them at full throttle causes catastrophic overheating.

- - - Updated - - -

Correction: Running them at all, even thrust-limited to less than half capacity causes them to go 'splode-y.

- - - Updated - - -

Also, was trying to figure out why I can't achieve lift with this system anymore and noticed that my craft's weight in the SPH is 214 tons. Once on the runway, map mode info indicates 1560 tons!

Link to comment
Share on other sites

I just did a test with a small rocket and airbrakes, and it seems to work as intended. Downscaled airbrakes brake less, weigh less and cost less. Upscaled ones weigh more, cost more aaaand...brake more! To a point where it becomes like a controllable parachute :)

On a sidenote: Large Airbrakes look awesome. Gonna build a dropship soon with those.

(As I said, I am not a spaceplane guy, I never built a plane or flew one. So my input is from VAB/Launchpad only :)

From my point of view things seem to work :D

About that fairing thing. If someone really needs fairing bases above 3.75m, he/she can always get the procedural fairings mod which works fine with tweakscale. Since there are so many easy to get alternatives to the stock fairings its not really a problem for anyone. Although I admit I *like* the new stock fairings and how they work in the VAB.

Edited by DaniDE
Link to comment
Share on other sites

Oh. I put in a patch to test scaling the service bays, it seems to work fine.

// New 1.0 Stock Service Bays

@PART[ServiceBay_125]
{
%MODULE[TweakScale]
{
type = stack
defaultScale = 1.25
}
}

@PART[ServiceBay_250]
{
%MODULE[TweakScale]
{
type = stack
defaultScale = 2.5
}
}

Edited by DaniDE
Link to comment
Share on other sites

The heatProduction values for engines look like a mess, and KSP ignores my scaling. More details here. Current status is that enlarged engines seem to produce too much heat. On the other hand they have more power per surface area, so this might be consistent behavior.

- - - Updated - - -

About that fairing thing. If someone really needs fairing bases above 3.75m, he/she can always get the procedural fairings mod which works fine with tweakscale. Since there are so many easy to get alternatives to the stock fairings its not really a problem for anyone. Although I admit I *like* the new stock fairings and how they work in the VAB.

It is not just about larger fairings but the whole scaling freedom, like 30cm or 1.5m. Stuff like this can be very useful for people who build for aestethics.

- - - Updated - - -

Also, was trying to figure out why I can't achieve lift with this system anymore and noticed that my craft's weight in the SPH is 214 tons. Once on the runway, map mode info indicates 1560 tons!

So far I only know of a problem with the stock VAB display, which does not update mass correctly for scaled parts. In my small test mechjeb's VAB display agrees with the stock map view.

- - - Updated - - -

Oh. I put in a patch to test scaling the service bays, it seems to work fine.

Thanks, I added them. Was an oversight when searching for new stock parts.

Link to comment
Share on other sites

Stuff like this can be very useful for people who build for aestethics.

- - - Updated - - -

So far I only know of a problem with the stock VAB display, which does not update mass correctly for scaled parts. In my small test mechjeb's VAB display agrees with the stock map view.

Ah. So possibly my vessel weight /is/ >1500 tons... I could maybe believe it, but I'm really surprised at this point that I can't achieve lift at all. In .90 this thing hovered at 2/3 throttle with four 5m jet engines. Since the 5m's are overheating, I replaced each of them with a bank of 4x 2.5m Jet Engines and throttled to full. Each engine producing 600kN thrust for a total 9600kN thrust. I can't even get ground clearance. I'll test some more and report back.

Link to comment
Share on other sites

Senator, I must recant my previous testimony. I did some simple maths with a calculator and the Engineer's report of ~400 tons is in the ballpark. The map mode info of ~1500 tons is over the wall, past the parking lot, and through the plate glass windows of the church next door. So in the SPH is the close-if-not-correct value. But are you saying that it's just an erroneous data display at map mode? ...because my inability to lift 400-500 tons with 9600kN of thrust is: not anything I'm used to with this build.

- - - Updated - - -

Changing engine scale is not affecting center of thrust in the SPH.

Link to comment
Share on other sites

Senator, I must recant my previous testimony. I did some simple maths with a calculator and the Engineer's report of ~400 tons is in the ballpark. The map mode info of ~1500 tons is over the wall, past the parking lot, and through the plate glass windows of the church next door. So in the SPH is the close-if-not-correct value. But are you saying that it's just an erroneous data display at map mode? ...because my inability to lift 400-500 tons with 9600kN of thrust is: not anything I'm used to with this build.

I understand that you want to get this ship to work, but can you reproduce this with something simpler than a huge ship from an old KSP version with modded parts that was broken and then fixed by hand? At the moment I find it hard enough to judge the behavior of a few basic parts, now that both the part stats and the underlying physics have changed.

EDIT: I was seeing wrong mass in the editor, a wrong map view display would surprise me (because scales/masses do change in the editor but not in mid-flight).

Edited by pellinor
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...