pellinor0 / TweakScale

Forked from Gaius Goodspeed's Goodspeed Aerospace Part & TweakScale plugin
29 stars 23 forks source link

ModuleRCSFX support #53

Closed tsbockman closed 7 years ago

tsbockman commented 7 years ago

Scaling for RCS thrusters is broken because ModuleRCS has been superseded by ModuleRCSFX; their size can be changed, but the thrust stays the same.

The fix seems to be straightforward. Just add a new TWEAKSCALEEXPONENTS block to ScaleExponents.cfg:

TWEAKSCALEEXPONENTS
{
    name = ModuleRCSFX
    maxFuelFlow = 2.5
    thrusterPower = 2.5
    -ignore = ModuleEngineConfigs
}
pellinor0 commented 7 years ago

It seems to work for me. I tested the linear RCS port by checking the fuel consumption on the launch pad. An upscaled port used more monoprop (0.56/s instead of 0.1/s at 200% scale).

Which would make sense because ModuleRCSFX inherits from ModuleRCS, so it still is a class of type ModuleRCS.

What exactly did you test? And are you sure it was the extra exponent that fixed it?

pellinor0 commented 7 years ago

Just found this in the 1.2.1 change log:

Maybe this is related to the bug you see?

tsbockman commented 7 years ago

What exactly did you test?

I noticed the problem initially because the available thrust as reported by RCS Build Aid doesn't change when I rescale RCS ports.

I confirmed it by building a small craft powered only by a Vernor Engine, setting gravity to minimum (1%) in the debug menu, and measuring the lift-off acceleration with and without a 150% rescale of the engine. The acceleration would be much larger if the thrust is scaling up properly, but instead its actually a tiny bit lower because the engine just gets heavier, without getting more powerful.

And are you sure it was the extra exponent that fixed it?

All I have to do to make it work is add the extra TWEAKSCALEEXPONENTS block, restart the game, and test again with the same craft. So yes, that fixed it.

I don't know much of anything about the internals of KSP or TweakScale though, so I'm not claiming this is the best fix - just that it seems to work for me. I got the idea from seeing that that's how the addition of ModuleEnginesFX was handled, though.

Just found this in the 1.2.1 change log:

Thanks for the heads up, but I just retested with KSP 1.2.1 and the problem is still there. (It sure is nice to have the UI in the SPH and VAB stop flickering at me, though!)

pellinor0 commented 7 years ago

No idea what I tested yesterday... today things look just like you describe.

Thanks for the find, added the suggested exponents for the next version.