FreeThinker

[1.3.1/1.4.5/1.5.1] Interstellar Fuel Switch (IFS) 3.6.16

Recommended Posts

Interstellar Fuel Switch (IFS) is meant for mod makers which want to add resource/mesh/texture switching to their tanks but it also applies a script to all stock Fuel tanks allowing you to switch between a few common resources

MTdkCg9.png

and more:

KSHVE9n.pngYNSpnKi.png

Interstellar Fuel Switch is an improved version of FSFuelSwitch, FSMeshSwitch and FSTextureSwitch, FSTextureSwitch2 made by Snjo.

Features:

  • - Improved persistence in VAB and in Flight
  • - Improved Multiple texture switching
  • - Improved Initialization
  • - Improved scaling with Tweakscale
  • - Improved in flight switching behavior
  • - Improved tank cost calculation which compensates for resource cost
  • - Improved integration with tech tree
  • - Improved GUI (switching between resouces)
  • - Improved Display (showing remaining resource in mass)
  • - Improved In flight switching (only allows switching after the tanks are empty and tech requirement are met)
  • - Improved Real Solar System support
  • - Improved stock LFO IFS  tanks

BFtjaFs.jpg

 

 

Download latest IFS version for KSP 1.5.1 (3.6.16.2) from Here

Download latest IFS version for KSP 1.4.5 (3.6.16.1) from Here

Download latest IFS version for KSP 1.3.1 (3.6.16.0) from Here

Download older versions from here

source: GitHub

Help

For clarification this is what a typical Interstellar Fuel Switch looks like

Spoiler
 

MODULE
{
    name = InterstellarFuelSwitch
    massExponent = 3
    volumeExponent = 3
    resourcesFormat = 0.0000
	tankSwitchNames = Ar; CO2; H; Kr; Ne; N; O; X; Life; Not
    resourceGui = Argon;CarbonDioxide;Hydrogen;Krypton;Neon;Nitrogen;Oxygen;Xenon;LifeSupport;Nothing
	resourceNames = ArgonGas;CarbonDioxide;Hydrogen;KryptonGas;NeonGas;Nitrogen;Oxygen;XenonGas;Oxygen,CarbonDioxide;Structural
	resourceAmounts = 224000;224000;224000;224000;224000;224000;224000;44800;112000,112000;0
	basePartMass = 0.1
	tankMass = 0;0;0;0;0;0;0.1;0;0;0.5
	baseResourceMassDivider = 9.1
	displayCurrentTankCost = false
	hasGUI = true
	availableInFlight = true
	availableInEditor = true
	inEditorSwitchingTechReq = fuelSystems
	inFlightSwitchingTechReq = specializedFuelStorage
	showInfo = true
}

 

 
 
 
 
 
 

Explanation of fields:

Spoiler

resourceNames: (required):specifies the names resources

tankSwitchNames the names of a tank that are visible in the switcher

orderBySwitchName  (optional default false) will order the tankSwitchNames in alphabetical order

resourceAmount: (required) specifies the amount of resource for a tank. (when multiple resource, separate them by a comma)

initialResourceAmounts  (optional) overides standard initialisation of the amount of resource a tank starts with

tanksMass: (optional) specifies the mass for each tank

massExponent (optional, default 3) overrides default mass scaling factor of exponent 3 when resizing with tweakscale

volumeExponent (optional default 3) overrides default volume scaling factor of exponent 3 when resizing with tweakscale

resourceGui (optional) allows your to give a name to the switch mode which will be visible in the part info screen

baseResourceMassDivider (optional) allows you add dry mass based on mass of full tank, effectively allowing you an easy way to maintain a fixed DryMass/WetMass ratio

overrideMassWithTankDividers  when true will use baseResourceMassDivider (when available)  to determine mass of a tank

showTankName (optional, default = true) allows you to hide tank name

nextTankSetupText (optional, default = "Next tank setup") allows you to override the Next tank button text

previousTankSetupText (optional, default = "Previous tank setup") allows you to override the Previous tank text

inEditorSwitchingTechReq specifies the tech at which switching becomes possible in the editor

inFlightSwitchingTechReq specifies the tech at which switching becomes possible in flight

showInfo (default = true) allows you to hide information about fuel switching in Info screen in VAB

hasGui(optional, default true )

displayTankCost (optional, default false) will make 3 fields visible that shows Tank cost, Resource Cost and Total Cost

resourcesFormat (optional, default 0.0000) allows you override the display precision of stored resource amounts

showSwitchButtons (optional, default false) will specify if a next and previous button will be visible (and active) when you are allowed to switch between tanks

canSwitchWithFullTanks (optional, default false) allows you to switch tanks even when they are not empty (<0.0001)

 

 

 
 
 
 
8

The latest release introduced a new Module named "AnimatedContainerContent":

	MODULE
	{
		name = AnimatedContainerContent	
		animationName = exampleAnim		// Name of the animation
		resourceName = Ore			// Name of the Resource to link with the animation
		animationExponent = 1			// Exponent. How is the animation related to the resource (normal 1; quadratic 2; qubic 3; ...)
		maximumRatio = 1			// How far does the animation play with the resource. (0.5: at 50% resource the animation is at the last frame.) 
	}

What does it?

This Module allows you to link an animation with the amount of stored resources on a part. Now we can visualize the tank-status directly on the model.

Details on how the resources are linked

Without the "resourceName" node defined all resources stored in the part will be taken into account, except resources without mass (EC, Megajoule). This is very usefull for tanks that hold 2 fuels at the same time or use FuelSwitch setups with lots of different setups.

Examples

One example is the IFS Inflatable Storage Tank that uses this module. As shown in the picture below, the spherical tank grows with the amount of stored Air. This is an example that uses "maximumRatio = 0.5". When the tank is half full, the sphere has reached its max volume (end of the animation) and filling the tank further is not animated anymore. To animate pressurized gas tanks for example.
ftynQoB.jpg

An example with bars indicating the amount of fuel can be found on most of the new tanks. You'll notice some blue (or red) little bars that show how much content the tank currently holds (blue=full, red=empty).
PnxyCfU.png

I hope this explanation is somewhat useful and you guys have as much fun with it as I did. Happy modding! :)

Credits

btn_donateCC_LG.gif

Original Source: Snjo

Programming: FreeThinker

Storage containers & Scripting: @Eleusis La Arwall

Retexturing: @silversliver

Inline Inflatable Liquid Cryo Tank: @SpaceMouse

Wrapper tank: @Enceos 

License:

88x31.png

Sourcecode: GitHub

Known Mods that make use of InterstellarFuelSwitch

If you which to use this in you mod, please include the InterstellarFuelSwitch Folder in your mod, and notify me.

Please leave a comment if you like it.

Support & Recommendations:

CKAN

PatchManager

 

Cangelog:

Spoiler

Version 3.6.2.1 for Kerbal Space Program 1.4.4

Released on 2018-07-30

  • Compiled against KSP 1.4.5
  • Fixed compatibility issue with Routine Mission Manager (credits WhiteSpaceKilla)
  • Fixed compatibility issue with Configurable Containers

Version 3.6.1 for Kerbal Space Program 1.4.4

Released on 2018-07-14

  • Compiled against KSP 1.4.4
  • Changed AVC reference file to GitHub

Version 2.9.1 for Kerbal Space Program 1.3.0

Released on 2017-09-10

  • Included Patchmanager 0.0.8 in download package
  • Added support for PatchManager (by @Eleusis La Arwall)
  • Added radial inflatable liquid tank (by @Eleusis La Arwall)
  • Added inline inflatable liquid tank (by @SpaceMouse)
  • Fixed missing HTP resource
  • Fixed missing resource definition for Spodumene

Version 2.8.2 for Kerbal Space Program 1.3.0

Released on 2017-09-09

  • Added empty PatchManager folder
  • 8 Added missing Spodumene resource

Version 2.8.1 for Kerbal Space Program 1.3.0

Released on 2017-08-27

  • Fixed Issue with switch buttons cluttering up VAB menu
  • Renamed InflatableStorageTank to AnimatedContainerContent
  • Disabled several obsolete parts
  • Fixed cluttering of context menu by auto converter

Version 2.8 for Kerbal Space Program 1.3.0

Released on 2017-08-27

  • Added a huge array of new tanks made by Eleusis La Arwall

    +4 Cargo Container (CC) [No mass or cost cost balance done] +5 Cryogenic Tank (CT) +1 Electric Capacitator +1 Pressurized Gas Tank (PGT) +3 Radioactive Fuel Container (RFC) +11 Cryogenic Dual Tank (CDT) +1 Inflatable Gas Tank

  • Fixed Switching fuel tank in Flight

  • Fixed Conversion between LqdXenon and XenonGas

Version 2.7.1 for Kerbal Space Program 1.3.0

Released on 2017-08-16

  • Updated CRP to 0.7.2
  • Fixed issue texture switch with applying the same texture to multiple objects

Version 2.7 for Kerbal Space Program 1.3.0

Released on 2017-08-15

  • Updated ModuleManager to 2.8.1
  • Added Ability of Texture Switcher to switch multiple texture at the same time

Version 2.6.1 for Kerbal Space Program 1.3.0

Released on 2017-06-04

  • Compiled against KSP 1.3
  • Updated CRP to 0.7.1
  • Updated Tweakscale to 2.3.6

Version 2.6.0 for Kerbal Space Program 1.3.0

Released on 2017-05-27

  • compiled against KSP 1.3
  • updated Tweakscale to KSP 1.3 compatible version
  • updated CRP to 0.7
  • moved resource fixes to plugin folder

Version 2.5.1 for Kerbal Space Program 1.2.2

Released on 2017-05-19

  • Fixed ability to switch propellant of wrapper tanks in editor

Version 2.5.0 for Kerbal Space Program 1.2.2

Released on 2017-04-30

  • Added in flight ChooseOption, allowing instant in flight tank switching when enabled in the config

 

Version 2.4.8 for Kerbal Space Program 1.2.2

Released on 2017-04-22

  • Added Switch interface will only show if there are more than 1 tanks available
  • Added Hydrolox and Methalox to Wrapper drop tanks

Version 2.4.7 for Kerbal Space Program 1.2.2

Released on 2017-04-15

  • Added missing resources to solid and cry storage tank
  • Fixed resource duplicating bug when copying a part
  • Fixed ability to switch resource when tank is empty while other nonswitchable resources are present
  • Fixed behavior auto converter for primary resource

Version 2.4.6 for Kerbal Space Program 1.2.2

Released on 2017-03-22

  • Added LqdCO2 to Generic IFS script
  • Added Fluorite to solid tank

 

Version 2.4.5 for Kerbal Space Program 1.2.2

Released on 2017-03-12

  • Added Decaborane, Thorium and Salt to Solid Container
  • Added more descriptive warning log message
  • Fixed Warning in the log

Version 2.4.4 for Kerbal Space Program 1.2.2

Released on 2017-03-07

  • Added Additional resources to Storage tanks
  • Added Super Capacitator which can convert automatically between ElectricCharge and MegaJoules

Version 2.4.3 for Kerbal Space Program 1.2.2

Released on 2017-02-23

  • Added Global script which applies tank switching between popular glasses to all xenon tanks
  • Added Global script which applies tank switching between popular liquid fuels to all liquid fuel tanks
  • Fixed: Global script will not Fuel Switch if ModuleTankManager is already present
  • Fixed If tank mass is undefined it will fall back on part prefab mass

Version 2.4.2 for Kerbal Space Program 1.2.2

Released on 2017-02-22

  • Added Maximum power and Transfer power cost to Interstellar Resource Conversion
  • Added equilibrium maintenance to Interstellar Resource Conversion, allow you to set a percentage which is actively maintained
  • Rebalanced power usage IFS Cryo tank

Version 2.4.1 for Kerbal Space Program 1.2.2

Released on 2017-02-19

  • Added Interstellar Resource Converters (a.k.a. Equilibrium) for all resource to IFS Cryogenic tanks
  • Added Switchable IF Pressurised Gas Tank
  • Added Fuel Tank Dry/Wet mass is now shown on a single line
  • Rebalanced mass ratios Cryogenic tanks
  • Removed lighting control (not functional)
  • Fixed default behavior Interstellar Resource Converters to configure target storage utilization instead of local resource utilization

Version 2.4.0 for Kerbal Space Program 1.2.2

Released on 2017-02-18

  • Added Interstellar Equilibrium module which allows automated conversion between 2 resources
  • Added Equilibrium to Cryotank for LqdXenon to XenonGas and LqdWater to Water
  • Added LqdXenon to Cryotank
  • Added LqdWater to Cryotank
  • Sorted resources in Cryotank alphabetically

Version 2.3.3 for Kerbal Space Program 1.2.2

Released on 2017-02-06

  • Updated CRP to 0.6.6
  • Added resource Caesium, Sodium, PVC and Regolith to switchable Solid Storage Tank

Version 2.3.2 for Kerbal Space Program 1.2.2

Released on 2016-12-29

  • Added wrapper tanks (un-powered)
  • Fixed mass scaling Revamped IFS Tanks (Fixing floating issue when scaled up)

Version 2.3.1 for Kerbal Space Program 1.2.2

Released on 2016-12-18

  • Fixed Tank Cost when resized
  • Updated CRP to 6.4
  • Included Tweakscale 2.3.3

Version 2.3 for Kerbal Space Program 1.2.2

Released on 2016-12-09

  • Updated to KSP 1.2.2
  • Updated Module Manager to 2.7.4
  • Fixed Negative Credits cost for empty tanks with expansive resource
  • Fixed Credits cost when resized

Version 2.2.9 for Kerbal Space Program 1.2.1

Released on 2016-11-20

  • Added ability to jettison all fuel in a container to all Fuel switches
  • Increased resource amount IFS storage container
  • Added PolyvinylChloride to IFS storage container

Version 2.2.8 for Kerbal Space Program 1.2.1

Released on 2016-11-09

  • Fix: disabled adaptiveTankSelection by default which was causing problems when an existing resource is present on the rank
  • Fix: disabled verbose Log messaging
  • Included Module Manager to 2.7.3

Version 2.2.7 for Kerbal Space Program 1.2.1

Released on 2016-11-03

  • Compiled against KSP 1.2.1
  • Added property adaptiveTankSelection (default true) which will ensure that similar tank selection is found when configuration tank name changes
  • Added missing descriptions for Cryogenic tanks

 

Version 2.2.6 for Kerbal Space Program 1.2

Released on 2016-10-23

  • Updated CRP to 0.6.2
  • Added: Initial tank will always have it original cost preserved
  • Balance: Given new IFS tanks more appropriate CTT Technode requirement

Version 2.2.5 for Kerbal Space Program 1.2

Released on 2016-10-20

  • Fixed Symmetric Part Switching
  • Updated MiniAVC to KSP 1.2 compatible version (which fixes exception in log))
  • Updated CRP to 0.6.1

Version 2.2.4 for Kerbal Space Program 1.2

Released on 2016-10-15

  • Fixed Double dry mass cost
  • Added Cryotank with double mesh tank switchers one for reducing agent and one for oxidizing agents
  • Addy switchable Cryotank with four times the volume of regular tank
  • Added LqdFluoride and LqdArgon to Cryo tanks
  • Added ability to connect a mesh switcher to a specific tank switcher
  • Added ability for a fuel switch to return dry mass only when requested for module mass
  • Script that add IFS to all LiquidFuel+Oxidizer tanks which now also display drat tank cost, resource cost and total cost.

Version 2.2.3 for Kerbal Space Program 1.2

Released on 2016-10-13

  • Compiled against KSP 1.2
  • When displayCurrentTankCost is true shows Dry Tank Cost, Resource Cost and Total Cost
  • Fixed Bug of Cost giving negative numbers
  • Added Oxygen-18, Nitrogen-15 and Fluorine to Cryogenic container
  • Fixed an issue where Mass ratio was not properly updated in the VAB the first time after switching
  • Fixed resource volume and mass ratio of new Cryogenic container
  • Includes Module Manager compatible with KSP 1.2

Version 2.1.4 for Kerbal Space Program 1.1.3

Released on 2016-07-29

  • Added Real Solar System support for IFS LFO tanks. which will increase mass ratios to SMURFF level
  • Added property tankResourceMassDividerAddition, which will add itself to ResourceMassDividerAddition to determine the tank mass fraction
  • Readded LqdHydrogen to IFS LFO tanks

Version 2.1.3 for Kerbal Space Program 1.1.3

Released on 2016-07-28

  • Hydrogen & Hydrolox will now only be included on stock tanks when KSPI-E is installed
  • Added boolean property overrideMassWithTankDividers which if set to true, will make the tankResourceMassDivider override all other mass modifiers.

Version 2.1.2 for Kerbal Space Program 1.1.3

Released on 2016-07-28

  • Fixed issues where sorted tank list would receive wrong custom mass and custom cost
  • When HasGui is true, it will stabilize the switch control when switching between tanks , making switching less cumbersome
  • For all parts affected by IFS Stock Script, replaced Structural by Oxidizer
  • For all parts affected by IFS Stock Script, sort tank in Alphabetical order
  • For all parts affected by IFS Stock Script, enabled HasGui, stabilizing switching in VAB

Version 2.1.1for Kerbal Space Program 1.1.3

Released on 2016-07-24

  • Added new property orderBySwitchName which if set true will order the TankSwitchName list in alphabetical order
  • Fixed misspelling of Structural in script

Version 2.1.0 for Kerbal Space Program 1.1.3

Released on 2016-07-01

  • Flow mode is now preserved
  • Initial tank selection now depends on initial resources on tank
  • Added IFS to Xenon tank which preserves stock balance
  • Re-balanced IFS demo tanks to preserve stock balance

Version 2.0.9 for Kerbal Space Program 1.1.3

Released on 2016-06-25

  • Fixed setting KSP version MiniAVC config file

Version 2.0.8 for Kerbal Space Program 1.1.3

Released on 2016-06-24

  • Compiled against KSP 1.1.3
  • Fixed mass changing when switching in flight with empty tank
  • Updated CRP to 0.5.4

Version 2.0.7 for Kerbal Space Program 1.1.2

Released on 2016-05-23

  • Fixed Issue with too high tank mass with non resized tanks and Tweakscale v2.2.12 installed
  • Fixed issue with tank Index showing in Flight
  • Updated CRP

Version 2.0.6 for Kerbal Space Program 1.1.2

Released on 2016-05-13

  • Fixed dependancy on KSPI-E

Version 2.0.5 for Kerbal Space Program 1.1.2

Released on 2016-05-12

  • Fixed compatibility with Tri fuel tanks
  • MM scripts adds Cryogenic maintenance and boil-off for LqdHydrogen when KSPI-E is installed

Version 2.0.4 for Kerbal Space Program 1.1.2

Released on 2016-05-10

  • Improved Part Info screen, added resource amount
  • Removed RF Hydrolox from MM script

Version 2.0.3 for Kerbal Space Program 1.1.2

Released on 2016-05-10

  • Fixed black screen when scaling down tanks
  • MM patch will not remove initial LFO tank resources
  • MM patch will leave tri state fuel tanks alone

Version 2.0.2 for Kerbal Space Program 1.1.2

Released on 2016-05-07

  • Fixed Tweakscale erros when switching size
  • Replace Button TextureSwitch by UI Switch Option
  • Added field hasSwitchChooseOption (for all part modules) which allows you to hide the UI Switch Option
  • Added field useTextureSwitchModule which allows your TextureSwitch to follow FuelSwitch part module

Version 2.0.1 for Kerbal Space Program 1.1.2

Released on 2016-05-07

  • Replaced Resource and Mesh Switch buttons by UIChooseOption , which requires less space and gives some indication how many switch options there are.
  • Added new field tankSwitchNames, which specifies the names displayed in the switcher (notice it length is limited)
  • Included Module Manager

Version 2.0.0 for Kerbal Space Program 1.1.2

Released on 2016-05-06

  • Added new field tankTechReq which specifies required tech
  • Added new field tankResourceMassDivider which specifies WetMass / DryMass ratio
  • Included a Module Manager script which (if installed) adds IFS to all LFO tanks that didn't contain any fuel switch already
  • floating point numbers are represented with 4 digits instead of 6

Version 1.30 for Kerbal Space Program 1.1.2

Released on 2016-05-04

  • Fixed exceptions while switching to Liquid Fuel in radially attached tanks

Version 1.29 for Kerbal Space Program 1.1.2

Released on 2016-05-02

  • re-Fixed floating problem when downsizing some tanks
  • Added 2 new properties: inEditorSwitchingTechReq and inFlightSwitchingTechReq which allows specifying the technology at which the ability to switch tanks becomes available

Version 1.26 for Kerbal Space Program 1.1.1

Released on 2016-04-30

  • Added new field visible in VAB : Mass Ratio which will display the effective DryMass to WetMass ratio.
  • Updated CRP to 0.5.1

Version 1.25 for Kerbal Space Program 1.1.1

Released on 2016-04-29

  • compiled agains KSP 1.1.1
  • Added new Feature: new property baseResourceMassDivider which allows easy configuration of DryMass/Wet Mass ratio. Drymass = basePartMass + tankMass + ((resource.MaxAmount * resource.density) / baseResourceMassDivider )

Version 1.24 for Kerbal Space Program 1.1

Released on 2016-04-24

  • Fixed mass of rescaled tanks while in the VAB , allowing tools like KER and Mechjeb to calculate Delata V more accurately
  • Will now correctly display Dry-mass, Wet-Mass and Total Mass in the VAB and in flight

Version 1.23 for Kerbal Space Program 1.1

Released on 2016-04-23

  • Fixed incorrect mass issue with dry mass getting higher than intended or lower which could result in floating

Version 1.22 for Kerbal Space Program 1.1

Released on 2016-04-22

  • Fixed Issue where IFS was generating negative mass, which could result in Anti-gravity/Floating effect and infinite Inertia

Version 1.21 for Kerbal Space Program 1.1

Released on 2016-04-19

  • Fixed Compatibility with KER and MechJeb

Version 1.20 for Kerbal Space Program 1.1

Released on 2016-04-16

  • Update to KSP 1.1.0.1209
  • Updated CRP to 0.5

Version 1.19 for Kerbal Space Program 1.1

Released on 2016-03-30

  • Updated to KSP 1.1
  • Updated CRP to 0.4.9

Version 1.17 for Kerbal Space Program 1.0.4

Released on 2015-09-28

  • Fixed the harmless error message "invalid float: tankCost [len:0]" during KSP startup
  • Shows empty mass during Flight

Version 1.16 for Kerbal Space Program 1.0.4

Released on 2015-09-12

  • Removed debug messages
  • Added better support for multi switch parts
  • Cleaned empty files and folders
  • Updated CRP to 0.4.4

 

Version 1.15 for Kerbal Space Program 1.0.4

Released on 2015-07-02

  • Fixed an issue where it would force activate other modules in the part where it is placed in (like engine modules)

 

Version 1.14 for Kerbal Space Program 1.0.4

Released on 2015-06-28

  • Fixed incorrect initialization after reload
  • Compiled with Tweakscale Version v2.2.1

 

Version 1.12 for Kerbal Space Program 1.0.4

Released on 2015-06-23

  • Recompile for KSP 1.0.4

 

Version 1.11 for Kerbal Space Program 1.0.2

Released on 2015-06-08

  • Fixed IFS in Root object not responding after creation
  • Fixed Initialization error messages
  • Added property which allows you to override resource formatting. Default format is 0.0000000

 

Version 1.10 for Kerbal Space Program 1.0.2

Released on 2015-06-07

 

  • Fixed part root problem when tankMass is missing
  • Fixed GUI for radial attached tanks

 

Version 1.8 for Kerbal Space Program 1.0.2

Released on 2015-06-06

 

  • Fixes the incorrect Dry mass representation after rescaling tanks with Tweakscale
  • Remove volumeMultiplier and massMultiplier properties which are now ignored

 

Version 1.7 for Kerbal Space Program 1.0.2

Released on 2015-06-01

 

  • All resources that are not mentioned in resourceNames are now automatically ignored when switching tanks (which means resourcesToIgnore has become obsolete)

 

Version 1.6 for Kerbal Space Program 1.0.2

Released on 2015-05-31

 

  • added property resourcesToIgnore, which allows InterstellarFuelSwitch to ignore specific resources

 

Version 1.5 for Kerbal Space Program 1.0.2

Released on 2015-05-25

 

  • Fixed problems caused by missing Scale_Redist.dll

 

Version 1.4 for Kerbal Space Program 1.0.2

Released on 2015-05-25

 

  • Integrated Tweakscale exponent scaling (it no longer need an tweakscale exponent definition, bitis still overrides when present)
  • added property volumeExponent to InterstellarFuelSwitch partmodule (default value 3)
  • added property massExponent to InterstellarFuelSwitch partmodule (default value 3)
  • Removed InterstellarFuelSwitch tweakscale configuration files (moved to KSPI Extended)
  • Updated bundled Community Resource Pack to 0.4.2
  • Interstellar Gas Tanks now depend on stock tweakscale stack and surface

 

Version 1.2 for Kerbal Space Program 1.0.2

Released on 2015-05-15

 

  • Added InterstellarTextureSwitch2 (which is similar to FStextureSwitch2
  • Added MiniAVC Version checking

 

Version 1.1 for Kerbal Space Program 1.0.2

Released on 2015-05-12

 

  • Fixed Debug Spam message in VAB

 

Version 1.0 for Kerbal Space Program 1.0.2

Released on 2015-05-10

 

  • NEW: Added Automatic tank cost calculation which will increase the cost of the tank based on resource unit cost and maximum resource storage amount
  • updated Community Resource Pack to 0.4.1
 
 
 
 
 
 

 

 

Edited by FreeThinker
  • Like 16

Share this post


Link to post
Share on other sites

Is this compatible with Firespitter? More to the point, if you're only using Firespitter for fuel switching, can you replace it with this mod and expect it to work?

Share this post


Link to post
Share on other sites
Is this compatible with Firespitter? More to the point, if you're only using Firespitter for fuel switching, can you replace it with this mod and expect it to work?

Yes, you can. It uses the same parameters, and introduces 3 additional parameters (see clarification in OP). So you only need to rename FSTweakScale to InterstellarTweakScale and optionally added the extra configuration values

Edited by FreeThinker
  • Like 1

Share this post


Link to post
Share on other sites

[h=2]Version 0.3 for Kerbal Space Program 1.0[/h] Released on 2015-04-30

  • Added InterstellarTextureSwitch which allows a part to switch its Texture
  • Added InterstellarMeshSwitch which allows a part to switch its Mesh

Share this post


Link to post
Share on other sites

Version 0.4 for Kerbal Space Program 1.0

Released on 2015-05-01

Fixed dll .net version to 3.5

Fixed spelling in name Module : InterstellarFuelSwitch instead of InsterstellarFuelSwitch (with extra s)

Edited by FreeThinker

Share this post


Link to post
Share on other sites

Hey FreeThinker, think I have found a bug.

Using a part with the following FuelSwitch code, which has many tanks and one non-tank part

MODULE

{

name = InterstellarFuelSwitch

resourceNames = Structural;LiquidFuel,Oxidizer;MonoPropellant,ElectricCharge;XenonGas;ArgonGas;LqdHydrogen;LqdHydrogen,Oxidizer

resourceAmounts = 0;1260,1540;1400,9600;112000;2320000;14000;12750,1275

basePartMass = 0.40

tankMass = 0.05;1.8;0.53;7.67;3.15;0.65;0.80

tankCost = 50;1964.4;16710;469850;30160;2367;3367

displayCurrentTankCost = true

hasGUI = False

}

When cycling through tank types, going to the Structural type from the LF/O or LH2/O type does not remove the resources correctly.

Share this post


Link to post
Share on other sites
Hey FreeThinker, think I have found a bug.

Using a part with the following FuelSwitch code, which has many tanks and one non-tank part

When cycling through tank types, going to the Structural type from the LF/O or LH2/O type does not remove the resources correctly.

I'm not sure, but I believe the structural part has come obsolete.

In the past it might have been useful to create empty tanks which could be filled at a later time. With the interstellar Fuel switch, you can simply empty a tank by removing the resources the regular way, so there would be no need to have a structural type.

But it might be useful if you want to force no storage at all and switch to when you want to fill it

- - - Updated - - -

[h=2]Version 0.5 for Kerbal Space Program 1.0[/h] Released on 2015-05-03

  • Fixed Switching to Structural configuration
  • Fixed mass scaling with Tweakscale

Edited by FreeThinker

Share this post


Link to post
Share on other sites

The Fuel Switch does not affect size Scaling except for Mass and Resource amount.

Share this post


Link to post
Share on other sites
The Fuel Switch does not affect size Scaling except for Mass and Resource amount.

Exactly. In the reported case the size is right and the resource amounts are wrong. This once worked with the old FSFuelSwitch, though I do not know exactly how. Can you tell what you changed to improve the interaction with TweakScale?

On the TweakScale side I don't find anything special treatment for resources. They are just configured to use relative scaling. So whenever a part is rescaled I look into the part (not the prefab) and scale whatever resources are there.

In the reported case of a scaled stock tank, I probably scale the original contents, and you overwrite them with the (unscaled) fuelSwitch values. So maybe something goes wrong with the scaling of these values, or they are read from the prefab instead of the part? (Just throwing some guesses into the room here)

I also see possible coflicts with mass and cost (if you manipulate it too). I guess it's best to test these once the resources work together.

Share this post


Link to post
Share on other sites

I thought about this, but people seem to forget to add the following 2 properties to the InterstelarFuelSwitch PartModule


volumeMultiplier = 1
massMultiplier = 1

and a Tweakscale exponent for InsterstellarFuelSwitch


TWEAKSCALEEXPONENTS
{
name = InterstellarFuelSwitch
volumeMultiplier = 3
massMultiplier = 2.5
}

Together they allow tweakscale to properly adjust the volume and mass of the tank when resizing.

I think I have a solution, we could add A little script (to Tweakscale) which will add these lines to every InterstellarFuelSwitch if it's missing, the TWEAKSCALEEXPONENTS should be added to Tweakscale exisitng list of exponents

Edited by FreeThinker

Share this post


Link to post
Share on other sites
I thought about this, but people seem to forget to add the following 2 properties to the InterstelarFuelSwitch PartModule


volumeMultiplier = 1
massMultiplier = 1

Is this needed? My understanding is that you can initialize those values with 1 in the declaration of the kspField in the c# source. When the module is loaded from a config node, each line in the config overrides the respective kspField. So you only need a config line if you want something different from the default.

TweakScale does not know about config nodes, it only knows kspFields inside partModules. For example it can scale maxFuelFlow which seems to be a kspField in the new engine modules, even if it does not appear in the part configs.

PS: now that I see the mass multiplier, you probably just overwrite my changes like with the resource nodes. So everything should work well.

- - - Updated - - -

FreeThinker has exceeded their stored private messages quota and cannot accept further messages until they clear some space.

I'll gladly add the exponent in the next TweakScale version. To avoid conflicting versions, I'll write up some MM patch so it doesn't show up twice if yours is present. It would be best if you keep it in your download for a while until the current version of TweakScale has become extinct.

Looking into your download I can see why people tend to throw away stuff they shouldn't. The fuelswitch download bundles a generic functionality for broad use (the fuelswitch module) with content that looks interstellar-specific (the resources and parts). If this is meant to be included in other mods, it would be cleaner to package only the minimum that everyone would need to include.

Edited by pellinor

Share this post


Link to post
Share on other sites

Did a quick test with the tanks from your download, and I think there is a bit more happening. The TWEAKSCALEEXPONENTS is there, also the multiplier config values are set, but I see all sorts of reverting (e.g. when changing fuel type of a scaled tank). So the problem is not people forgetting config lines.

Share this post


Link to post
Share on other sites
Did a quick test with the tanks from your download, and I think there is a bit more happening. The TWEAKSCALEEXPONENTS is there, also the multiplier config values are set, but I see all sorts of reverting (e.g. when changing fuel type of a scaled tank). So the problem is not people forgetting config lines.

note, there is a small speller error in the name of the TWEAKSCALEEXPONENTS, it's easy to overlook (an additional s)

- - - Updated - - -

[h=2]Version 0.7 for Kerbal Space Program 1.0.2[/h] Released on 2015-05-04

  • Dll Updated to KSP 1.0.2.
  • Fixed Tweakscale exponent having the wrong name
  • Attempt to add missing properties to all Parts containing InterstellarFuelSwitch

Edited by FreeThinker

Share this post


Link to post
Share on other sites
note, there is a small speller error in the name of the TWEAKSCALEEXPONENTS, it's easy to overlook (an additional s)

Wow, this one was hard to find. Now everything works as expected. I also tested removing the "mass/volumeMultiplier = 1" lines on the stack gas tank from the download, and it still works. So you don't need these lines because the fields are already initialized to 1.0 when the module is constructed.

Share this post


Link to post
Share on other sites
Wow, this one was hard to find. Now everything works as expected. I also tested removing the "mass/volumeMultiplier = 1" lines on the stack gas tank from the download, and it still works. So you don't need these lines because the fields are already initialized to 1.0 when the module is constructed.

Great to know Tweakscale changes public fields which get a default value. Still the TWEAKSCALEEXPONENT is needed to make it function. Will you add it Tweakscale exponents list, that way I can remove it from mine mods and always be sure it get's properly scaled when Tweakscale is used.

Share this post


Link to post
Share on other sites

Is it just me or are LF tanks not showing up in the editor when you filter for resources with IFS installed? Would it be possible to have all the tanks show their default contents in the parts list?

Share this post


Link to post
Share on other sites

Part Filter extension based on part resources, will not work, unless you put all possible resources in the part file.

Share this post


Link to post
Share on other sites
Great to know Tweakscale changes public fields which get a default value. Still the TWEAKSCALEEXPONENT is needed to make it function. Will you add it Tweakscale exponents list, that way I can remove it from mine mods and always be sure it get's properly scaled when Tweakscale is used.

I'll gladly add the exponent in the next TweakScale version. To avoid conflicting versions, I'll write up some MM patch so it doesn't show up twice if yours is present. It would be best if you keep it in your download for a while until the current version of TweakScale has become extinct. (I didn't respond to your pm because your inbox is/was full)

Share this post


Link to post
Share on other sites

Version 0.8 for Kerbal Space Program 1.0.2

Released on 2015-05-05

  • NEW: Will now display the mass of every stored resource

Q4lkjvP.jpg

Notice it displays the Mass of LqdHydrogen in ton while LqdOxygen is displayed in kg

Share this post


Link to post
Share on other sites

Thanks for pointing this out to me FreeThinker...

Can someone take a look at this cfg I put together for switching Stock Tanks between LFO/L/O?

I checked it and it works, I just want to make sure that I have numbers correct and I haven't forgotten anything that could be game changing or game breaking:

//Stock Fuel Switch Between LF,O;L;O
//
@PART[Size3LargeTank]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 6480,7920;12960;15840
basePartMass = 9
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[Size3MediumTank]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 3240,3960;6480;7920
basePartMass = 4.5
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[Size3SmallTank]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 1620,1980;3240;3960
basePartMass = 2.25
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[fuelTank3-2]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 2880,3520;5760;7040
basePartMass = 4
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[fuelTank1-2]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 1440,1760;2880;3520
basePartMass = 2
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[fuelTank2-2]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 720,880;1440;1760
basePartMass = 1
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[fuelTank4-2]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 360,440;720;880
basePartMass = 0.5
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[fuelTankSmallFlat]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 45,55;90;110
basePartMass = 0.0625
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[fuelTankSmall]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 90,110;180;220
basePartMass = 0.125
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[fuelTank]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 180,220;360;440
basePartMass = 0.25
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[fuelTank_long]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 360,440;720;880
basePartMass = 0.5
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[toroidalFuelTank]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 27,33;54;66
basePartMass = 0.0375
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[miniFuelTank]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 18,22;36;44
basePartMass = 0.025
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[mk2_1m_Bicoupler]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 180,220;360;440
basePartMass = 0.29
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[mk2_1m_AdapterLong]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 360,440;720;880
basePartMass = 0.57
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[mk2SpacePlaneAdapter]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 180,220;360;440
basePartMass = 0.29
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[adapterMk3-Mk2]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 900,1100;1800;2200
basePartMass = 1.43
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[adapterMk3-Size2]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 1125,1375;2250;2750
basePartMass = 1.79
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[adapterMk3-Size2Slant]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 1125,1375;2250;2750
basePartMass = 1.79
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[adapterSize2-Mk2]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 360,440;720;880
basePartMass = 0.57
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[adapterSize2-Size1]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 360,440;720;880
basePartMass = 0.57
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[adapterSize2-Size1Slant]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 360,440;720;880
basePartMass = 0.57
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}
@PART[adapterSize3-Mk3]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
resourceAmounts = 1125,1375;2250;2750
basePartMass = 1.79
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}

Share this post


Link to post
Share on other sites

A bit boring, but everything looks fine.

I would personally remove the "," in the GuiNames , instead replace is with a space or "/" or think of a better name like LFO

EDIT: by the way, notice is will by default Display its full name with Fuel mass in ton/kg/g

Edited by FreeThinker

Share this post


Link to post
Share on other sites

@FreeThinker Can InterstellarMeshSwitch be used to mirror wings? Is there an example config for that?

P.S. Have you taken a peek into the texture switching of stock fairings?

Share this post


Link to post
Share on other sites
@FreeThinker Can InterstellarMeshSwitch be used to mirror wings? Is there an example config for that?

P.S. Have you taken a peek into the texture switching of stock fairings?

Sorry, I don't now what you talking about. This is a Fuel Tank Mod, not a wings mod. Perhaps it could switch the mesh to something that resembles a a wing or something.

Share this post


Link to post
Share on other sites
A bit boring, but everything looks fine.

I would personally remove the "," in the GuiNames , instead replace is with a space or "/" or think of a better name like LFO

EDIT: by the way, notice is will by default Display its full name with Fuel mass in ton/kg/g

OK it's still boring, but I did 'spice it up' a little, I like the idea of being able to have empty tanks, wonder if I can set them to accept ore as well? (Trying to keep it as Stock as possible)

@PART[Size3LargeTank]
{
MODULE
{
name = InterstellarFuelSwitch
resourceGui = LFO;Liquid Fuel;Oxidizer;Empty
resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer;Structural
resourceAmounts = 6480,7920;12960;15840;0
basePartMass = 9
volumeMultiplier = 1
massMultiplier = 1
displayCurrentTankCost = true
hasGUI = true
availableInFlight = true
availableInEditor = true
showInfo = true
}
}

One thing I did notice, the cost of the tank in Career mode does not change, no matter which resource is in it, even if it's empty. Can I add something here to account for that?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now