Jump to content

Brightideagaming

Members
  • Posts

    3
  • Joined

  • Last visited

Reputation

0 Neutral

Profile Information

  • About me
    Bottle Rocketeer
  1. Please add TweakScale to your mod! If you are a mod author and you want to bundle TweakScale with your mod, please do! A few notes: Please place your TweakScale .cfgs in your mod's folder, not in the TweakScale folder. This way users can delete TweakScale and install a new version without breaking your mod. If your mod is already on the list of supported mods, please post here or PM me, and I will remove support, giving you full control over the .cfgs. Anyways, features: Scaling Control You as the author of a part or addon get complete control over which parts you want to offer in which sizes. Should that fuel tank only be available in size 2.5m and 3.75m? Make it so! That RCS thruster on the other hand, could be scalable freely between half regular scale and double regular scale. Mass Control For heavy, solid parts, mass increases with the cube of the scale - you scale it in three dimensions, after all. For parts that are a thin layer of aluminium plates over a rigid skeleton - like fairings, crew compartments, empty fuel tanks - mass probably scales closer to the square of the scale. Control Over Every Feature of a Part This is not all! Engines can be made more powerful as they increase in size, generators more efficient, and wings more lifty. All by writing a simple config file, and then automatically for all rescalable parts of that type. How to Use First add a part that's the wrong size: http://i.imgur.com/NxMyyTK.png Right click: http://i.imgur.com/BBw1x4M.png See how it says 3.75m? Well, the command capsule is 2.5m, so let's change it. You do this by pressing the << >> buttons or dragging the slider. http://i.imgur.com/LCEiPHP.png See how well it fits? http://i.imgur.com/fAF2xsT.png Example Configurations For a part that should be available in 62.5cm, 1.25m, 2.5m, 3.75m and 5m configurations, and by default is 1.25m, use the following definition: { name = TweakScale defaultScale = 1.25 type = stack }MODULE If the part should instead be freely rescalable, use this: { name = TweakScale type = free }MODULE And for a part that should be available in 25%, 50%, 100% and 200% scales, use: { name = TweakScale type = surface }MODULE But I said you had full control of scales, didn't I? If you want your parts to be available only in 2.5m and 3.75m versions, use this definition: { name = TweakScale type = stack scaleFactors = 2.5, 3.75 scaleNames = 2.5m, 3.75m }MODULE If your mod has a collection of parts that will all be available in the same set of sizes, you might want to make your own scale type: { name = MyMod freeScale = false scaleFactors = 0.5, 1.0, 2.0 scaleNames = Small, Medium, Large defaultScale = 1.0 }SCALETYPE After defining this once, you can then start using it for your parts: { name = TweakScale type = MyMod }MODULE As you can see the scale type uses the same names as the module definition, and they can even inherit from other scale types (if you want to change just a small detail): { name = spaceplane type = stack scaleFactors = 1.25, 2.5, 3.75, 5.0 scaleNames = 1.25m, 2.5m, 3.75m, 5m }SCALETYPE This will use all the defined properties of the 'stack' scaletype, but will not be available in 62.5cm size (because some poor kerbal is going to sit inside there). Adding module support You can now add support for your own modules! For a simple module that's happy with having its values changed when OnLoad is called, this is how: { name = MyPartModule flooberRate = 2 }TWEAKSCALEEXPONENTS When a user rescales a part with a MyPartModule module, TweakScale will automatically update the flooberRate of the part with the square of the scale (so if it's a 2.5m part and it's scaled to 3.75m, the flooberRate will be 2.25 times its usual value [3.75/2.5 = 1.5; 1.5^2 = 2.25]). New in 1.10 is the ability to change fields of fields - that is, myPartModule.someStruct.value or myPartModule.someList[x]: { name = ModuleGenerator outputList { rate = 3 } }TWEAKSCALEEXPONENTS The above config will scale all members of the list outputList on ModuleGenerator, to the cube of the current scale. Note that this system works for any depth: { name = ModuleMyModule foo { bar { quxRate = 3 } } }TWEAKSCALEEXPONENTS The above would scale ModuleMyModule.foo[x].bar.quxRate. New in 1.19 is tech requirements: { name = TweakScale type = stack techRequired = basicRocketry, start, generalRocketry, advRocketry, heavyRocketry }MODULE Here, each option in the stack SCALETYPE will be unlocked by a corresponding tech. If there are fewer techRequired than scaleNames/scaleFactors, the unmatched scales will be unlocked by default. It might be that your module would benefit more from using a list of values than an exponent. In that case, you may specify the list in the tweakscale module statement in the .cfg: { name = TweakScale type = stack defaultScale = 3.75 MODULE { name = ModuleEngines maxThrust = 1, 2, 3, 4, 5 } }MODULE Here, a 62.5cm version would have a maxThrust of 1, 1.25m would be 2, and so on until the 5m version has a maxThrust of 5. New in 1.23: Forced relative scaling! This is invaluable for persistent values. If they were to use absolute scaling, the default value would be loaded from the prefab part, scaled up, and used without a second thought. With relative scaling, the current value is loaded, the multiplied by the scale factor difference since last we looked. And it's super easy to use: { name = MyModule !MyValue = 2 }TWEAKSCALEEXPONENTS New in 1.30: Cost scaling! As 0.24.1 introduced the beautiful IPartCostModifier, TweakScale now supports changing the cost of a part: { name = TweakScale dryCost = 2 }TWEAKSCALEEXPONENTS The above configuration will make the cost of a part scale with its surface area. Useful for fuel tanks, solar sails, balloons and rugs. Thanks to NathanKell, 1.44 added support for not doing scaling when a specific module is added to a part. This is useful when TweakScale can do some updates on its own, but should keep its hands off when another module can do better. { name = MyModule socksPerMinute = 2 ignore = SockManager }TWEAKSCALEEXPONENTS This code will scale socksPerMinute by the square of the scale, or if there's a SockManager partmodule on the part, leave it all alone and let the SockManager do its thang. Advanced features If more advanced logic is required, TweakScale offers an IRescalable interface. It is defined in Scale_Redist.dll, and its definition is as follows: { void OnRescale(ScalingFactor factor); } public interface IRescalable<T> ScalingFactor has the properties 'absolute' and 'relative'. Most likely, you want to use absolute. relative is the change in scale since last time OnRescale was called, while absolute is the change in scale in relation to defaultScale. absolute and relative have properties linear, quadratic and cubic, which are shorthands for different scaling factors. If you want something different, you'll have to figure out the math yourself. IRescalable can be used in conjunction with .cfg exponents. In that case, TweakScale will first call IRescalable's OnRescale, followed by updates from .cfgs. (this may be changed in the future, as I'm not sure it's the best solution) An example implementation of an IRescalable may be: class MyModuleUpdater : TweakScale.IRescalable<MyPartModule> { MyPartModule _module; public MyModuleUpdater(MyPartModule module) { _module = module; } public void OnRescale(TweakScale.ScalingFactor factor) { _module.flooberRate = _module.flooberRate * factor.relative.quadratic; _module.ReactToFlooberRate(13); } } For an example implementation, check out how Modular Fuel Tanks/Real Fuels support is implemented. Version History: 1.46 - 2014-11-16 20:03 UTC) Removed RealChute support. Fixed a bug where TweakScale would try to set erroneous values for some fields and properties, which notably affected Infernal Robotics. Fixed a bug where cloned fuel tanks would have erroneous volumes. 1.46 - 2014-11-16 20:03 UTC) Fixed an issue where features were incorrectly scaled upon loading a ship, Scaling a part now scales its children if they have the same size. Parts now automatically guess which size they should be. 1.44 (2014-10-10 19:20 UTC) Now updating UI sliders for float values. Better support for KSP Interstellar. Added support for TweakableEverything. Added support for FireSpitter's FSFuelSwitch. 1.44 (2014-10-10 19:20 UTC) Updated for KSP 0.25 Added ability to not update certain properties when a specific partmodule is on the part. Many thanks to NathanKell, who has all the credit for this release! 1.43 (2014-08-24 23:52 UTC) Added licence file (sorry, mods!) No longer chokes on null particle emitters. 1.41 (2014-08-15 11:43 UTC) Fixed scaling of Part values in unnamed TWEAKSCALEEXPONENTS blocks. 1.40 (2014-08-13 12:55 UTC) Removed Karbonite cfg, since that project does its own TweakScale config. 1.39 (2014-08-12 23:03 UTC) Fixed cost calculation for non-full tanks. 1.38 (2014-08-12 20:45 UTC) Added scaling of FX. Added support for Banana for Scale. Updated Karbonite support. Fixed a bug where no scalingfactors available due to tech requirements would lead to unintended consequences. 1.37 (2014-08-05 13:35 UTC) Updated cost calculation. 1.36 (2014-08-04 21:58 UTC) Updated Real Fuels and Modular Fuel Tanks support. Added KSPX support. 1.35 (2014-08-03 16:24 UTC) Corrected cost calculation. Updated to KSPAPIExtensions 1.7.0 1.34 (2014-08-02 00:49 UTC) Fixed a bug where repeated scaling led to inaccurate placing of child parts. Added Karbonite support. 1.33 (2014-07-28 20:00 UTC) Updated for RealFuels 7.1 1.32 (2014-07-25 22:29 UTC) Updated with KSPAPIExtensions 1.6.3 for 0.24.2 1.31 (2014-07-25 15:58 UTC) Fixed a bug where parts with defaultScale inaccessible due to tech requirements were incorrectly scaled. 1.30 (2014-07-25 11:23 UTC) Updated KSPAPIExtensions with 24.1 support. Re-enabled Real Fuels support. Added support for IPartCostModifier 1.29 (2014-07-24 11:50 UTC) Fixed Modular Fuel Tanks support. 1.28 (2014-07-24 10:32 UTC)) Fixed the rest of the bug that was partly fixed in 1.27. Added support for Tantares Space Technologies. 1.27 (2014-07-23 21:44 UTC) Fixed a bug on non-Windows platforms. 1.26 (2014-07-23 16:60 UTC) Fixed typo in DefaultScales.cfg. type = free, type = surface and so on should now work. Updated support for KW Rocketry and NFT. 1.25 (2014-07-23 12:31 UTC) Modular Fuel Tanks yet again supported! (Still waiting for Real Fuels) Refactored IRescalable system to be easier for mod authors. Fixed a bug where one field could have multiple exponents, and thus be rescaled multiple times. 1.24 (2014-07-21 20:51 UTC) Nodes are now correctly scaled when parts are duplicated. Per-scaletype exponents are now used correctly. 1.23 (2014-07-21 12:44 UTC) Multiple TweakScale .dlls no longer interfer with each other. 1.22 (2014-07-20 22:21 UTC) Fixed tanks that refill when you change between ships. Fixed tech lookup time, which was way too slow. 1.21 (2014-07-18 18:47 UTC) Updated for 0.24! More flexibility of configuration. Mod authors can now have feature scale definitions per part, per scaletype or global. 1.20 (2014-06-12 22:15 UTC) New algorithm for rescaling attach nodes. Tell me what you think! Added Deadly Reentry Continued and Large Structural/Station Components. 1.19 (2014-06-06 10:56 UTC) Added support for tech requirements for non-freeScale parts. 1.18 (2014-06-04 00:58 UTC) Factored out Real Fuels and Modular Fuel Tanks support to separate dlls. 1.17 (2014-06-03 22:21 UTC) Fixed bug where attachment nodes were incorrectly scaled after reloading. This time with more fix! Added support for Near Future Technologies. 1.16 (2014-06-03 21:31 UTC) Fixed bug where attachment nodes were incorrectly scaled after reloading. 1.15 (2014-06-03 20:50 UTC) Finally squished the bug where crafts wouldn't load correctly. This bug is present in 1.13 and 1.14, and affects certain parts from Spaceplane+, MechJeb, and KAX. 1.14 (2014-06-03 19:50 UTC) Fixed a bug where nodes with the same name were moved to the same location regardless of correct location. (Only observed with KW fairing bases, but there could be others) 1.13 (2014-06-02 18:25 UTC) Added support for MechJeb, Kerbal Aircraft eXpanion, Spaceplane+, Stack eXTensions, Kerbal Attachment System, Lack Luster Labs, Firespitter, Taverio's Pizza and Aerospace, Better RoveMates, and Sum Dum Heavy Industries Service Module System. Fixed a bug where Modular Fuel Tanks were not correctly updated. 1.12 (2014-06-02 11:10 UTC) Added support for ÚÞáÃœÞá. No longer scaling heatDissipation, which I was informed was a mistake. 1.11 (2014-06-01 20:24 UTC) Removed silly requirement of 'name = *' for updating all elements of a list. Added .cfg controlled scaling of Part fields. 1.10 (2014-06-01 14:53 UTC) Added support for nested fields. 1.9 (2014-05-31 00:57 UTC) Fixed a bug where rescaleFactor caused erroneous scaling. Added (some) support for Kethane parts. 1.8.1 (2014-05-30 22:41 UTC) Don't use 1.8.1, either. 1.8 Don't use 1.8 1.7 (2014-05-22 21:09 UTC) Removed spurious debug log printing. You can now use a list of value instead of an exponent! Exponents and value lists can be specified per part, not just per module type. (And per-part values take precedence) Fixed erroneous scale for Rockomax 48-7S, and added missing scale for KW Rocketry 2.5m Nose Cone. 1.6 (2014-05-22 14:04 UTC) Fixed a problem where parts were scaled back to their default scale after loading, duplicating and changing scenes. Fixed defaultScale for Rockomax 48-7S (was 625, should be .625. Who'd guess someone'd notice that, eh?) 1.5.0.1 (2014-05-21 00:36 UTC) Fixed a bug in 1.5 where scale was not correctly preserved. Updated KSPAPIExtensions.dll - please delete the version in GameData/. Added support for KSO. 1.5 (2014-05-20 22:23 UTC) Changed from hardcoded updaters to a system using .cfgs. Made registration of custom IRescalables possible. 1.4 (2014-05-20 17:53 UTC) Fixes compatibility with GoodspeedTweakScale (but not old versions of TweakScale, but that should be a much, much smaller problem anyway). Added scaling support for KW Rocketry, NovaPunch and KSP Interstellar. 1.3 (2014-05-19 22:49 UTC) Fixed a bug where parts would get rescaled to stupid sizes after loading. Breaks compatibility with old version of the plugin (pre-1.0) and GoodspeedTweakScale. 1.2 (2014-05-18 22:00 UTC) Fixed default scale for freeScale parts. Fixed node sizes, which could get absolutely redonkulous. Probably not perfect now either. B9 Aerospace, Talisar's Cargo Transportation Solutions, and NASA Module Manager configs. Now does scaling at onload, removing the problem where the rockets gets embedded in the ground and forcibly eject at launch. Fixed a silly bug in surface scale type. 1.1 (2014-05-17 23:30 UTC): Added scaling support for B9 Aerospace and Talisar's Cargo Transportation Solutions. Will now correctly load (some) save games using an older version of the plugin. 1.0 (2014-05-16 18:00 UTC): Initial Release! Supported Mods B9 Aerospace Cargo Transportation Solutions KW Rocketry NovaPunch 2 KSP Interstellar Kerbin Shuttle Orbiter System Kethane KOSMOS MechJeb Kerbal Aircraft eXpansion Spaceplane+ Stack eXTensions Kerbal Attachment System Lack Luster Labs Firespitter Taverio's Pizza and Aerospace Better RoveMates Sum Dum Heavy Industries Service Module System Near Future Technologies Deadly Reentry Continued Large Structural/Station Components Infernal Robotics USI Kolonization Systems (MKS/OKS) Klockheed Martian Special Parts Tantares Space Technologies Karbonite Modular Fuel Tanks Real Fuels KSPX RLA Stockalike Smart Parts Known Issues/TODO: More mods should be supported. I'm open to suggestions. Enlarged engines burn too hot. Exhaust trails are the wrong size. I think. Support for more modules (addons)? Suboptimal interactions with Procedural Parts and Procedural Fairings - parts may intersect after loading. I have no idea how FAR feels about the updating of drag and lift. Weird TWR in MechJeb. (ref post 22) Camera can end up in weird positions. (ref post 22) Add ModuleEngineConfig support. Do what Taverius says about engines and possibly other stuff. i made a real peice by peice module of the space shuttle but i need a arm so i added romafer but the arm was too big can you please please add romafer i tried to do it on my own but i just couldnt do it. or can some one please do it for me so i can have my space shuttle. when i can tweak the scale of the arm then i will post the shuttle. it can lift a lot and is really realistic.
  2. I CANT REVERT MY FLIGHT!!!! HELP!!! Email me at [email protected] to help
×
×
  • Create New...