Jump to content

[WIP] TweakScale - Development Thread


pellinor

Recommended Posts

You need to make your own scale type like in this example:

SCALETYPE

{

name = Scale_IR_Reduced

scaleNames = Tiny, Small, Medium, Large

scaleFactors = 0.250, 0.500, 0.875, 1.250

defaultScale = 1.25

TWEAKSCALEEXPONENTS

{

mass = 2.5

}

}

Edited by Enceos
Link to comment
Share on other sites

I stumbled upon a gamebreaking bug which involves 3 mods: KAS, Regolith and TweakScale.

Output_log.txt

When I take a scaleable part from a container TweakScale starts a log spam. The error is not present if I remove Regolith.dll from the install. Occurs in both this dev and 1.50 versions of Tweakscale.

http://youtu.be/PWN_BI9m498

If I let the error spam to dwell long enough the game crashes.

Aha! I have had this same problem, and am glad you've figured out what the mod combination seems to be that causes the problem! I couldn't figure out why some KAS stuff would give me 100,000+ entries in the log, others wouldn't.

Link to comment
Share on other sites

Aha! I have had this same problem, and am glad you've figured out what the mod combination seems to be that causes the problem! I couldn't figure out why some KAS stuff would give me 100,000+ entries in the log, others wouldn't.

I made a temporary fix today to keep playing with all those mods:

@PART
[*]:HAS[@MODULE[KASModuleGrab],@MODULE[TweakScale]]:FINAL
{
!MODULE[TweakScale] {}
}

Link to comment
Share on other sites

Question, how to setup a part for freescaling?

specificly, could you give an example how to configure a part for free-scaling

Free scaling is a property of the scaletype. My main config change was this (from DefaultScales.cfg)

SCALETYPE
{
name = stack
freeScale = true
minScale = 0.3
maxScale = 10
...
}

ScaleExponents can be set as a global default, per scaletype or for individual parts. In the past I have successfully used module manager patches of the form

@PART[RAPIER]:Final
{
@MODULE[TweakScale]
{
TWEAKSCALEEXPONENTS { mass = 2 }
}
}

- - - Updated - - -

what about mass control? I want to grow the mass of a part by exponent 2.5 (instead of 2 for surface or 3 for stack)

No need for action, as it already does per default. If you look at Defaultscales.cfg and ScaleExponents.cfg, you will see that the scaletypes do not contain any SCALEEXPONENTS entries. I think the name 'surface' comes from surface attachment (as a contrast to stack parts).

I'm a bit surprised by the setting of 2.5, this means that engines scale fine and tanks do not follow the constant mass fraction that is standard in stock. In my memory it was the other way round and engines needed some work. Guess I haven't looked in there for a long time.

Link to comment
Share on other sites

Latest dev version [.ZIP] (Warning: WIP, might contain bees)

auto- and chain scaling are

* off by default

* restricted to parts of the same scaletype

(that means pods/adapters do not autoscale at the moment)

For the moment, I will consider auto- and chain scaling as advanced functions which are consciously turned on by people who know what they are doing. I like the idea for some sort of 'subassembly scaling' that tries to enlarge every scalable part, but that will have to wait until TweakScale is in good shape again.

If you guys don't find any important new bugs, I would say we are pretty close to an official release. Before, I'd like to port the pods and adapters to the stack scaletype, and sort through any old issues that are easy to fix.

Link to comment
Share on other sites

Changes

* Moved all adapters to stack scaletype (Save-breaking!)

* change surface scaletype to free, and change its unit to % (Save-breaking!)

* added an example discrete scaletype for documentation, because there is none left

Save-breaking means it will break vessels and craft files. A save without active crafts should be fine.

Edited by pellinor
Link to comment
Share on other sites

Hi Pellinor, I just gave the latest dev version a try and I found that it has an issue I've run into a few times with Tweakscale

The long intakes don't retain their size between the SPH and Runway

Reminds me of an issue in the github of the old version. This is the IntakeRadialLong part right? That one had two MM patches instead of one. Fixed in the latest github version (haven't checked yet if this resolves your issue).

I stumbled upon a gamebreaking bug which involves 3 mods: KAS, Regolith and TweakScale. When I take a scaleable part from a container TweakScale starts a log spam. The error is not present if I remove Regolith.dll from the install. Occurs in both this dev and 1.50 versions of Tweakscale.

Excellent bug report, stuff like this makes my life a lot easier. Fixed in the latest github version.

Link to comment
Share on other sites

Reminds me of an issue in the github of the old version. This is the IntakeRadialLong part right? That one had two MM patches instead of one. Fixed in the latest github version (haven't checked yet if this resolves your issue).

Excellent bug report, stuff like this makes my life a lot easier. Fixed in the latest github version.

Is that the same one linked in post #32?

because I downloaded that today and built this craft with that version.

If so possibly a mod conflict, as I'm running quite a few, If any more info would be helpful please let me know

Link to comment
Share on other sites

It always links to the last commit. Right now it says '23min ago' (I did that change as a reaction to your post). I promise to use version numbers when things get a bit more stable...

Ah ok, sorry to be a bother but could you post a link?

I tried to search for tweakscale github but could only find Biotronic's earlier version

(I swear Github was designed to be as confusing as possible) :D

Link to comment
Share on other sites

Is the camera bug on revert still present? I don't see it right now. Tested linux_x86 if that makes any difference.

And does anyone have reproduction steps for that "parts are reverting their scale" bug(s)?

What about misplaced attachment nodes on duplicating parts? I also can't reproduce this.

This might be related to the fact that all my test parts are feescaling now, so there is some discrete scaling code that is not used for anything that Tweakscale supports by default. Still there surely are mods out there that define their own discrete scaletypes.

Edited by pellinor
Link to comment
Share on other sites

Is the camera bug on revert still present? I don't see it right now. Tested linux_x86 if that makes any difference.

And does anyone have reproduction steps for that "parts are reverting their scale" bug(s)?

What about misplaced attachment nodes on duplicating parts? I also can't reproduce this.

This might be related to the fact that all my test parts are feescaling now, so there is some discrete scaling code that is not used for anything that Tweakscale supports by default. Still there surely are mods out there that define their own discrete scaletypes.

I haven't come across the camera bug at all, I don't envy you trying to track down these bugs as it seems that bugs affect some people and not others, or they require a very specific set of circumstances or procedures.

I'll do some testing over the next few hours and try and find anything not doing what it's supposed to.

Link to comment
Share on other sites

Is the camera bug on revert still present? I don't see it right now. Tested linux_x86 if that makes any difference.

Yeah, it's still present. Mainly because it's more likely due to bad coding in KSP than Tweakscale itself so you'll have to code a workaround if you want to fix it.

Follow this video where I trigger the bug on a clean install (save for old TweakScale and ModuleManager).

I say old TweakScale, but I just tried it in 0.90 with the version linked in the last page, the latest dev, and it's still present.

Link to comment
Share on other sites

I've just tried and I can't replicate the bug.

changed camera, all camera's behaving as normal

revert to launch and change camera again, all camera's still behaving as normal

But I have just noticed that It's constantly spamming the log with Null References

I don't know what the heck's going on

Ok seems the Null Reference exceptions are coming from KerbQuake

maybe there's something in this log that could help

https://www.dropbox.com/s/3hidw8po0r0i9ea/KSP.log?dl=0

Link to comment
Share on other sites

maybe there's something in this log that could help

https://www.dropbox.com/s/3hidw8po0r0i9ea/KSP.log?dl=0

No, because that's the KSP log, not the output log. As for replicating, did you attempt on a clean install with nothing but TweakScale and ModuleManager? If you want, I can upload a video that shows the camera revert bug is still present in the most up to date versions of everything, but if you could update everything and follow the instructions clearly (and read the links I posted), that would be awesome as well.

Link to comment
Share on other sites

No, because that's the KSP log, not the output log. As for replicating, did you attempt on a clean install with nothing but TweakScale and ModuleManager? If you want, I can upload a video that shows the camera revert bug is still present in the most up to date versions of everything, but if you could update everything and follow the instructions clearly (and read the links I posted), that would be awesome as well.

I don't have an output log as far as I can see, isn't that only generated on a crash?

No need to get all defensive, I'm not doubting that you have this bug and I certainly followed your procedure to the letter,

I have many mods installed perhaps one of them fixes it and as far as I can tell everything is up to date, the latest version of Module Manager (2.5.10) and the latest dev build of tweakscale posted above.

Edited by MartGonzo
Link to comment
Share on other sites

Ah, there it is, thank you. Now I also see parts reverting size so that there are spaces in between. Maybe I forgot to actualy scale something last time?

I found a total of 6 NullReferenceExceptions from TweakScale, from within the editor scene. Will look into those. Other than that there seems a lot going on mainly attached to 'KerbQuake' and 'clouds'.

Yes looks like KerbQuake will have to go, shame, I love flying IVA ;.;

Thanks for taking a look

Link to comment
Share on other sites

I don't have an output log as far as I can see, isn't that only generated on a crash?

It's in KSP_Data and is generated and updated every time KSP is run, whether or not it results in a crash - see the bug reporting guidelines for locations if you're not on Windows. I wasn't being defensive, apologies if it sounded as such, but the links I posted show that it's due to a difference in the order the universal scale is set when you launch from the editors vs reverting to launch. Unless KSP has been changed since that bug became apparent, then it's very much present.

Ah, there it is, thank you. Now I also see parts reverting size so that there are spaces in between. Maybe I forgot to actualy scale something last time?

To the best of my knowledge, and having a read through when Biotronic took a stab at this bug, it's pretty much unavoidable due to the order in which KSP loads the universe and its scale upon reload. Have a read through that support thread I linked for more info, it looks like a nasty bug to squash.

Link to comment
Share on other sites

It's in KSP_Data and is generated and updated every time KSP is run, whether or not it results in a crash - see the bug reporting guidelines for locations if you're not on Windows. I wasn't being defensive, apologies if it sounded as such, but the links I posted show that it's due to a difference in the order the universal scale is set when you launch from the editors vs reverting to launch. Unless KSP has been changed since that bug became apparent, then it's very much present.

To the best of my knowledge, and having a read through when Biotronic took a stab at this bug, it's pretty much unavoidable due to the order in which KSP loads the universe and its scale upon reload. Have a read through that support thread I linked for more info, it looks like a nasty bug to squash.

ok, thanks, here's the log in case it's any use to anyone

https://www.dropbox.com/s/d2bl989rv5ve91l/output_log.txt?dl=0

I tried earlier with a fully built rocket, some parts tweakscaled, I'll try again with various different parts

But I'm not lying, the camera behaved the same for me both before and after the revert to launch.

I suppose I could build a new copy with just tweakscale to try

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