Jump to content

[WIP] TweakScale - Development Thread


pellinor

Recommended Posts

In general, just look into the configs and copy from there (DefaultScale.cfg in this case). One thing I'll probably change is add :FOR(TWEAKSCALE) to the part patches, so they run at a defined time and other mods can use the :BEFORE and :AFTER times to modify them. Can't say much about exponents since I haven't really looked into that part of the code yet.

Link to comment
Share on other sites

In general, just look into the configs and copy from there (DefaultScale.cfg in this case). One thing I'll probably change is add :FOR(TWEAKSCALE) to the part patches, so they run at a defined time and other mods can use the :BEFORE and :AFTER times to modify them. Can't say much about exponents since I haven't really looked into that part of the code yet.

Thanks for the reply. I think TweakScale has had a tech limiter for career players before. Size limiting by Techs researched is implemented in many mods which can resize their parts, like Hangars and Procedural Parts. If you will ever try to implement this limiting, look at the PP configs, they have all the right numbers and Tech milestones written there.

Its just doesn't feel right when I can use only 3m tanks from PP while TweakScale gives me everything up to 10m and more than 3000kN thrust even before I researched the mainsail.

Edited by Enceos
Link to comment
Share on other sites

Thanks for the reply. I think TweakScale has had a tech limiter for career players before. Size limiting by Techs researched is implemented in many mods which can resize their parts, like Hangars and Procedural Parts. If you will ever try to implement this limiting, look at the PP configs, they have all the right numbers and Tech milestones written there.

Still exists: you can define a techRequired list (either globally in the scaletype or per part) that will filter out scaleFactors that have not yet been researched. A byproduct of the last version is that this now also applies to free scaletypes. This is an example I found in the OP of the old TweakScale thread:

MODULE
{
name = TweakScale
type = stack
techRequired = basicRocketry, start, generalRocketry, advRocketry, heavyRocketry
}

Link to comment
Share on other sites

Still exists: you can define a techRequired list (either globally in the scaletype or per part) that will filter out scaleFactors that have not yet been researched. A byproduct of the last version is that this now also applies to free scaletypes. This is an example I found in the OP of the old TweakScale thread:

MODULE
{
name = TweakScale
type = stack
techRequired = basicRocketry, start, generalRocketry, advRocketry, heavyRocketry
}

I see, so we gotta define restrictions for each part where we apply TweakScale...

Link to comment
Share on other sites

I see, so we gotta define restrictions for each part where we apply TweakScale...

No, just like everything else you can define a standard in the saletype. Then you only need to patch parts that should differ from that standard.

Link to comment
Share on other sites

Hello,

I hadn't had internet connection due to some Line break at the ISP. Therefore I was unable to download the new version yet. (I doing it now)

I (think I) understand your point and did not mean any harm. If something is in progress a lots of updates (has to/good to ) have.

The only thing I was pointing out, that your AVC works 50% It is notifies us (this is a good thing)

And it has a minor flaw.

This is not a vital option. But if you working on it still, there is an issue you could/should check too.

I just liked to point it out. And really didn't want to make any harm.

If I could I would help you further, but I am not know the workflow of the AVC, nor the c#/c++ programming.

Maybe this picture should help you.

nodownload.png

I did not had or just wasn't avare of that partcost bug. So for that I cannot give you nor negative, nor positiv feedback.

Link to comment
Share on other sites

I have another problem/question. How do I make it work with Modular Fuel Tanks mod? Previously scaled tanks had their available volume also scaled. Now only surface scales, volumes stay constant.

P.S. What are these warnings? My game throws them when I scale certain pats:


[TweakScale Warning] No valid member found for cost in Part


TweakScale.Tools:LogWf(String, Object[])
TweakScale.MemberUpdater:Create(Object, String)
TweakScale.ScaleExponents:UpdateFields(Object, Object, ScalingFactor, Part)
TweakScale.ScaleExponents:UpdateObject(Part, Part, Dictionary`2, ScalingFactor)
TweakScale.TSGenericUpdater:OnRescale(ScalingFactor)
TweakScale.TweakScale:OnTweakScaleChanged()
TweakScale.TweakScale:Update()

EDIT: Made an exponent which enabled the volume scaling of Modular Fuel Tanks:


TWEAKSCALEEXPONENTS
{
name = ModuleFuelTanks

volume = 3
fuelList
{
amount = 3
maxAmount = 3
}
}

Pellinor, please add it to default exponents. Don't know if I missed any other values, I clone it from RealFuels and deleted the lines I don't know.

Edited by Enceos
Modular Fuel Tanks
Link to comment
Share on other sites

please add it to default exponents. Don't know if I missed any other values, I clone it from RealFuels and deleted the lines I don't know.

That's fine for private configs but I hesitate to pull it into TweakScale because I have no experience with MFT. Can someone confirm that this is the correct way to scale MFT? You said it already worked in the past, so maybe there already is a config somewhere which broke?

EDIT: I took a quick look into the MFT gihub repository. It has its own code to react to rescaling. So something broke in your install and a custom config may be a useful workaround but should not go into tweakscale. I'll get MFT and do some tests myself.

Your warnings are probably related to this, MFT uses the Tweakscale updaters to get notified of rescales, of something breaks there it will not do the rescaling.

- - - Updated - - -

I looked into Regolith support, the harvester module was easy to add. However the converter seems not to work with existing config options. It seems that TweakScale currently can handle structures but not one-line lists. Regolith already has an issue about this. So I'll hope for a fix on regolith's side.

Edited by pellinor
Link to comment
Share on other sites

Hello,

I was wondering about the TECH TREE and TS; well argh so this means every part in the game that uses TS actually needs this; looks like this will be more of an honour system thing to roleplay this; that is ALOT of editing for parts; especially Squad's alone. (EDIT: Well I do have 1 part I could employ this feature; it's production value increases 5-fold; the resources increased by 8; I can fix these things now on one part which is in my main processing facility, and have 2 construction nodes for it now).

Since it is a construction thing, it could be roleplayed in 3 construction nodes; well for that matter 3 nodes of any production line: rockets, planes, etc maybe but the main parts may seem to be set at 1.25, a size higher than a beginner part.

Then there is the engine power thing; I like the idea of small engines having lots of power; I guess we just scale what we can and have time for and roleplay the rest.

I only have actually 1 part that needs to be scaled down; I still havnt figured out the main part rescale; it never seems to work 'because' the node placements are all out of whack (mostly with TS here I dont know about rescale); maybe I can figure this node attachment issue with this one problem part; when it fails to connect it resets itself to a root node; that fix is to drop it in the parts bin and reload/restart the build-rocket.

Does TS take node attachments into account AND is it better to leave standard sizes (.625, 1.25 etc) to see that/if the nodes attach properly?

Cmdr Zeta

Edited by Cdr_Zeta
Link to comment
Share on other sites

so this means every part in the game that uses TS actually needs this

If you want to pach many parts in the same way, better patch their scaleType instead.

I still havnt figured out the main part rescale

Are you talking about the root part of the vessel? That should never be rescaled because of a current KSP bug.

Does TS take node attachments into account AND is it better to leave standard sizes (.625, 1.25 etc) to see that/if the nodes attach properly?

I probably don't understand the question here, yes it should work with all sorts of attachment nodes and intermediate sizes.

Link to comment
Share on other sites

Bug report:

Testing with RP-0 (RO, RSS, STX, etc)

Playing with the Delta-Deluxe winglet and AV-R8 winglet. In the VAB,

- if resizing a part attached to an assembly, weight does not scale correctly.

- If attaching a scaled part to an assembly weight is correct.

- Launching a ship with these parts, weight for parts goes back to 100% scale

Link to comment
Share on other sites

Hello.

Are there any reported incompatibilities between the latest version of tweakscale and:

-KSP Interstellar Extended

-TweakableEverything

Ever since I updated all three mods, I cannot rescale any part in the game, but I can use TweakableEverything on them.

Link to comment
Share on other sites

How to correctly use freescale

I tried the following code but it only scaled to size 4


@PART[SmallFlatRadiator]:FINAL:FOR[WarpPlugin]
{
%MODULE[TweakScale]
{
%name = TweakScale
%type = surface_radiator
}
}

SCALETYPE
{
name = surface_radiator
freeScale = true
minScale = 0.1
maxScale = 10
defaultScale = 1
incrementLarge = 0.25
incrementSmall = 0.10
incrementSlide = 0.01
suffix = m

TWEAKSCALEEXPONENTS
{
mass = 2
}
}

Edited by FreeThinker
Link to comment
Share on other sites

How to correctly use freescale

I tried the following code but it only scaled to size 4

The best way is to copy from the defaultScales.cfg. Since Version 1.52.1, all scaletypes use the scaleFactors list. However I'd expect that the min/maxScale would be used as a fallback. I'm also not familiar enough with MM to know what those % expressions do (so maybe you wanted to change something but tweakscale still sees some of the old values, like the scaleFactors of some other scaleType?).

Link to comment
Share on other sites

  • 2 weeks later...
Am I able to tweak over 400%? Every item I try only lets me go up to 400 :/

The numbers are in DefaultScales.cfg, feel free to change them. However, most textures already look horrible at 400%, so personally I have more fun scaling things down.

- - - Updated - - -

How come when you scale up decouplers the ejection force doesnt scale up, it keeps going to - or 0 figures.i need help asap becuase my rockets are working properly

Good find. In the SCALEEXPONENTS I only find a moduleTweakableDecouple, but the stock parts have "ModuleDecouple" and "ModuleAnchoredDecoupler". I'll add those.

Link to comment
Share on other sites

Hey there,

Is there a setting where tweakscale doesn't automatically resize parts to fit the node you're attaching the part to?

The default for this has been OFF for at least the last two versions. You probably have remains of an older TweakScale version in your GameData. My guess is the xml file somewhere under pluginData. You can edit the autoScale/chainScale setting there (just deleting the file will probably also solve your issue).

Link to comment
Share on other sites

The default for this has been OFF for at least the last two versions. You probably have remains of an older TweakScale version in your GameData. My guess is the xml file somewhere under pluginData. You can edit the autoScale/chainScale setting there (just deleting the file will probably also solve your issue).

Ahhhh, you have just taken away my only reservation for using this mod :) Thank you!

Link to comment
Share on other sites

Pre-Release v1.53:

* added download link to version file

* added missing RLA configs

* support for regolith harvesting modules

* don't modify part cost for unscaled parts

* fix for repairing incomplete scaletypes

* scale exponents for stock decoupler modules

* basic OPT support

As usual, the pre-release is a zip from gitHub, you only need the GameData folder. Please give it a try, I'll soon publish the update on kerbalStuff and curse if there are no complaints.

Link to comment
Share on other sites

  • 2 weeks later...

I postponed any discussion about scaleExponents until TweakScale is stable and KSP 1.0 is nearing. So now seems a good time to start it.

The most obvious conflict is fuel tanks and engines:

* Thrust should go with the square.

* Tank volume should go with the cube.

* Mass should scale such that a large part is roughly equivalent to several small ones (i.e. TWR and fuel fraction should be preserved).

The current default is that mass scales with an exponent of 2.5, thrust scales with 2(ModuleRCS), 2.2(ModuleEnginesFX) and 2.6(ModuleEngines). DryCost scales with 3. So the conflict is solved by some sort of compromise, and nothing really scales neutrally. (for example tanks break the stock balance when scaled up)

Ideas

0) Leave everything as it is.

1) Consider the mass exponent as something very individual and manually add TWEAKSCALEEXPONENT { mass = x } where needed (with default=3)

2) Define the scaleTypes in a 'sqare' and 'cube' flavour (i.e. stackSquare, stackCube, freeSquare, freeCube)

3) MM config to make everything with an engine module 'square' (might conflict with other MM patches, not suit some parts and miss out other modules with 'square' or other scaling)

So far, I don't really like any of the ideas. Still the problem should be sorted out, and KSP 1.0 would be the best time for such a change. In my opinion 1) sounds like the most viable, even if it would be a ton of manual changes.

Maybe I could hardcode to scale dryCost like mass per default (while still allowing cfg overrides) so we don't have a second exponent scattered everywhere.

What do you think about the current situation and the proposed ideas? Are there better ways to sort the mass scaling? Also feel free to question other exponents (the complete collection is found in ScaleExponents.cfg).

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