Jump to content

[1.12.5] WIP: TweakScale Rescaled


Recommended Posts

New thread here: 

 

 

WARNING: DO NOT use this on your existing saves or craft files without backing them up first. While I'm pretty sure I can eventually address all the game-breaking issues I'm also pretty sure I haven't yet, and saving your stuff with this version and then trying to go back to other versions will most likely not work.

DANGER: TweakScaleRescaled MAY NOT be interoperable with other forks of TweakScale.  That is, if TweakScaleRescaled has a bug or you decide you want to use a different fork, there is no guarantee your craft files and save files will work with other forks of TweakScale.

Support

You MUST include your ksp.log file with all support requests. These links are for TweakScaleRescaled. DO NOT ask for support on other TweakScale threads.

New Feature Demos: 

 

What is this?
TweakScale is a mod that allows you to rescale parts in the vessel editor. All of their stats and properties are affected realistically - tanks contain more fuel, engines get stronger, solar panels produce more power, etc. It's one of KSP's oldest mods and has been maintained by many different people over the years.

I've forked pellinor's version of TweakScale and updated it for modern KSP to provide a simpler and streamlined version. I've paid special attention to the following areas:

  • Improvements to part action window in the editor
    • clicking interval buttons at the ends of the ranges works better
    • can now drag the slider smoothly
    • Toggle for scaling changes to affect the entire subtree
    • Toggle for matching node sizes when attaching parts
    • Numeric entry (click #) is now supported
    • Option to display the effects of scaling on the part's stats
  • Scaling construction mode gizmo akin to offset and rotate (press 5 in the editor)
  • New "match node size" feature to auto-scale parts when attaching nodes to each other
  • All parts are supported with reasonable defaults unless they opt-out or match certain filters to trap known issues (AllTweak will still override this and enable everything)
  • Reduced dependencies to only ModuleManager and Harmony
  • Optimized for better performance
    • better loading time to main menu
    • better switch-to-editor time
    • scaling a part is more responsive
    • less performance impact in flight scene
    • better save/load performance
  • Less intrusive and more targeted validation system (TweakScaleSafetyNet)
  • Robustness
    • fixed part attachments and mass/cost scaling when stock part variants or B9PartSwitch are involved
    • scaling engine effects (stock, waterfall, realplume, smokescreen, etc) works correctly
    • Craft files and saved games no longer break from changes in TweakScale configs
    • More resilient to problems caused by missing dependencies, problems with other mods, and incorrect installations
    • Copying part subtrees, subassemblies, load-merging all work properly
    • Made it easier to add or customize TweakScale support for other mods
  • Compatible with many fuel-switching mods:
    • B9PartSwitch
    • ModularFuelTanks
    • InterstellarFuelSwitch
    • SimpleFuelSwitch
    • Firespitter
    • Universal Storage 2
    • Configurable Containers

Why not work to improve the current TweakScale?
The gist of it is: it would take far more energy than I have. If I believed this option was possible, I would do it (because usually, this is the best option).

However, TweakScaleRescaled (this fork) is licensed CC-BY-NC-SA. Its code may be used by anyone else provided they abide by the license terms. Pull requests are also welcome from anyone who wants to contribute.

Compatibility
Backwards compatibility is a core goal of TweakScaleRescaled. Existing craft files, saved games, configs, and mods that depend on Scale_Redist should work seamlessly if you change to TweakScaleRescaled (once all the bugs are worked out and it hits final release).

However, ongoing interoperability with other versions of TweakScale is not a goal. I will make a reasonable effort to support it where it's easy. In order to make the improvements necessary, data structures and assumptions have to be altered in ways that are difficult to reverse.

TweakScaleRescaled should just work with almost all stock or modded parts. It includes the stock and mod-support patches that were written by the previous authors (updated as necessary). There's also a new patching system based on heuristics that will apply to all other parts unless they opt out or are blocked by filters for things that are known to break.

Only KSP 1.12 is supported. Other versions 1.8-1.11 may work but have not been tested and are not a priority.

Dependencies

  • ModuleManager
  • Harmony
  • KSP Community Fixes is recommended to address stock bugs that become more apparent when using TweakScale

License Info
TweakScaleRescaled is licensed CC-BY-NC-SA-4.0.
© 2023 JonnyOThan
© 2015-2018 pellinor
© 2014 Gaius Godspeed and Biotronic

History

Download
https://github.com/JonnyOThan/TweakScale/releases

Installation Instructions

  1. Remove any previous version of TweakScale and KSP Recall.
  2. Install the contents of the GameData folder in the zip file into your GameData folder.
  3. Install Harmony and ModuleManger - CKAN is recommended for those.

OR: https://github.com/JonnyOThan/TweakScale/wiki/Experimental-CKAN-Support

Support

You MUST include your ksp.log file with all support requests.

Edited by Vanamonde
Link to comment
Share on other sites

Quote
  • Scaling construction mode gizmo akin to offset and rotate (press 5 in the editor)
  • New "match node size" feature to auto-scale parts when attaching nodes to each other

Oh dear kraken, people are going to make the shuttle but gilly-sized

 

Congratulations on release!

Link to comment
Share on other sites

48 minutes ago, JonnyOThan said:
  • can now drag the slider smoothly
  • Toggle for scaling changes to affect the entire subtree
  • Toggle for matching node sizes when attaching parts
  • Numeric entry (click #) is now supported

[...]

Scaling construction mode gizmo akin to offset and rotate (press 5 in the editor)

[...]

Less intrusive and more targeted validation system

Damm those are some good improvements.

Quality work.

Link to comment
Share on other sites

Congratulations on the in-dev beta release.

I may ignore your warning and try it on a 300 mod career game because "I live dangerously" (and I know what I'm doing, in theory). Dear readers, do not try this in your home without suitable backups!

Link to comment
Share on other sites

7 hours ago, JonnyOThan said:

Toggle for scaling changes to affect the entire subtree

Awesome. Thank you that and everything else.

7 hours ago, JonnyOThan said:

Toggle for matching node sizes when attaching parts

New "match node size" feature to auto-scale parts when attaching nodes to each other

Can you predict how those 2 features might interact with part mods that have incorrect node sizes? For example, lets say someone made a 2.5m part but incorrectly gave it a 3.75m node. Such parts cause drag issues when connected to regular 2.5m parts. If you are dynamically adjusting the node sizes to be equal as they connect, even when neither part is being resized, you've solved drag quirks in some old spaceplane mods, and you just became my favorite modder of 2024!

 

 

Link to comment
Share on other sites

6 hours ago, DeadJohn said:

Can you predict how those 2 features might interact with part mods that have incorrect node sizes?

I’m not familiar enough with the drag cube algorithms to say.  There’s no great way (that I’m aware of) to know the diameter of a part, so I primarily use the bulkheadProfiles and attach node sizes to make a guess. For some parts this is wrong and I need to manually specify it.  And further, the node sizes are simply scaled with the rest of the part rather than being set equal.

I’m a little skeptical that the node sizes alone would affect drag though. 1.875m parts all use size1 nodes, but they will produce extra drag if you connect them to 1.25m parts.

Do you know of a specific part that has this problem?

Link to comment
Share on other sites

11 hours ago, DeadJohn said:

For example, lets say someone made a 2.5m part but incorrectly gave it a 3.75m node. Such parts cause drag issues when connected to regular 2.5m parts.

AFAIK from my knowledge of the stock drag cube occlusion code, this isn't true.
Inter-part drag occlusion is based on the config defined or runtime generated surface area of the connected parts drag cubes, node size / bulkhead profile doesn't matter at all.

Link to comment
Share on other sites

What does the current maintainer of Tweakscale say about this? @Lisias

Don't think doing this to an actively maintained addon is well, kosher.

Why not work with the current owner/maintainer to improve it?

Edited by zer0Kerbal
Link to comment
Share on other sites

3 hours ago, zer0Kerbal said:

Don't think doing this to an actively maintained addon is well, kosher.

As long as there is no violation of the previous mod's license, it's fine. 

Link to comment
Share on other sites

9 hours ago, DeadJohn said:

@JonnyOThan @Gotmachine Thanks for your node size drag explanations. If I find one the problem mods again I'll test it with this new Tweakscale fork to satisfy my own curiosity and post if I have anything new to add.

If you're not aware, you can go to debug menu (alt-f12) -> physics -> aero and enable "display aero data in action menus."  This will show the actual drag cube used in each part's right-click menu.

Link to comment
Share on other sites

A new version is available!  https://github.com/JonnyOThan/TweakScale/releases

Changes from previous version

  • Fix cost scaling on parts that start without resources, e.g. the gold tank from Gold Standard
  • The added cost in the part stats now excludes the resource capacity offset, so it's more understandable
  • Fixed an exception when trying to scale a module field backed by UIFloatRange
  • SystemHeat is now supported
  • Science parts can now be scaled, but only shrunk (at higher cost)
  • Fix doubly-scaled wheel collider (usually noticeable when wheels are retracted)
  • Fix some bugs with scaling waterfall effects
  • Match Node Size and Reset Scale now always recurse to children
  • Improved the on-screen messaging around Match Node Size
  • Clean up fields left over in parts so they don't emit warnings during part compilation
  • Fixed a bug related to part attachment when the offset tool had been used
  • TSSafetyNet can now pinpoint several causes of a failed load
Link to comment
Share on other sites

New version available!  Now on spacedock!

Changes from previous version

  • Fix another bug with scaling waterfall effects
  • Fix some fatal issues when duplicate scale types are specified
  • Fix integration with BDArmoryContinued
  • TSSafetyNet now ensures the proper version of Harmony and no longer erroneously reports that ModuleManager is missing
  • Fixed issues with part joint setup that could give different results on initial launch vs loading a save
Link to comment
Share on other sites

New version available!

Changes from previous release

  • Fix an issue with match node size and the re-root tool
  • Exclude several procedural type parts from scaling (b9 proc wings, etc)
  • Fix an issue where crew capacity of scaled parts could be reset after adding or removing parts from the ship
  • Docking ports can now be scaled, and doing so will change their port type. E.g. an inline clampotron (normally a size1 port) at 2.5m scale will dock to a Clampotron Sr (size2) port. Modded ports may have strange results.
  • Fix many issues with EVA construction, part inventories, and scaled parts
  • Fix scaling on several modded crewed parts that require deployment/inflation
Link to comment
Share on other sites

Some off-topic content has been removed.  Folks, the topic of this thread is this fork of TweakScale, please try to confine your questions to that topic.  Thank you.

Link to comment
Share on other sites

Is there a way to turn off the match node size feature? It is bugging out SSTU parts because they have their own scaling method.

 

Update - I found the option for scale children. Can we have this set to off by default or is there no way?

Edited by warranty45
Link to comment
Share on other sites

4 minutes ago, warranty45 said:

Can we have this set to off by default or is there no way?

There are buttons in the part action window to toggle those two features, and they also indicate the hotkey for toggling them (K for scaling children, M for match node size).  All 4 of the options in the part action window should be persistent - whatever you set them to, they should stay set like that until you change them again.  If that's not the case for you, please let me know and post your log file.

Also note that both Scale Children and Match Node size can be temporarily toggled (off to on or vice versa) by holding Left Ctrl.

All of the keybindings can be changed in TweakScale\Plugins\PluginData\Scale\config.xml.  Names of keys can be found here: https://docs.unity3d.com/ScriptReference/KeyCode.html

7 minutes ago, warranty45 said:

It is bugging out SSTU parts because they have their own scaling method.

Most likely the automatic systems I have in place aren't calculating the correct diameters for those parts (it uses a lot of heuristics, but if the parts aren't set up according to common standards then they're often wrong).  If you let me know what parts are broken I can take a look and maybe fix them.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...