pellinor0 / tweakscale Goto Github PK
View Code? Open in Web Editor NEWThis project forked from biotronic/tweakscale
Forked from Gaius Goodspeed's Goodspeed Aerospace Part & TweakScale plugin
This project forked from biotronic/tweakscale
Forked from Gaius Goodspeed's Goodspeed Aerospace Part & TweakScale plugin
I'd love me some 1.1 support for this, how will I be able to fataly crash my rockets without it?
When scaling a part in the editor, if a scaled value is also tweakable, the tweakable does not update correctly (example: RESOURCE nodes, i.e. tanks).
Right after scaling it still shows the old values, which can lead to clipping of the content against the old limit.
It seems to update correctly when
The rescale does fire a "onEditorShipModified" event, which probably triggered the update in 1.0.5 and before but that seems not to work anymore.
Scaling for RCS thrusters is broken because ModuleRCS
has been superseded by ModuleRCSFX
; their size can be changed, but the thrust stays the same.
The fix seems to be straightforward. Just add a new TWEAKSCALEEXPONENTS
block to ScaleExponents.cfg
:
TWEAKSCALEEXPONENTS
{
name = ModuleRCSFX
maxFuelFlow = 2.5
thrusterPower = 2.5
-ignore = ModuleEngineConfigs
}
Looking at the FSPROpeller part from firespitter, there are a couple of other modules that seem connected and may also need support for the part to scale well: FSpropellerTweak, FSalternator.
If I remember right, maxThrust only limits how much energy the motor produces. There is another limit how much energy the propeller can convert into thrust (probably in FSPropellerTweak).
How does fuelConsumption work? Do we need to scale that?
There seem to be problems with several fuel switch mods lately, probably something changed in the base game. MFT applies resource costs twice (even when on its own), interaction with CC (configurable containers) also seems broken.
If FSfuelSwitch is present, I now ignore resource costs when calculating GetModuleCost. It might make sense to also do that for other fuelSwitch modules.
I recently changed to look at prefab-cost and prefab-resources when calculating dryCost (before: part-resources). This fixes things with FSFuelSwitch but might break something else. Overall it seems the more consistent thing to do.
List of fuel switch mods with TweakScale interaction:
Playing with the latest version of KSP TweakScale doesn work. I'm using TweakScale 1.2.2.
Stock has two new tweakables for float values now: UI_FloatEdit and UI_ScaleEdit. Since the old UI_FloatRange treated explicitely in the code, we need adaptions for the other two.
Type of issue: Feature request
Problem: to get to another planet fast I use vast amount of fission reactors (to support tweak scaled ion engines), it increases part count and add lags on high speed physics warp (>=20x). It will be cool if fission reactors can be scaled too.
There is a demand of chainscaling across all sorts if nodes, not just along a stack (mainly for artistic building).
The current hardcoded requirement of 'same scaletype' probably makes the current implementation quite unusable since the introduction of the "stack_square" scaletype.
New requirements:
The volume of Modular Fuel Tanks don't get scaled with TweakScale
If you put a Tweakscaled engine (I've only tested with downsizing) below a Procedural Liquid Tank that has its shape set to Cone, save the vessel, then reload the vessel, the engine recesses into the tank, sometimes disappearing within it completely.
Resource rates do not scale. Likely a problem with the syntax of the exponent nodes.
TWEAKSCALEEXPONENTS
{
name = ModuleAlternator // does not work yet
RESOURCE
{
rate = 3
}
}
examples: engines, stock drills
I've encountered memory leak 2 times in 1.2 which took 13 and 16 GB ram, and the common characteristic of the two vehicle is that they are big truck consist of big up-scaled parts.
After checking my output.log, I found that these logs keep appearing, maybe it's related to TweakScale and the 1*6 deployable solar panel installed on the truck?
[TweakScale Warning] No valid member found for panelMass in ModuleDeployableSolarPanel
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:CallUpdaters()
TweakScale.TweakScale:Setup()
TweakScale.TweakScale:OnLoad(ConfigNode)
PartModule:Load(ConfigNode)
Part:LoadModule(ConfigNode, Int32&)
ShipConstruct:LoadShip(ConfigNode)
AtHangar.PackedConstruct:LoadConstruct()
AtHangar.<convert_constructs_to_vessels>c__Iterator0:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
I wondered why my spaceplane kept imploding when I touched the brakes!
It appears that the break torque setting is back to default both on VAB/SPH load and quickload ingame.
(copied from Biotronic#35 )
Build a 1.25m rocket body, and put a KS-25x4 "Mammoth" engine on it, tweakscaled to 1.25m. Sea level thrust should be 1/9 of 3746kN = ~416kN. Fly the rocket, observe it can't accelerate past about 300m/s at low altitudes despite the high thrust. F12 to see a very long red drag line.
Replace the scaled mammoth with an LV-T30, observe that with half the thrust it has no trouble accelerating past 1000m/s. F12 to see no substantial drag line from the engine.
It seems like the drag model still has the engine being 3.75m diameter, so you're trying to fly a supersonic piston head.
We need:
Maybe worth a discussion. I see two ways:
A) scaling like science parts (small = light and expensive), range is preserved
(problem: only works well if mass/size is significant)
B) large = better range and more expensive
(problem: breaks the gane mechanic that ranges are limited by technology)
I am not sure if this is TweakScale's fault but I might as well throw it your way.
This is on 1.2.1 with the 1.2.0 TweakScale version, though I had problems with it on 1.2.0 as well but didnt catch them on log. Also using a ton of other mods so might not be TweakScale's fault, as said. All mods except MechJeb are installed through ckan.
I'm using two TweakScale'd fueltanks, FL-T200 with an FL-T400 on top of it, both scaled to 0.625m. On the top is a Probodobodyne along with a ton of other things and on the bottom is an LV-1 Engine. The setup works fine for the first burn but on the second one it blows up and before it does you can see the bottom fueltank sortof drifting into the top one. Whether it's the fuel going low enough for the center of mass to change to some critical point or it's timewarp messing it up I do not know.
KSP.zip
Lines 22988, 35379
This needs to be done first, so that others can use it in their update methods.
Probably same requirement for dryCost, and the fields in the part itself.
The stock display does not react to scaling. KER and mechjeb show the correct mass.
When I scale a full fuel tank, the content is scaled but the stock display does not change at all. If afterwards I touch the fuel slider, the fuel weight updates but the dry weight does not.
Is there some "ship modified" event that I am supposed to call? If so, how do KER/Mechjeb detect the change?
Power generation does not scale. This is the exponent I use:
TWEAKSCALEEXPONENTS:NEEDS[NearFutureSolar]
{
name = ModuleCurvedSolarPanel
TotalEnergyRate = 2
}
The game mirrors parts in the SPH. When TweakScale is installed, the copy is rotated 180° instead of mirrored (even for unscaled parts).
Maybe I need to check for flipped signs in the IVA transform, like I did for the model transform in a recent symmetry-fix.
When launching a plane with scaled landing gear, the game uses the unscaled gear for doing the initial placement. This means that downscaled gears are up in the air, and upscaled gears are clipping the runway (exploding of breaking off if the initial shock on physics load is too high).
This seems to happen mainly to landing legs and landing gear (rover wheels seem unaffected). Those parts have rather large suspensions and small wheels, so my guess is that the problem is suspension-related.
In principle, the prefabPart has enough information to know the properties of scaled parts.
It should be able to answer questions like
"What is the moduleMass for this part when scaled to 2.5m?"
Or even
"by what factor would you multiply property 'xyz' if the scale was 5m?"
This could be useful for mods that handle parts without physically creating them, like KIS or KCT. The interface would probably be public methods that can be called via reflection.
If the Near Future reactors are rescaled, both heat generation and EC/s remain the same as the original scale. As a result, reactors scaled down to 50% burn out within seconds, and take a long time to gain temperature if scaled up to 200%. EC/s remains fixed for all sizes. Can't see any other issues with the rest of NF Electrical, Propulsion or Solar.
Proof of issue:
[Near Future] Reactor Issue.pdf
Note: Can only show EC/s being same for three sizes in file. For the heat generation issue, note that it takes 10+ mins to reach operational temp on the launchpad for 200% scale, ~1-2mins for 100% scale, and ~10secs at 50% for reference.
Wrong cost when scaling and switching fuels. It looks like we overwrite each other in uncontrolled ways.
TweakScale throws an error in the editor when it calculates a negative DryCost, probably OnStart. Must have something to do with FSFuelSwitch altering both part cost and resource nodes (so the part might be in an inconsistent state at that time). Not sure yet on which end something changed that broke this.
These things seem to have a common cause, so I'll list them as one issue.
This is most likely a KSP bug, related to differences in the loading process between launch, quickload and revert. On load/quickload and revert to launch, scale changes in the transform of the root part are ignored/overwritten by KSP. Setting the change flag for this transform triggers the camera bug.
These are the code lines that trigger the bug (from Scale.cs):
part.transform.GetChild(0).localScale = newScale;
part.transform.GetChild(0).hasChanged = true;
part.transform.hasChanged = true;
Post about reproduction:
http://forum.kerbalspaceprogram.com/threads/94844-View-zoom-out-on-camera-mode-change?p=1441712&viewfull=1#post1441712
Changing the size of a reaction wheel changes its torque, but not the ElectricCharge consumption. Tested with stock small 0.625m reaction wheel. Not only the consumption displayed in the VAB (middle-click) stays the same, but also the actual consumption measured during flight.
Please find enclosed a report with the steps to reproduce the issue.
Issue Report for Tweakscale 2.3.pdf
Kind Regards and thanks for your work on this ;)
Sounds like its resource consumption has changed in some way and needs an update.
See here: ihsoft/KIS#131
message with absolute scale for realEngines, generic so that others can also use it. Something like OnPartScaled / OnPartScaleChanged.
Also add relativeScale (needed in IR for example).
Downscaled wheels consider themselves blocked, upscaled wheels seem to work (tested TR-2L at 50% and 200%).
If i set the exponent ModuleWheelBase::radius to 1, the 200% wheel still works but floats above the surface. The small wheel does not consider itself blocked anymore but still sinks into the runway and does not work.
Ideas:
There was a point in some KSP changelog about changing crew capacity in flight. Maybe this allows to scale it.
We might still be limited to the number of seats in the IVA, but at least we can put less seats in downscaled parts.
and optimize getModuleMass because it is also called in flight now
Nothing related found in log, only the ones I reported earlier about Hangar.
Since it's related to container, I'm thinking about the Configurable Container mod, I've seen that the author said he had provided support to TweakScale, though.
This was always the case but becomes much more obvious with the new overlay.
The least breaking thing to do is probably to scale the IVAs - with the side effect of scaled kerbals.
There is the obvious solution of "then don't do it" but there are legitimate uses of scaled crew parts (like aircraft form factors that only offer a cockpit for the front). And generally the plugin needs to work if a TweakScale module ends up on a part with an IVA.
Did some testing with KSP 1.1.1: Parts dont place correctly in save files. Have an look on the gap between the rounded tank and the reaction wheel as well the "sunken" isru. replacing them prior launch fixes the problem for the given ship, but it saves and loads wrong. The gaps increase with every load/save cycle.
A small 1.25m rocket has a terminal velocity of about 100m/s when using a stock tank. When I use a downscaled version of the largest Kerbodyne tank, this drops to about 30m/s. So something broke with dragcube scaling, probably drag is not scaled at all at the moment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.