Jump to content

[KSP >= 1.3.0] TweakScale - Under Lisias' Management - 2.4.8.8 - 2024-1117


Lisias

Recommended Posts

23 hours ago, Red Stapler said:

Updated TS last night and all good (so far)! :)

Also @Lisias, I created a config for Near Future Aeronautics last night (latest v1.04), here it is in case you want to add in future like you did for Stock Alike Station Parts...

Thanks! I will test them too, as time allows! (atypically busy week, thanks God not all of my weeks is like this :) )

https://github.com/net-lisias-ksp/TweakScale/issues/32

Link to comment
Share on other sites

51 minutes ago, Barzon Kerman said:

can you add tweakscale for ReStock/ReStock+ @Lisias? :) 

Since its basically the new stock.

ReStock will not be needed, as it doesn't add new parts. RsStock+ on the other hand, has them - but something gone wrong when I tried it (not sure what, it can be even unrelated to TweakScale), so it's on the Queue waiting to be worked out. But since you are the first to ask it, you can follow the works here. :) 

To tell you the true, I'm waiting 1.7 to add the new parts and test the existent ones, so I kind of dragged my feet on TweakScale this week. ;)

Everything will be tested again, just to be sure I made that fail-safes right this time.

Spoiler

(and I found a stupid mistake I did on the patches, and I'm somewhat ashamed by had committed that. :D )

 

Link to comment
Share on other sites

Hello, I just wanted to ask if this mod is compatibile with KSP 1.6. I got a little confused and can't find the answer. The mod is not working for me and it might be because I am an antitalent with mods, but I am not sure yet :D thanks for any help

Link to comment
Share on other sites

12 hours ago, Gody_ said:

Hello, I just wanted to ask if this mod is compatibile with KSP 1.6. I got a little confused and can't find the answer. The mod is not working for me and it might be because I am an antitalent with mods, but I am not sure yet :D thanks for any help

Yes, the latest it's compatible with 1.6.1 with some reserves (some parts are not supported yet due some new features).

Publish your KSP.log on some snippet service, so I can give a look on it. It's always possible that you ended up finding a new Unholy Interaction between Add'ons. :)

Link to comment
Share on other sites

News from the Front.

I found another source of Kraken Food on my "production KSP". Unfortunately, the parts being affected are Stock ones, so I need to address this. At least is deterministic, by reverting the patches to the last public release things works; by applying back the new patches some parts borks again. It will be a boring but easy (long) debug session - deleting Add'Ons one by one until the problem goes away. :P 

Boring weekend ahead.

55228666-75687f80-51f9-11e9-8246-e37c25e

(re)opened issue: https://github.com/net-lisias-ksp/TweakScale/issues/21

— — — — POST EDIT — — — — 

After some time playing KSP instead of just testing and fixing things :) I came back to this.

What's happened is essentially what I had talked about previously: TweakScale needs your help in order to proper help you.

The Add'On author choose to add TweakScale support on his parts in a terribly broad way:

@PART[*Cone*]:FOR[RetroFuture]:NEEDS[TweakScale]
 {
     MODULE
     {
        name = TweakScale
                type = free
     }
 }

This stunt essentially shoves Free Scaling in every part on the GameDatabase that has "Cone" in the name!This not only mangles the prefab, but also corrupts craft files and savegames, as they are "tainted" by this misconfiguration  Once you delete the Add'On and Module Manager rebuilds the cache (and the GameDatabase), all your TweakScaled parts gets rescaled terribly wrong!

So, when you load your craft and savegames after installing such Add'On, a lot of parts are wrong (There're more patches like this! The thing is way "greedy" on this). So you "fix" them, and now your parts are incompatible with everybody that doesn't have that Add'On too. And when you uninstall the thing, your crafts and savegames became "corrupted", as the original "type" is back to be effective and Kraken knows what would happen - one of my crafts got the Cones so big that the craft ended up inside an 'egg" - unflyable. And this includes the savegames. Yeah, I need to fix them all on my installment due this. :/ 

It worth to mention that this same stunt when applied on a non visual feature (as resource consumption and mass!) would summon the Sacred Rage of the Krakens on your KSP. This has potential to be very nasty if you don't use the latest TweakScale hat withdraw itself from such parts!

I opened a new issue to address this problem. I expect this to happen again, unfortunately.

https://github.com/net-lisias-ksp/TweakScale/issues/34

Edited by Lisias
Post edit
Link to comment
Share on other sites

I'm working on a new wing part (actually an old one), and I'd like to see the values that TS gives for the 4 different scalings the mod provides. 

The Scaletype for this is:

SCALETYPE
{
    name = GilB9Shuttlewings
    freeScale = false
    scaleFactors = 0.5, 0.75, 1.0, 1.25, 1.5
    scaleNames = Micro, Small, Medium, Large, Giant
    defaultScale = 1
}

The values I'm most interested in are:

  • mass
  • deflectionLiftCoeff
  • dragAtMaxAoA

What I want to do is to have a MM script which will create the various sizes of wing if Tweakscale isn't installed, so really, whatever TS changes is what I need.

Thanks in advance

Link to comment
Share on other sites

4 hours ago, linuxgurugamer said:

What I want to do is to have a MM script which will create the various sizes of wing if Tweakscale isn't installed, so really, whatever TS changes is what I need.

Not sure if I understand. But let me try a shot on it:

How about a ModulePartVariant? If you have TS installed, you apply the patch that supports it. If you don't, you apply a patch with ModulePartVariant that adds the feature by "brute force".

Link to comment
Share on other sites

49 minutes ago, Lisias said:

Not sure if I understand. But let me try a shot on it:

How about a ModulePartVariant? If you have TS installed, you apply the patch that supports it. If you don't, you apply a patch with ModulePartVariant that adds the feature by "brute force".

What I"m looking for is to know the values that TS produces, so that when I make the variants I can put in the correct information.  

Link to comment
Share on other sites

2 hours ago, linuxgurugamer said:

What I"m looking for is to know the values that TS produces, so that when I make the variants I can put in the correct information.  

There's a "documentation.txt" file explaining the TS guts. You will find what you need there.

Essentially, you get the current value and multiply it by the Scale to the power of the ScaleType (linear ==1, quadratic = 2, cubic = 3, etc)

— — — Post edit — — — 

TweakScale is a very simple Add'On, in essence. 90% of the code is UI and Krakens Prevention Algorithms. :D 

Edited by Lisias
Post edit
Link to comment
Share on other sites

8 hours ago, linuxgurugamer said:

The values I'm most interested in are:

  • mass
  • deflectionLiftCoeff
  • dragAtMaxAoA

These are the exponents for the stock wing modules:
https://github.com/net-lisias-ksp/TweakScale/blob/master/GameData/TweakScale/ScaleExponents.cfg#L169-L186

Mass of wings is scaled with an exponent of 2, so that a large wing should be equivalent to the same area worth of small wings. dragAtMaxAoA does not appear (hopefully that means that it is a coefficient and not a total value).

Link to comment
Share on other sites

Now that we are here (and now that April 1st is over), I want to get the audience attention to this issue, planned to be tackled down this week:

https://github.com/net-lisias-ksp/TweakScale/issues/34

Recently, I discovered an third party Add'On with a somewhat nasty broad patches for TweakScale. It was so broad that its own patches were being applying twice in some Stock Parts, and these parts are getting three patches piled up (mine, and then a double from the Add'On patch). :) 

(problem was addressed, and a pull request applied to the - hopefully - new maintainer)

But the damage was substantial - since the prefab became , as usual, "corrupted", all crafts were being saved with the bad module. Not to mention the living ones on the savegame. And since the problem happens on a very used Stock part, of course, most of my crafts were affected. I still fixing the damages manually, as this is something that gone undetected for some time.

Bluntly withdrawing support for these corrupted parts are tempting, as this is already implemented. But now is something that would do some really vast damages - this is not Stock parts that never worked correctly before, we are talking about perfectly fine parts that suddenly became corrupted by a rogue patch. This time I would be promoting really wide breakage - the damage to my savegames were substantial (besides not exactly catastrophic - it's a pain in the SAS fixing it, but that's all), now multiply that for the active forum users and…. :0.0:

My current approach is to show a POP-UP explaining the problem on Space Center, and then closing the game to prevent damages. It's the safer approach, but also the one that would also give me a lot of backslash. It's not some few parts anymore, it's some very widely thrusted and used parts that are being tainted, and so the surface of attack is huge.

Any considerations about this issue would be hugely appreciated.

Link to comment
Share on other sites

6 hours ago, Lisias said:

There's a "documentation.txt" file explaining the TS guts. You will find what you need there.

Essentially, you get the current value and multiply it by the Scale to the power of the ScaleType (linear ==1, quadratic = 2, cubic = 3, etc)

— — — Post edit — — — 

TweakScale is a very simple Add'On, in essence. 90% of the code is UI and Krakens Prevention Algorithms. :D 

Ok, thanks to you and @pellinor for the help.

One final question, the documentation talks about attachnode breaking force, but I can't find any real reference to that.  Where would I get it from?

Link to comment
Share on other sites

8 hours ago, linuxgurugamer said:

One final question, the documentation talks about attachnode breaking force, but I can't find any real reference to that.  Where would I get it from?

Not sure if I understood. Are you talking about a reference on TweakScale source code about breakingTorque and breakingForce? (links for my own reference in the future)

If yes, you will find none. TS follows a very clever architecture: simple algorithms, complex data-structures. The beauty of the thing is that you "teach" TS to escale things using CFG files (see the TWEAKSCALEEXPOENTS on the default CFG files), not by writing code.

I can't tell exactly why things were done the way they were done prior to my administration :P but when crosschecking things due the issues I'm fixing, I'm pretty sure that hard references to some part data are things where "manual intervention" were needed to prevent catastrophic failures due misbehaving patches or new features on KSP that didn't existed when this mechanism were initially implemented. I'm pretty sure that the TWEAKSCALEEXPOENTS can be expanded to support sanity check rules (one of the reasons I want that TweakScale3 thingy done) and even PREFAB recalculation, and so some code would plain vanish from the codetree, as they would be handled in the same clever way as the scaling.

But, right now, I still fighting bugs and fixing their misbehaviours - you need to patch the hull and bring the ship safely to the harbour before doing anything else. Sunk ships don't need maintenance.

 

Edited by Lisias
tyops! Who would thought of that? :P .
Link to comment
Share on other sites

4 minutes ago, linuxgurugamer said:

I'm looking for the default values, if none are there.  

I didn't dug so deep on KSP (yet), but it's my current understanding that the CFG files are a kind of "prefab building tool" and, so, they are the default values that end up on the prefab. (take this information with a huge grain of salt)

Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

Is it possible to have TweakScale only scale in one direction?  ie:  have a wing and stretch it front to back (to make it wider), but keep the length the same?

Wouldn't be easier to accomplish same result with B9Partswitch or Firespitter plugin to change part mesh to one of specific size ? You could even choose better texture for such part that is extended only on one axis, instead of messing with tweakscale. Depending on texture for that part, but not all textures would look good if stretched only to one direction.

Link to comment
Share on other sites

26 minutes ago, kcs123 said:

Wouldn't be easier to accomplish same result with B9Partswitch or Firespitter plugin to change part mesh to one of specific size ? You could even choose better texture for such part that is extended only on one axis, instead of messing with tweakscale. Depending on texture for that part, but not all textures would look good if stretched only to one direction.

I'm trying to not have too many variants of a part.  I would prefer if TS could stretch in a single direction as well as all three directions.

I may just make 3 base parts of each part, stretching them as required (I want a 2x and 3x original length)

As it is, I'm including configs for installs without TweakScale, and that is a major PITA.  The five initial parts balloon into 35

Edited by linuxgurugamer
Link to comment
Share on other sites

9 hours ago, linuxgurugamer said:

Is it possible to have TweakScale only scale in one direction?  ie:  have a wing and stretch it front to back (to make it wider), but keep the length the same?

Something as Anisotropic Part Resizer?

It's kinda a feasibility study right now, but low priority. It would need changes on already stablished interfaces and I'm unsure the way I should go.

And I have some pressuring things to fix first.

 

Link to comment
Share on other sites

You know that little light at the end of the tunnel? Sometimes, it's really the end of the tunnel, and not something "peeweeeing" into you. :)

On KSP 1.7.0 + MH, there was no carnage on the Withdrawal Fest 

Spoiler

[LOG 01:15:47.296] TweakScale::WriteDryCost: Started
[LOG 01:15:47.297] [ModuleManager] INFO: Total loading Time = 187.854s
[LOG 01:15:49.536] [ScenarioTypes]: List Created 19 scenario types loaded from 8 loaded assemblies.
[WRN 01:15:49.568] File '/Users/lisias/Workspaces/KSP/runtime/1.7.0/KSP.app/Contents/../../Missions/MissionScoreInfo.cfg' does not exist
[LOG 01:15:49.573] [ApplicationLauncher] Awake False
[LOG 01:15:49.576] [ApplicationLauncher] SpawnSimpleLayout: VerticalTopDown
[LOG 01:15:49.598] [UiApp] Awake: MessageSystem
[LOG 01:15:49.599] [ApplicationLauncher] OnSceneLoadedGUIReady: scene MAINMENU ShouldBeVisible() True ShouldBeOnTop() True iIsPositionedAtTop True
[WRN 01:15:49.609] [TweakScale] Removing TweakScale support for EnginePlate1p5.
[ERR 01:15:49.609] [TweakScale] Part EnginePlate1p5 didn't passed the sanity check due having a ModulePartVariants with Mass - see issue #13 https://github.com/net-lisias-ksp/TweakScale/issues/13.

[WRN 01:15:49.609] [TweakScale] Removing TweakScale support for EnginePlate2.
[ERR 01:15:49.610] [TweakScale] Part EnginePlate2 didn't passed the sanity check due having a ModulePartVariants with Mass - see issue #13 https://github.com/net-lisias-ksp/TweakScale/issues/13.

[WRN 01:15:49.610] [TweakScale] Removing TweakScale support for EnginePlate3.
[ERR 01:15:49.610] [TweakScale] Part EnginePlate3 didn't passed the sanity check due having a ModulePartVariants with Mass - see issue #13 https://github.com/net-lisias-ksp/TweakScale/issues/13.

[WRN 01:15:49.610] [TweakScale] Removing TweakScale support for EnginePlate4.
[ERR 01:15:49.610] [TweakScale] Part EnginePlate4 didn't passed the sanity check due having a ModulePartVariants with Mass - see issue #13 https://github.com/net-lisias-ksp/TweakScale/issues/13.

[WRN 01:15:49.611] [TweakScale] Removing TweakScale support for Tube1.
[ERR 01:15:49.611] [TweakScale] Part Tube1 didn't passed the sanity check due having a ModulePartVariants with Mass - see issue #13 https://github.com/net-lisias-ksp/TweakScale/issues/13.

[WRN 01:15:49.611] [TweakScale] Removing TweakScale support for Tube1p5.
[ERR 01:15:49.611] [TweakScale] Part Tube1p5 didn't passed the sanity check due having a ModulePartVariants with Cost - see issue #13 https://github.com/net-lisias-ksp/TweakScale/issues/13.

[WRN 01:15:49.611] [TweakScale] Removing TweakScale support for Tube2.
[ERR 01:15:49.611] [TweakScale] Part Tube2 didn't passed the sanity check due having a ModulePartVariants with Mass - see issue #13 https://github.com/net-lisias-ksp/TweakScale/issues/13.

[WRN 01:15:49.611] [TweakScale] Removing TweakScale support for Tube3.
[ERR 01:15:49.612] [TweakScale] Part Tube3 didn't passed the sanity check due having a ModulePartVariants with Mass - see issue #13 https://github.com/net-lisias-ksp/TweakScale/issues/13.

[WRN 01:15:49.612] [TweakScale] Removing TweakScale support for Tube4.
[ERR 01:15:49.612] [TweakScale] Part Tube4 didn't passed the sanity check due having a ModulePartVariants with Mass - see issue #13 https://github.com/net-lisias-ksp/TweakScale/issues/13.

[LOG 01:15:49.612] TweakScale::WriteDryCost: Concluded

 

The transition to 1.7.0 will be smoother than I was afraid.

I'll carry on the current issues scheduled for the next release, spend some time TweakScaling on 1.7 (just to play safe) and the next release should be issued on the Week End. :)

— — — POST EDIT — — — 

Added a 1.7 + MH test craft on KerbalX using TweakScale. :)

https://kerbalx.com/Lisias/Velociteze-TS-Mk1

yuQZSYw.jpg

 

The new milestone will be 2.4.2.0 , you can check how things are going on:
https://github.com/net-lisias-ksp/TweakScale/milestone/3

Edited by Lisias
added sample aircraft + issue for KSP 1.7
Link to comment
Share on other sites

Hey @Lisias

I was wonder what priority this bug was. I ask because 1 of the 2 the reasons I use tweakscale is aesthetics, so this bug is a major issue for me. I understand my priorities aren't yours so I was wondering if you knew when you might start working on it. Thanks!

Link to comment
Share on other sites

1 hour ago, Svm420 said:

Hey @Lisias

I was wonder what priority this bug was. [cut by me]. Thanks!

After tacking down the planned issues for next release ("Room for Scaling" :P), I will repriorise the remaining issues.

That Big Refactoring I want can wait a bit, as it appears, so it will worth to give the current codebase some love now (it will be migrated to the new later anyway).

The Anisotropic scaling (suggested by @linuxgurugamer some posts behind), on the other hand, appears to demand some internal changes that apparently will be handled easier on the new architecture. This will confine inevitable bugs to specific "blocks" of code too, so it will be safer too. :) (there's a saying here, "Gato escaldado tem medo de água fria" - "scalded cat fears cold water"). I'm planning to be very careful on adding new scaling code. ;)

Link to comment
Share on other sites

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...