Jump to content

[1.8.1 - 1.12.5] Interstellar Fuel Switch (IFS) 3.29.5


FreeThinker

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
Link to comment
Share on other sites

  • 3 weeks later...
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
Link to comment
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

Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
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...

Link to comment
Share on other sites

  • 2 weeks later...
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
}

 

Link to comment
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

 

Link to comment
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
Link to comment
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. :) 

Link to comment
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
Link to comment
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$

 

Link to comment
Share on other sites

  • 1 month later...
On 2/15/2019 at 5:33 AM, linuxgurugamer said:

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.

Besides being backwards compatible with FS, it new features are documented on the OP and a lot can also be learned from studying the example in IFS.

Link to comment
Share on other sites

  • 2 weeks later...

Version 3.7.1 is now available for KSP 1.3.1, 1.4.5, 1.5.1 and 1.6.1

Released on 2019-04-05

  • Renamed Hexcan Droptanks to Cylindrical Droptanks
  • Added NuclearSaltWater to Radioactive Cylindrical Droptank
  • Balance: Reduced Mass Radioactive Cylindrical Droptank
  • Balance: restored mass exponent Radioactive Storage container to cube
Link to comment
Share on other sites

MY 1.6.6 is telling me I need to update from 3.7.1-which I just downloaded to 3.8.3>>

[Log 14:24:08.5656132]: LocalInfo.Url: https://raw.githubusercontent.com/sswelm/KSP-Interstellar-Extended/master/GameData/InterstellarFuelSwitch/Plugins/InterstellarFuelSwitch.version,   www.text: {
    "NAME":"Interstellar Fuel Switch",
    "URL":"https://raw.githubusercontent.com/sswelm/KSP-Interstellar-Extended/master/GameData/InterstellarFuelSwitch/Plugins/InterstellarFuelSwitch.version",
    "DOWNLOAD":"http://forum.kerbalspaceprogram.com/index.php?/topic/106243-111-interstellar-fuel-switch-126-updated-30-4-2016-new-auto-mass-ratio-support/",
    "VERSION":
    {
        "MAJOR":3,
        "MINOR":8,
        "PATCH":0,
        "BUILD":3
    },
    "KSP_VERSION":
    {
        "MAJOR":1,
        "MINOR":6,
        "PATCH":1
    }
}
    NAME: Interstellar Fuel Switch
    URL: https://raw.githubusercontent.com/sswelm/KSP-Interstellar-Extended/master/GameData/InterstellarFuelSwitch/Plugins/InterstellarFuelSwitch.version
    DOWNLOAD: http://forum.kerbalspaceprogram.com/index.php?/topic/106243-111-interstellar-fuel-switch-126-updated-30-4-2016-new-auto-mass-ratio-support/
    GITHUB: NULL
    VERSION: 3.8.0.3
    KSP_VERSION: 1.6.1
    KSP_VERSION_MIN: NULL
    KSP_VERSION_MAX: NULL
    CompatibleKspVersion: True
    CompatibleKspVersionMin: True
    CompatibleKspVersionMax: True
    CompatibleGitHubVersion: True
    UpdateAvailable: False

the download url above brings me back to this main page

I am not sure if anyone else has this error

Jammer-TD

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...