Jump to content

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


FreeThinker

Recommended Posts

On 5/7/2016 at 11:32 PM, Deimos Rast said:

Look at the numbers down the right hand side...

 

Speaking of those numbers, how did you get IFS to display those values for the switchable resources? Mine looks like this:

41KcDtb.png

Link to comment
Share on other sites

4 hours ago, WildLynx said:

2.0.2 have version file stating 2.0.1

I can confirm this bug exists as described. The InterstellarFuelSwitch.dll shipped with 2.0.2 checks out as being 2.0.2 according to it's file details.

The file "InterstellarFuelSwitch.version" disagrees with this, claiming that the addon is v2.0.1

It's an easy thing to miss, especially when two updates come out in relatively rapid succession.

The fix should be obvious to most anyone who knows a little about what they're doing and opens the .version file. I've already fixed it on my end.

(If you need a tip, it involves changing a "1" to a "2").

Edited by SciMan
Link to comment
Share on other sites

4 hours ago, Kiro said:

I'm using the tri-tank built by TheMorris. It normally has LF+Ox+Mono in the tanks, but with Interstellar Fuel Switch installed it now only cycles through the default tank states and has no option for the default tri-tank state. Any recommendations for a MM patch or code I can throw in to make this work?

 

Update the MM script in IntegrateInterstellarFuelSwitch.cfg

 

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

	%totalCap = #$RESOURCE[LiquidFuel]/maxAmount$
	@totalCap += #$RESOURCE[Oxidizer]/maxAmount$

	%onlyLH2 = #$totalCap$
	@onlyLH2 *= 5

	%REALmixOX = #$onlyLH2$
	@REALmixOX *= 0.27143861
	%REALmixLH2 = #$onlyLH2$
	@REALmixLH2 -= #$REALmixOX$

	%LANTRmixOX = #$onlyLH2$
	@LANTRmixOX /= 5
	%LANTRmixLH2 = #$onlyLH2$
	@LANTRmixLH2 -= #$LANTRmixOX$
	
	MODULE
	{
		name = InterstellarFuelSwitch
		tankSwitchNames = LF+OX;LiquidFuel;MonoPropel;XenonGas;RF Hydrolox;LqdHydrogen;LANTR Hydrolox;Stuctural
		resourceGui = LiquidFuel+Oxidizer;LiquidFuel;MonoPropellant;XenonGas;RealFuel Hydrolox;LqdHydrogen;LANTR Hydrolox;Stuctural
		resourceNames = LiquidFuel,Oxidizer;LiquidFuel;MonoPropellant;XenonGas;LqdHydrogen,LqdOxygen;LqdHydrogen;LqdHydrogen,LqdOxygen;Stuctural
		resourceAmounts = #$../LF$,$../OX$;$../totalCap$;$../totalCap$;$../totalCap$;$../REALmixLH2$,$../REALmixOX$;$../onlyLH2$;$../LANTRmixLH2$,$../LANTRmixOX$;0
		tankTechReq = start;start;advFuelSystems;ionPropulsion;heavyRocketry;nuclearPropulsion;improvedNuclearPropulsion
		inFlightSwitchingTechReq = specializedFuelStorage
		tankResourceMassDivider = 8;8;6.66666666666;1.272727272727;8;8;8
	}

	!RESOURCE[LiquidFuel] {}
	!RESOURCE[Oxidizer] {}
}
@PART[*]:FINAL
{
	// Remove temporary variables to eliminate log spam
	!LF = 0
	!OX = 0
	!totalCap = 0
	!onlyLH2 = 0
	!REALmixOX
	!REALmixLH2
	!LANTRmixOX
	!LANTRmixLH2
}

This should skip any tanks tri tanks

Edited by FreeThinker
Link to comment
Share on other sites

2 hours ago, Gorby1 said:

 

Speaking of those numbers, how did you get IFS to display those values for the switchable resources? Mine looks like this:

41KcDtb.png

I can 2nd this. Its effectively killed my game as engines wont fire without fuel..... any help will be greatly appreciated. 

Link to comment
Share on other sites

2 hours ago, KocLobster said:

+1 .version file is incorrectly marked as 2.0.1

Not a big deal though people, the mod itself is clearly 2.0.2. It's just a simple omission.

At first I thought that was the problem. Not sure if IFS or CCC is causing this problem.

iupEZOU.png

Edit: Nevermind. CCC wasn't updated. Just pretend I'm not here. :P

Edited by Kuansenhama
Link to comment
Share on other sites

1 hour ago, millionaireman said:

I can 2nd this. Its effectively killed my game as engines wont fire without fuel..... any help will be greatly appreciated. 

To be more clear; the tanks have fuel and are working fine (for me) but I was wondering if there's a way to display, in the editor info screen, the amount of fuel in each tank type available.

Link to comment
Share on other sites

On 5/7/2016 at 3:27 PM, FreeThinker said:

@cfdsPerhaps you should take a look at a improved version of Fuel Tank Plus MM script for radial tanks

  Hide contents


@PART[TPtankR??]:NEEDS[Firespitter|InterstellarFuelSwitch&!CryoTanks&!ModularFuelTanks&!RealFuels]:AFTER[FuelTanksPlus]
{
	MODULE
	{
		name:NEEDS[!InterstellarFuelSwitch] = FStextureSwitch2
		name:NEEDS[InterstellarFuelSwitch] = InterstellarTextureSwitch2
		textureRootFolder = FuelTanksPlus/Radial/
		textureNames = TPtankR-rimGold-Specular;TPtankR-rimBlack-Specular;TPtankR-rimRed-Specular;TPtankR-rimBlue-Specular
		textureDisplayNames = MonoPropellant;LF+OX;LiquidFuel;Oxidizer
		useFuelSwitchModule = true
		fuelTankSetups = 0; 1; 2; 3
		objectNames = TPtankR-rim
		nextButtonText = Next Variant
		prevButtonText = Previous Variant
		statusText = Current Variant
		hasSwitchChooseOption:NEEDS[InterstellarFuelSwitch] = false
	}
}

@PART[TPtankR01]:NEEDS[Firespitter|InterstellarFuelSwitch&!CryoTanks&!ModularFuelTanks&!RealFuels]:AFTER[FuelTanksPlus]
{
	MODULE
	{
		name:NEEDS[!InterstellarFuelSwitch] = FSfuelSwitch
		name:NEEDS[InterstellarFuelSwitch] = InterstellarFuelSwitch
		tankSwitchNames:NEEDS[InterstellarFuelSwitch] = MonoPropellant;LF+OX;LiquidFuel;Oxidizer
		resourceNames = MonoPropellant;LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
		resourceAmounts = 125;45,55;90;110
		tankMass = 0.125;0.035;0.035;0.035
		basePartMass = 0.0
		displayCurrentTankCost = true
		hasGUI = false
		availableInFlight = false
		availableInEditor = true
		showInfo = false
		useTextureSwitchModule:NEEDS[InterstellarFuelSwitch] = true
	}
}

@PART[TPtankR02]:NEEDS[Firespitter|InterstellarFuelSwitch&!CryoTanks&!ModularFuelTanks&!RealFuels]:AFTER[FuelTanksPlus]
{
	MODULE
	{
		name:NEEDS[!InterstellarFuelSwitch] = FSfuelSwitch
		name:NEEDS[InterstellarFuelSwitch] = InterstellarFuelSwitch
		tankSwitchNames:NEEDS[InterstellarFuelSwitch] = MonoPropellant;LF+OX;LiquidFuel;Oxidizer
		resourceNames = MonoPropellant;LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
		resourceAmounts = 250;90,110;180;220
		tankMass = 0.25;0.0625;0.0625;0.0625
		basePartMass = 0.0
		displayCurrentTankCost = true
		hasGUI = false
		availableInFlight = false
		availableInEditor = true
		showInfo = false
		useTextureSwitchModule:NEEDS[InterstellarFuelSwitch] = true
	}
}

@PART[TPtankR03]:NEEDS[Firespitter|InterstellarFuelSwitch&!CryoTanks&!ModularFuelTanks&!RealFuels]:AFTER[FuelTanksPlus]
{
	MODULE
	{
		name:NEEDS[!InterstellarFuelSwitch] = FSfuelSwitch
		name:NEEDS[InterstellarFuelSwitch] = InterstellarFuelSwitch
		tankSwitchNames:NEEDS[InterstellarFuelSwitch] = MonoPropellant;LF+OX;LiquidFuel;Oxidizer
		resourceNames = MonoPropellant;LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
		resourceAmounts = 600;180,220;360;440
		tankMass = 0.6;0.125;0.125;0.125
		basePartMass = 0.0
		displayCurrentTankCost = true
		hasGUI = false
		availableInFlight = false
		availableInEditor = true
		showInfo = false
		useTextureSwitchModule:NEEDS[InterstellarFuelSwitch] = true
	}
}

 

If you study it, it Should teach you how to use texture switch yourself

@FreeThinker I came to the thread to find info on this same thing, and luckily found this post...
Its funny, because I had already grabbed the patches from FTP to reverse engineer... :)

However, am I reading this correctly, that it checks for either the FS switch, or the IFS switch, then applies whichever plugin it finds is present?
If thats the case, I'm assuming the above values are all for the IFS switch... So where would the FS switch values go?... I dont see them in any of the patches... I see where the B9PartSwitch nodes are, but nothing for FS?

Link to comment
Share on other sites

37 minutes ago, Stone Blue said:

@FreeThinker I came to the thread to find info on this same thing, and luckily found this post...
Its funny, because I had already grabbed the patches from FTP to reverse engineer... :)

However, am I reading this correctly, that it checks for either the FS switch, or the IFS switch, then applies whichever plugin it finds is present?
If thats the case, I'm assuming the above values are all for the IFS switch... So where would the FS switch values go?... I dont see them in any of the patches... I see where the B9PartSwitch nodes are, but nothing for FS?

IFS is backwards compatible with FS, it offers additional fields which let's you fine tune it. Most properties are hidden and get a default value when not specified

Edited by FreeThinker
Link to comment
Share on other sites

7 hours ago, Gorby1 said:

To be more clear; the tanks have fuel and are working fine (for me) but I was wondering if there's a way to display, in the editor info screen, the amount of fuel in each tank type available.

Ah yes, good suggestion. I will see what I can do for next version

Link to comment
Share on other sites

On 8-5-2016 at 10:14 PM, millionaireman said:

I can 2nd this. Its effectively killed my game as engines wont fire without fuel..... any help will be greatly appreciated. 

Thank you, you solved a riddle I was having

Edited by FreeThinker
Link to comment
Share on other sites

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 (allowing you to see inital resources in info screen)
  • MM patch will leave tri state fuel tanks alone
Edited by FreeThinker
Link to comment
Share on other sites

On 8-5-2016 at 7:26 PM, Gorby1 said:

 

Speaking of those numbers, how did you get IFS to display those values for the switchable resources? Mine looks like this:

41KcDtb.png

Is this what you had in mind:

BFtjaFs.jpg

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

1 hour ago, FreeThinker said:

Is this what you had in mind:

BFtjaFs.jpg

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

I really like this addition, thank you.

Link to comment
Share on other sites

5 hours ago, FreeThinker said:

Is this what you had in mind:

It certainly is, works like a charm too! I also really like the IntegrateIFS patch you added a few days ago, it made most of my custom MM patch pointless but saved me a bunch of time attempting to do the same thing. Many thanks! I like that IFS is becoming a more useful and "hands free" stand-alone mod and not just one for other mod authors to integrate with their work.

Link to comment
Share on other sites

On 5/9/2016 at 6:19 PM, FreeThinker said:

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 (allowing you to see inital resources in info screen)
  • MM patch will leave tri state fuel tanks alone

Actually, I'm still having the tri tank problem. I just tried it in a test install with only IFS and the tri tank installed, no other mods, and IFS still patches the tri-tank.

Here is the tank I'm using ---> TRITANK

Can you test it on your end as well? Thanks.

 

Link to comment
Share on other sites

LOG Errors related to this mod:
 

Spoiler

 

[LOG 00:42:55.690] PartLoader: Compiling Part 'InterstellarFuelSwitch/Parts/InterstellarGasTank/InterstellarGasTank-PB-X50R/InterstellarGasTank-PB-X50R'
[ERR 00:42:55.696] Cannot find fx group of that name for decoupler

[ERR 00:42:55.706] Cannot find fx group of that name for decoupler

[LOG 00:42:55.710] PartLoader: Part 'InterstellarFuelSwitch/Parts/InterstellarGasTank/InterstellarGasTank-PB-X50R/InterstellarGasTank-PB-X50R' has no database record. Creating.
[ERR 00:42:55.714] Cannot find fx group of that name for decoupler

 

 

Link to comment
Share on other sites

I just wanted to say, you're getting damn close to what I'd consider the ideal resource switcher mod.  Thanks.  :wink:

(If you're interested in what I'd consider ideal: Either scans GameData to find out what resources you're using, or has a central config file - with all resources categorized into 'solid', 'liquid', 'gas', 'cryogenic', and maybe 'solid-state' (batteries, science, etc.).  Adding switching to a tank would be a one-line (or close) config saying what categories of resources a tank can hold, and total volume.  Plugin works out the rest.)

Link to comment
Share on other sites

I just did a clean install of today's new version of the mod. Stock tanks have lost their switching ability on my install...

In game: in the debug menu, I see some Variables that were left from the MM config pass on the 1.25m stock tanks, cryoPower, REALmixOX,REALmixLH2, LANTRmixOX, pretty much all those that should be removed at the end. My ModuleManager is updated, somehow it doesn't even run the definition for the module interstellarfuelswitch... 
So i deleted the MM cache files, reloaded, same results. Output log coming. A lot of error messages about those variables from what i can see,

My quick guess by comparingthe "integrate..." patch between 2.0.5 and 2.0.4 would be in the "NEEDS[WarpPlugin]" where the InterstellarFuelSwitch is defined... WarpPlugin is a module of the full interstellar set, right ? I don't have it. But it still doesn't explain why the clean-up wasn't done in the FINAL... 

EDIT: Link to output log with said error messages https://www.dropbox.com/s/r3pollp1kz80iwh/output_log%20IFS%20not%20applied%20v2.0.5.txt?dl=0 I have reverted to 2.0.4 and it works fine

Edited by Mokmo
Link to comment
Share on other sites

2 hours ago, DStaal said:

I just wanted to say, you're getting damn close to what I'd consider the ideal resource switcher mod.  Thanks.  :wink:

(If you're interested in what I'd consider ideal: Either scans GameData to find out what resources you're using, or has a central config file - with all resources categorized into 'solid', 'liquid', 'gas', 'cryogenic', and maybe 'solid-state' (batteries, science, etc.).  Adding switching to a tank would be a one-line (or close) config saying what categories of resources a tank can hold, and total volume.  Plugin works out the rest.)

I like the fuel switching of Real Fuels, but I don't want the vapor lock and evaporating fuels that come with that.

Modular Fuel Tanks is similar, but neither it nor IFS include the switching of capsule/cockpit fuels, nor do they feature electric charge as a fuel (though the charge volume seems way off with RF, replacing the monoprop in the MK1 with 50K charge).

Without that, I guess IFS is the one I like most. I'm not ready to open up config files and create those features.

Link to comment
Share on other sites

52 minutes ago, BioRoots said:

With 2.0.5 i lost the ability to switch fuel

 

mmm, is anyone else having this problem? Have you tried removing you Module manager cache?

Edited by FreeThinker
Link to comment
Share on other sites

2.0.5 works fine for me, nice work.

Could you please integrate alumina and aluminium in the stock ore tanks?

Like dis:

Spoiler

 

AluLargeTank.cfg


@PART[LargeTank]
{
 MODULE
    {
	name = InterstellarFuelSwitch
	resourceGui = Ore;Alumina;Aluminium
	resourceNames = Ore;Alumina;Aluminium
	resourceAmounts = 1500;1500;1500
	basePartMass = 2
	
	
	resourcesToIgnore = ElectricCharge;MonoPropellant
	volumeMultiplier = 1
	volumeExponent = 3
	massMultiplier = 1
	massExponent = 3
	displayCurrentTankCost = false
	displayCurrentBoilOffTemp = false
	hasGUI = true
	availableInFlight = true
	availableInEditor = true
	showInfo = true
    }

}

AluRadialTank.cfg


@PART[RadialOreTank]
{
 MODULE
    {
	name = InterstellarFuelSwitch
	resourceGui = Ore;Alumina;Aluminium
	resourceNames = Ore;Alumina;Aluminium
	resourceAmounts = 75;75;75
	basePartMass = 0.125
	
	
	resourcesToIgnore = ElectricCharge;MonoPropellant
	volumeMultiplier = 1
	volumeExponent = 3
	massMultiplier = 1
	massExponent = 3
	displayCurrentTankCost = false
	displayCurrentBoilOffTemp = false
	hasGUI = true
	availableInFlight = true
	availableInEditor = true
	showInfo = true
    }

}

AluSmallTank.cfg


@PART[SmallTank]
{
 MODULE
    {
	name = InterstellarFuelSwitch
	resourceGui = Ore;Alumina;Aluminium
	resourceNames = Ore;Alumina;Aluminium
	resourceAmounts = 300;300;300
	basePartMass = 0.5
	
	
	resourcesToIgnore = ElectricCharge;MonoPropellant
	volumeMultiplier = 1
	volumeExponent = 3
	massMultiplier = 1
	massExponent = 3
	displayCurrentTankCost = false
	displayCurrentBoilOffTemp = false
	hasGUI = true
	availableInFlight = true
	availableInEditor = true
	showInfo = true
    }

}

 

Edit;  New Verson ;

OreSwitch.cfg

@PART[*]:HAS[@RESOURCE[Ore],!MODULE[InterstellarFuelSwitch],!MODULE[FSfuelSwitch],!MODULE[B9PartSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[ModuleResourceConverter],!MODULE[ModuleResourceHarvester],!MODULE[ModuleAnalysisResource]]:NEEDS[InterstellarFuelSwitch&!CryoTanks&!ModularFuelTanks&!RealFuels]:FOR[InterstellarFuelSwitch]
{
	%totalCap = #$RESOURCE[Ore]/maxAmount$
	
	%masswore = #$%totalCap$
	@masswore /= #$mass$
	@masswore /= 100


	%masswalu = 0.398
	@masswalu *= #$masswore$
	
	
	%masswalum = 0.277
	@masswalum *= #$masswore$
	
	
	MODULE
	{
		name = InterstellarFuelSwitch
		tankSwitchNames = Ore;Alumina;Aluminium
		resourceGui = Ore;Alumina;Aluminium
		resourceNames = Ore;Alumina;Aluminium
		resourceAmounts = #$../totalCap$;$../totalCap$;$../totalCap$
		hasGUI = true
		availableInFlight = true
		availableInEditor = true
		tankResourceMassDivider = #$../masswore$;$../masswalu$;$../masswalum$	
		
	}

   
}
@PART[*]:FINAL
{
	// Remove temporary variables to eliminate log spam
	

	!totalCap = 0
	!masswore = 0
	!masswalu =0
	!masswalum = 0
}

 

PS: A way to use stock drills to harvest interstellar surface resources would be nice, too.

 

Edited by EnigmaG
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...