pellinor

[1.4.x] TweakScale v2.3.12(Apr-16)

Recommended Posts

Oh I overlooked the mention of 1.0.4. On an old KSP version the best advice I can give is to freeze your install to some working configuration and be very careful with updating anything. For TweakScale and MFT, a workaround can be to make sure not to have MFT and TweakScale modules on the same part. Or just don't scale that booster.

Share this post


Link to post
Share on other sites
7 minutes ago, Frozen_Heart said:

Just wondering, does tweakscale do 1.875m size?

Yes, it does increments of 0.125m by default (IIRC), but you can use the slider to fine tune it a lot more precisely.

Edited by Gaarst

Share this post


Link to post
Share on other sites
2 minutes ago, Frozen_Heart said:

Just wondering, does tweakscale do 1.875m size?

Yep.  :)  With the current version, anything with a scale type of "stack" will change the scale in increments of .025 meters at a time, but you have to use the slider bar to do that.  If you use the arrows to either side of the slider bar, it will change sizes from "1.25m" to "2.5m", "3.75m", etc.  I really like that the ability to fine tune the size was added to the slider bar, because sometimes one modder's '2.5 meter' diameter part doesn't quite match some other '2.5 meter' parts that I have in my inventory.  :)

Share this post


Link to post
Share on other sites

Hi.

Is there an updated tutorial on how to add tweakscale support to part mods? The guide on the old thread is completely messed up.

Share this post


Link to post
Share on other sites
1 hour ago, MatterBeam said:

Hi.

Is there an updated tutorial on how to add tweakscale support to part mods? The guide on the old thread is completely messed up.

Currently not, I haven't cleaned things up yet after the forum update. Can I help on anything specific?

Share this post


Link to post
Share on other sites
5 minutes ago, pellinor said:

Currently not, I haven't cleaned things up yet after the forum update. Can I help on anything specific?

I have a set of reactors that I want to scale output to mass. Pretty standard stuff: 1.25m, 2.5m, 3.75m+ with a tweakscalefactor of 3.

(That's as far as I understood from the current tutorial.)

Share this post


Link to post
Share on other sites

Ok so first you need a part patch to define the sizes, just copy from something similar in the TweakScale/patches folder. This one means "use the default behavior for stack parts, and the size of the unscaled part should be labeled as '2.5m'." (adjust the part name and defaultScale to your parts).

@PART[batteryBankLarge] // Z-4K Rechargeable Battery Bank
{
    %MODULE[TweakScale]
    {
        type = stack
        defaultScale = 2.5
    }
}

Then you need to ask if any values or partModules need special treatment. Mass already scales with size^3 per default, as does the output of the stock generator and converter modules. All the details are in TweakScale/ScaleExponents.cfg. So unless you have some exotic module there is probably nothing more to do.

Share this post


Link to post
Share on other sites
18 minutes ago, pellinor said:

Ok so first you need a part patch to define the sizes, just copy from something similar in the TweakScale/patches folder. This one means "use the default behavior for stack parts, and the size of the unscaled part should be labeled as '2.5m'." (adjust the part name and defaultScale to your parts).


@PART[batteryBankLarge] // Z-4K Rechargeable Battery Bank
{
    %MODULE[TweakScale]
    {
        type = stack
        defaultScale = 2.5
    }
}

Then you need to ask if any values or partModules need special treatment. Mass already scales with size^3 per default, as does the output of the stock generator and converter modules. All the details are in TweakScale/ScaleExponents.cfg. So unless you have some exotic module there is probably nothing more to do.

So this part of Tweakscale:

TWEAKSCALEEXPONENTS
{
    name = ModuleGenerator   
    outputList
    {
       rate = 3
    }
}

will affect the output here?:

MODULE
{
	name = ModuleResourceConverter
	ConverterName = Reactor
	StartActionName = Start Reactor
	StopActionName = Stop Reactor
	INPUT_RESOURCE
	{
		ResourceName = ElectricCharge
		Ratio = 0.1
	}
	OUTPUT_RESOURCE
	{
		ResourceName = MWt
		Ratio = 765		
	}
}

 

Share this post


Link to post
Share on other sites

This one should (further down in ScaleExponents.cfg):

TWEAKSCALEEXPONENTS
{
    name = ModuleResourceConverter
    EfficiencyBonus = 3
}

Share this post


Link to post
Share on other sites
Just now, pellinor said:

This one should (further down in ScaleExponents.cfg):


TWEAKSCALEEXPONENTS
{
    name = ModuleResourceConverter
    EfficiencyBonus = 3
}

Thank you!

Share this post


Link to post
Share on other sites
11 hours ago, pellinor said:

Currently not, I haven't cleaned things up yet after the forum update. Can I help on anything specific?

I got there in the end, as you know, but a clear description of how one varies the mass-dimension ratio for a part would be a welcome addition to the documentation.

Share this post


Link to post
Share on other sites
On 2/9/2016 at 0:16 AM, pellinor said:

This one should (further down in ScaleExponents.cfg):


TWEAKSCALEEXPONENTS
{
    name = ModuleResourceConverter
    EfficiencyBonus = 3
}

I'm sorry, but looking through my .cfg files, I find nothing in the ModuleResourceConverter that lists 'efficiency' for an 'EfficiencyBonus' of ^3 to be applied to. I only have an output resource list and a complicated thermal efficiency curve...

Share this post


Link to post
Share on other sites
15 hours ago, MatterBeam said:

I'm sorry, but looking through my .cfg files, I find nothing in the ModuleResourceConverter that lists 'efficiency' for an 'EfficiencyBonus' of ^3 to be applied to. I only have an output resource list and a complicated thermal efficiency curve...

TweakScale does not touch config nodes but kspFields inside partModules. So the names refer to variables of a certain type in the C# source code. The names of those two things are usually identical if the config value simply fills an internal variable that is used at runtime. However there are modules which do fancy things with their config data and stores the results in a different form. Then I need to look for some kspField that I can manipulate in editor/flight to get the desired behavior.

Furthermore, if a value does not appear in a specific cfg then the internal variable can still exist. The line in the cfg file basically means "if a variable of that name exists, initialize it with this value instead of the default".

Share this post


Link to post
Share on other sites

I haven't given much attention to KSP and TweakScale for a long time, planning to clean things up when 1.1 drops (or is near).

21 minutes ago, The L3mur said:

Do you think you could change the main download link to spacedock? I really want to download this mod but the download doesn't exist anymore.

Done, looks like I forgot that when putting it in Spacedock.

 

Share this post


Link to post
Share on other sites

I recently updated to version 2.2.6.0, and I can no longer scale any parts. The slider is completely missing from the right click menu on every part, even stock parts. Are there any known mod conflicts which cause this? Am I the only one experiencing this rather disappointing bug? I will gladly provide a log file if this is a new one.

Share this post


Link to post
Share on other sites

Sounds like a broken install. Maybe this helps (I really need to find some time for documentation):

On 15.1.2016 at 6:36 PM, pellinor said:

This can be caused by several things, the most common are

* There are no TweakScale modules (missing modulemanager.dll)
To check if your part has a TweakScale module you can save a craft and search for "name = TweakScale" in the craft file.

* other mods that forbid scaling certain parts on purpose

* Exceptions, no matter if they come from TweakScale or somewhere else (search for "exception" in your log).

Share this post


Link to post
Share on other sites

Heyup , just got the latest Version of Tweakscale 2.2.6 , read through the information an noticed there are lots an lots of config files for all the various mods in a one folder . Question are these simply drag an drop ? I'm using OPT parts for a plane and hoping that I can rescale the Winglet Evelons . currently I can't :mellow:

Share this post


Link to post
Share on other sites

My Tweakscale didnt work on engines when I have RF installed, is this normal?

Share this post


Link to post
Share on other sites

I also have no tweakscale control on any part using the stable release. This is with a completely fresh (non steam) KSP 1.05 install, no other mods loaded. The log contains what appears to be the relevant exception (included below).

The dev WIP version works.

 

[LOG 02:55:36.270] PhysicsGlobals: Loading database
[WRN 02:55:36.528] Cannot create config from file 'C:\Users\allmhuran\KSP105\KSP_win\GameData\TweakScale\Examples.cfg'.
[LOG 02:55:36.563] Load(Assembly): /ModuleManager.2.6.13
[LOG 02:55:36.564] AssemblyLoader: Loading assembly at C:\Users\allmhuran\KSP105\KSP_win\GameData\ModuleManager.2.6.13.dll
[LOG 02:55:36.585] AssemblyLoader: KSPAssembly 'ModuleManager' V2.5
[LOG 02:55:36.586] Load(Assembly): TweakScale/plugins/KSPAPIExtensions
[LOG 02:55:36.586] AssemblyLoader: Loading assembly at C:\Users\allmhuran\KSP105\KSP_win\GameData\TweakScale\plugins\KSPAPIExtensions.dll
[LOG 02:55:36.588] AssemblyLoader: KSPAssembly 'KSPAPIExtensions' V1.7
[LOG 02:55:36.588] Load(Assembly): TweakScale/plugins/Scale_Editor
[LOG 02:55:36.589] AssemblyLoader: Loading assembly at C:\Users\allmhuran\KSP105\KSP_win\GameData\TweakScale\plugins\Scale_Editor.dll
[LOG 02:55:36.590] Load(Assembly): TweakScale/plugins/Scale_Redist
[LOG 02:55:36.591] AssemblyLoader: Loading assembly at C:\Users\allmhuran\KSP105\KSP_win\GameData\TweakScale\plugins\Scale_Redist.dll
[LOG 02:55:36.593] AssemblyLoader: Loading assemblies
[ERR 02:55:36.780] AssemblyLoader: Exception loading 'Scale_Editor': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 

Additional information about this exception:

 System.TypeLoadException: Could not load type 'TweakScale.TweakScaleEditor' from assembly 'Scale_Editor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Edited by allmhuran

Share this post


Link to post
Share on other sites

Is it possible to disallow scaling parts above their default scale, so that parts could be made smaller, but not larger? I'm asking because in career this mod is basically cheating, allowing you to build huge rockets before you get to them in the research tree. Yet it is now required by some mods I'd like to use, i.e. KSP interstellar? I've seen a similar questions asked a couple of times, but I wasn't able to find an answer.

Share this post


Link to post
Share on other sites
On 26.2.2016 at 9:00 AM, Puggonaut said:

Heyup , just got the latest Version of Tweakscale 2.2.6 , read through the information an noticed there are lots an lots of config files for all the various mods in a one folder . Question are these simply drag an drop ? I'm using OPT parts for a plane and hoping that I can rescale the Winglet Evelons . currently I can't :mellow:

The OPT config is probably incomplete because I expected that the current 'test release' would be followed by another release. I'll update it in time for 1.1.

On 28.2.2016 at 10:22 AM, mark7 said:

My Tweakscale didnt work on engines when I have RF installed, is this normal?

Sounds likely, some of the realism mods heavily manipulate the TweakScale configs. I think there was also a conflict between the RealEngines and TweakScale modules.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.