FreeThinker

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

Recommended Posts

9 minutes ago, FreeThinker said:

simply using a random id should fix it

Don't forget to take into account

  • when vessels dock, they still conflict

ofc when planning and building a vessel, action groups should be carefully added to vessels, so they don't conflict when two vessels dock.

The info popup messages could follow kinda same logic, so when the lines 1- 5 are used in vessel A and the lines 6 - 9 are used in vessel B, they could be merged on docking, so only one page of info popup is shown with lines 1 - 9 properly filled.
After undocking the two vessels should revert to show lines 1- 5 / 6 - 9 then.

If the lines conflict, it would be great to have switchable pages with the caption derived from the vessel naming priority (the vessel name).

Edited by Gordon Dry

Share this post


Link to post
Share on other sites

Does anybody have a patch which will update any tank that has LF/Ox to be able to switch between the following:

  • LF/Ox only
  • LF
  • Monoprop

Thanks in advance

Share this post


Link to post
Share on other sites
On 12/17/2018 at 5:53 AM, linuxgurugamer said:

Does anybody have a patch which will update any tank that has LF/Ox to be able to switch between the following:

  • LF/Ox only
  • LF
  • Monoprop

Thanks in advance

Well here is a striped down version of the script IFS uses

@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!RESOURCE[MonoPropellant],!MODULE[ModuleTankManager],!MODULE[InterstellarFuelSwitch],!MODULE[FSfuelSwitch],!MODULE[ModuleB9PartSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines]]:NEEDS[InterstellarFuelSwitch&!CryoTanks&!ModularFuelTanks&!RealFuels&!ConfigurableContainers]:FOR[InterstellarFuelSwitch]
{
	%LF = #$RESOURCE[LiquidFuel]/maxAmount$
	%OX = #$RESOURCE[Oxidizer]/maxAmount$

	%totalCap = #$RESOURCE[LiquidFuel]/maxAmount$
	@totalCap += #$RESOURCE[Oxidizer]/maxAmount$
	
	MODULE
	{
		name = InterstellarFuelSwitch
		tankSwitchNames = LFO;LiquidFuel;MonoProp
		resourceGui = LiquidFuel+Oxidizer;LiquidFuel;MonoPropellant
		resourceNames = LiquidFuel,Oxidizer;LiquidFuel;MonoPropellant
		resourceAmounts = #$../LF$,$../OX$;$../totalCap$;$../totalCap$
		tankTechReq = start;start;start;advFuelSystems
		tankResourceMassDivider = 8;8;6.66666666666
		adaptiveTankSelection = false
		orderBySwitchName = true
		displayTankCost = true		
		hasGUI = false
	}
}


@PART[*]:HAS[@RESOURCE[LiquidFuel],RESOURCE[Oxidizer],MODULE[InterstellarFuelSwitch]]:FINAL
{
	// Remove temporary variables to eliminate log spam
	!LF = 0
	!OX = 0
	!totalCap = 0
}

 

Edited by FreeThinker
  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, FreeThinker said:

Well here is a striped down version of the script IFS uses


@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!RESOURCE[MonoPropellant],!MODULE[ModuleTankManager],!MODULE[InterstellarFuelSwitch],!MODULE[FSfuelSwitch],!MODULE[ModuleB9PartSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines]]:NEEDS[InterstellarFuelSwitch&!CryoTanks&!ModularFuelTanks&!RealFuels&!ConfigurableContainers]:FOR[InterstellarFuelSwitch]
{
	%LF = #$RESOURCE[LiquidFuel]/maxAmount$
	%OX = #$RESOURCE[Oxidizer]/maxAmount$

	%totalCap = #$RESOURCE[LiquidFuel]/maxAmount$
	@totalCap += #$RESOURCE[Oxidizer]/maxAmount$
	
	MODULE
	{
		name = InterstellarFuelSwitch
		tankSwitchNames = LFO;LiquidFuel;MonoProp
		resourceGui = LiquidFuel+Oxidizer;LiquidFuel;MonoPropellant
		resourceNames = LiquidFuel,Oxidizer;LiquidFuel;MonoPropellant
		resourceAmounts = #$../LF$,$../OX$;$../totalCap$;$../totalCap$
		tankTechReq = start;start;start;advFuelSystems
		tankResourceMassDivider = 8;8;6.66666666666
		adaptiveTankSelection = false
		orderBySwitchName = true
		displayTankCost = true		
		hasGUI = false
	}
}


@PART[*]:HAS[@RESOURCE[LiquidFuel],RESOURCE[Oxidizer],MODULE[InterstellarFuelSwitch]]:FINAL
{
	// Remove temporary variables to eliminate log spam
	!LF = 0
	!OX = 0
	!totalCap = 0
}

 

Thank you

You dont need the FOR in it, actually it can cause problems

  • Like 1

Share this post


Link to post
Share on other sites
 

Download Version 3.6.17 now available for KSP 1.3.1, KSP 1.4.5 , KSP 1.5.1 and KSP 1.6.0

Released on 2018-12-20

  • Added IFSinfoPopup PartModule with support for multiple instances
  • Added Uranium-233 as config to Radio active storage container
  • Fixed Radio active storage container mass ratios
Edited by FreeThinker
  • Like 1

Share this post


Link to post
Share on other sites
@Gordon Dry I added IFSinfoPopup  which function exactly like FSinfoPopup, except it will persists its window position, can handle multiple instances and the InfoButton is always visible and allows disabling the associated window. Let me know if it works as desired
Edited by FreeThinker
  • Like 1

Share this post


Link to post
Share on other sites

You did updated it? because i have it installed in CKAN but i can't switch fuels.

 

Share this post


Link to post
Share on other sites

IFS with KSP 1.6 has the same bug as RealChute, KER and Surface Lights.  Some of your parts .cfg are missing the bulkheadProfiles parameter and that causes the VAB part selector to freeze.  New in KSP 1.6, it attempts to reference a null result when that property is lacking.

 

https://github.com/StupidChris/RealChute/issues/82

https://github.com/jrbudda/KerbalEngineer/issues/34

https://github.com/ihsoft/SurfaceLights/issues/16

 

I'm wondering if someone can write a mod that will MM inject this parameter on load, maybe default to srf, when mod authors leave it out of their parts.

  • Like 1

Share this post


Link to post
Share on other sites

Trying to work out why my tanks have no contents (a few do like mono prop and a few others). Is this a current recognised problem? Is it something to do with above?

Running most up to date KSP and most up to date mods. Have plenty of mods so difficult to know where to start. If there’s any known conflicts somebody could point out  that I’ve overlooked in my searching that’ll save me going through methodically uninstalling and reinstalling mods individually, I’d be very grateful.. I did see something a while back around this issue but I can’t for the life of me find it.

it otherwise loads fine, but it makes it really difficult to launch without fuel!

Thanks in advance for any help...

Share this post


Link to post
Share on other sites

Is there a mod that enables fuel chosing  in all the tanks ? I instlled this mod but i can't change fuels in any of teh tanks....  Am i missing something?

1.6.1

Edited by Nicky21

Share this post


Link to post
Share on other sites
On 1/8/2019 at 10:04 PM, mlheur said:

IFS with KSP 1.6 has the same bug as RealChute, KER and Surface Lights.  Some of your parts .cfg are missing the bulkheadProfiles parameter and that causes the VAB part selector to freeze.  New in KSP 1.6, it attempts to reference a null result when that property is lacking.

I'm wondering if someone can write a mod that will MM inject this parameter on load, maybe default to srf, when mod authors leave it out of their parts.

Perhaps something like this:

// Add bulkheadProfiles to parts that don't have it
@PART[*]:HAS[~bulkheadProfiles[]]:Final
{
    bulkheadProfiles = srf
}

 

  • Like 1

Share this post


Link to post
Share on other sites

Hi @FreeThinker I'm getting a number of errors in the KSP.log from type mismatches.  In a number of the MM patches the moduleID field has a string like moduleID = IFSCCmeshSwitcher.  In the error log it says it is expecting an integer.  Quick check of the code shows that moduleID is defined sometimes as a string and sometimes as an integer, but I could easily be misunderstanding what's going on.  I hope that's helpful.  :)Thank you for the mods.

 

snippet from the KSP.log (no errors in the output_log):


[LOG 00:05:24.217] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2502/CT2502' has no database record. Creating.
[LOG 00:05:24.222] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2503/CT2503'
[ERR 00:05:24.246] Invalid integer value! Field moduleID, value IFSCTmeshSwitcher on object of type InterstellarFuelSwitch.InterstellarMeshSwitch

[LOG 00:05:24.374] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2503/CT2503' has no database record. Creating.
[LOG 00:05:24.379] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2504/CT2504'
[ERR 00:05:24.404] Invalid integer value! Field moduleID, value IFSCTmeshSwitcher on object of type InterstellarFuelSwitch.InterstellarMeshSwitch

[LOG 00:05:24.487] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2504/CT2504' has no database record. Creating.
[LOG 00:05:24.492] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2501/EC2501'
[LOG 00:05:24.516] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2501/EC2501' has no database record. Creating.
[LOG 00:05:24.520] DragCubeSystem: Creating drag cubes for part 'EC2501'
[LOG 00:05:24.546] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2502/EC2502'
[LOG 00:05:24.567] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2502/EC2502' has no database record. Creating.
[LOG 00:05:24.572] DragCubeSystem: Creating drag cubes for part 'EC2502'
[LOG 00:05:24.598] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2503/EC2503'
[LOG 00:05:24.618] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2503/EC2503' has no database record. Creating.
[LOG 00:05:24.623] DragCubeSystem: Creating drag cubes for part 'EC2503'
[LOG 00:05:24.645] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/IST2501gas/IST2501gas'
[ERR 00:05:24.653] Invalid integer value! Field moduleID, value IFSISTGmeshSwitcher on object of type InterstellarFuelSwitch.InterstellarMeshSwitch

[LOG 00:05:24.670] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/IST2501gas/IST2501gas' has no database record. Creating.
[LOG 00:05:24.678] DragCubeSystem: Creating drag cubes for part 'IST2501gas'
[LOG 00:05:24.708] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/IST2501lqd/IST2501lqd'
[ERR 00:05:24.716] Invalid integer value! Field moduleID, value IFSISTLmeshSwitcher on object of type InterstellarFuelSwitch.InterstellarMeshSwitch

 

  • Like 1

Share this post


Link to post
Share on other sites
On 1/31/2019 at 5:23 AM, Tig said:

Hi @FreeThinker I'm getting a number of errors in the KSP.log from type mismatches.  In a number of the MM patches the moduleID field has a string like moduleID = IFSCCmeshSwitcher.  In the error log it says it is expecting an integer.  Quick check of the code shows that moduleID is defined sometimes as a string and sometimes as an integer, but I could easily be misunderstanding what's going on.  I hope that's helpful.  :)Thank you for the mods.

 


snippet from the KSP.log (no errors in the output_log):


[LOG 00:05:24.217] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2502/CT2502' has no database record. Creating.
[LOG 00:05:24.222] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2503/CT2503'
[ERR 00:05:24.246] Invalid integer value! Field moduleID, value IFSCTmeshSwitcher on object of type InterstellarFuelSwitch.InterstellarMeshSwitch

[LOG 00:05:24.374] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2503/CT2503' has no database record. Creating.
[LOG 00:05:24.379] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2504/CT2504'
[ERR 00:05:24.404] Invalid integer value! Field moduleID, value IFSCTmeshSwitcher on object of type InterstellarFuelSwitch.InterstellarMeshSwitch

[LOG 00:05:24.487] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/CT2504/CT2504' has no database record. Creating.
[LOG 00:05:24.492] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2501/EC2501'
[LOG 00:05:24.516] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2501/EC2501' has no database record. Creating.
[LOG 00:05:24.520] DragCubeSystem: Creating drag cubes for part 'EC2501'
[LOG 00:05:24.546] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2502/EC2502'
[LOG 00:05:24.567] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2502/EC2502' has no database record. Creating.
[LOG 00:05:24.572] DragCubeSystem: Creating drag cubes for part 'EC2502'
[LOG 00:05:24.598] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2503/EC2503'
[LOG 00:05:24.618] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/EC2503/EC2503' has no database record. Creating.
[LOG 00:05:24.623] DragCubeSystem: Creating drag cubes for part 'EC2503'
[LOG 00:05:24.645] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/IST2501gas/IST2501gas'
[ERR 00:05:24.653] Invalid integer value! Field moduleID, value IFSISTGmeshSwitcher on object of type InterstellarFuelSwitch.InterstellarMeshSwitch

[LOG 00:05:24.670] PartLoader: Part 'InterstellarFuelSwitch/Parts/TankRevamp/IST2501gas/IST2501gas' has no database record. Creating.
[LOG 00:05:24.678] DragCubeSystem: Creating drag cubes for part 'IST2501gas'
[LOG 00:05:24.708] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/TankRevamp/IST2501lqd/IST2501lqd'
[ERR 00:05:24.716] Invalid integer value! Field moduleID, value IFSISTLmeshSwitcher on object of type InterstellarFuelSwitch.InterstellarMeshSwitch

 

Its not real problem besides alarming players inspecting their error log for problem. But I will try to resolve it.

Edited by FreeThinker
  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, FreeThinker said:

Its not real problem besides alarming players expecting their error log. But I will try to resolve it.

Thank you for letting me know.  Sometimes its hard to tell with kerbal's errors whether or not they are truly an issue.. especially with more complex mods. :) 

Share this post


Link to post
Share on other sites
On 1/31/2019 at 8:15 AM, FreeThinker said:

Its not real problem besides alarming players inspecting their error log for problem. But I will try to resolve it.

This is why ModuleManager is throwing like 50+ errors related to IFS? Because that part is kind of obvious lol

Edit: lol never mind, no it's not - I launched my wrong version of KSP.

Edited by Frostiken

Share this post


Link to post
Share on other sites

TheWholeThreadIsWhatMatters.png

 

 

hmmmm

[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key objectDisplayNames = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key defaultTank = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[LOG 2019-02-10 11:01:09.917] Applying update InterstellarFuelSwitch/Patches/IFSCTmodular/@PART[CT250?]:HAS[@RESOURCE[LiterVolume]]:FOR[IFS010] to InterstellarFuelSwitch/Parts/TankRevamp/CT2501.cfg/PART
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key objectDisplayNames = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key defaultTank = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[LOG 2019-02-10 11:01:09.917] Applying update InterstellarFuelSwitch/Patches/IFSCTmodular/@PART[CT250?]:HAS[@RESOURCE[LiterVolume]]:FOR[IFS010] to InterstellarFuelSwitch/Parts/TankRevamp/CT2502.cfg/PART
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key objectDisplayNames = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key defaultTank = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[LOG 2019-02-10 11:01:09.917] Applying update InterstellarFuelSwitch/Patches/IFSCTmodular/@PART[CT250?]:HAS[@RESOURCE[LiterVolume]]:FOR[IFS010] to InterstellarFuelSwitch/Parts/TankRevamp/CT2503.cfg/PART
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key objectDisplayNames = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key defaultTank = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[LOG 2019-02-10 11:01:09.917] Applying update InterstellarFuelSwitch/Patches/IFSCTmodular/@PART[CT250?]:HAS[@RESOURCE[LiterVolume]]:FOR[IFS010] to InterstellarFuelSwitch/Parts/TankRevamp/CT2504.cfg/PART
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key objectDisplayNames = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key defaultTank = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[LOG 2019-02-10 11:01:09.917] Applying update InterstellarFuelSwitch/Patches/IFSISTLmodular/@PART[IST250?lqd]:HAS[@RESOURCE[LiterVolume]]:FOR[IFS010] to InterstellarFuelSwitch/Parts/TankRevamp/IST2501lqd.cfg/PART
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key objectDisplayNames = #$@RESOURCE_DEFINITION[LqdHydrogen]/displayName$
[LOG 2019-02-10 11:01:09.917] Applying update InterstellarFuelSwitch/Patches/IFSPGTmodular/@PART[PGT250?]:HAS[@RESOURCE[LiterVolume]]:FOR[IFS010] to InterstellarFuelSwitch/Parts/TankRevamp/PGT2501.cfg/PART
[WRN 2019-02-10 11:01:09.917] Cannot find key displayName in RESOURCE_DEFINITION
[ERR 2019-02-10 11:01:09.917] Error - Cannot parse variable search when inserting new key objectDisplayNames = #$@RESOURCE_DEFINITION[Hydrogen]/displayName$

 

Share this post


Link to post
Share on other sites

I am thinking of changing a mod from using FStextureSwitch2 and FSfuelSwitch to using the IFS equivilents.  But I can't find any good documentation, the wiki talks about KSPIE.

A pointer to some good descriptions would be appreciated.

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