Jump to content

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


FreeThinker

Recommended Posts

58 minutes ago, PortableGoogle said:

Sorry if this is the wrong place, but it seems the mods i have let me switch the fuel type in everything but mk3 tanks. Is there a mod that adds this or could you point me in the right direction on how to add IFS to mk3 tanks.
thanks

You could try

 

Link to comment
Share on other sites

I'm a little confused as to how your mod works.

I've installed it and while the fuel switch feature works brilliantly when it comes to other modded parts like from Fuel Tanks Plus or Modular Rocket Systems, it doesn't seem to work on any of the stock tanks. My first guess was that it must have been something with the ModuleManager configuration (maybe you have to tell the game which tanks are allowed to have the fuel switch feature?), but I've tried a handful of MM files from other mods (Fuel Tanks Plus, Firespitter and the one you linked above, namely) to no avail: the stock rocket tanks are always stuck using LF+O. I used to use TAC Fuel Balancer to swap out the contents of tanks (filling up a 3.75m tank with all LF), but the author won't be updating it for 1.1, and I really need one of these types of mods to make my deep-space interplanetary ships.

Are there any other ModuleManager config files you could point me to? How complex is it to write one?

I appreciate your help, and thanks for the mod!

Edited by Rekthor
Link to comment
Share on other sites

could you start posting changelogs again? the list on the page only goes up to v1.16 and I'm the kind of person who really likes to know what bugs exist, no longer exist, and were never there to begin with. To say nothing of added features or removed ones.

Link to comment
Share on other sites

2 hours ago, DuoDex said:

Bit of an off-topic question, but is there a cfg file for FSFuelSwitch or this mod that allows me to switch fuel types in all fuel containers?

Nicked these from somewhere, sometime. Not sure exactly what you mean by all containers, but either one works for me with any LFO tankage.
IFS:

Spoiler

// See: http://forum.kerbalspaceprogram.com/index.php?/topic/109225-stock-fuel-switch/&do=findComment&comment=2151857
// Code by Badsector, Nertea and veryinky
// LF tanks added by Bigglesworth, 24th July 2015
// Keep resource nodes, fix LF changed by SpaceNomad, 23rd August 2015
// moved to InterstellarFS, refactored, cleaned log warnings and made to work with tanks that aren't full by default by TRauMa, 29th August 2015

// we could add :NEEDS[InterstellarFuelSwitch], but as we only touch the InterstellarFuelSwitch node, it's not really necessary  

// -----------------------
// LFOX tanks
// -----------------------
@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[FSfuelSwitch],!MODULE[InterstellarFuelSwitch]]:FOR[InterstellarFuelSwitch] {   

    // temporary variables - if you add one here, add it below in cleanup, too
    %tempVar = 0
    %resCost = 0
    %totalCap = 0
    %dryCost = 0
    %LFCost = 0
    %OXCost = 0

    // Total tank capacity
    @totalCap = #$RESOURCE[LiquidFuel]/maxAmount$
    @totalCap += #$RESOURCE[Oxidizer]/maxAmount$

    // compute cost of fuel fitting in part
    @tempVar = #$RESOURCE[LiquidFuel]/maxAmount$
    @tempVar *= 0.8
    @resCost = #$tempVar$

    @tempVar = #$RESOURCE[Oxidizer]/maxAmount$
    @tempVar *= 0.18
    @resCost += #$tempVar$

    // and get dry cost as total cost - resource cost
    @dryCost = #$cost$
    @dryCost -= #$resCost$
    // we don't really use dryCost yet, but as LF tanks are more expensive in stock than their LFOX counterparts, this may change

    // Now compute tank costs adaption as new res costs - old res costs
    // - LF
    @tempVar = #$totalCap$
    @tempVar *= 0.8
    @LFCost += #$tempVar$
    @LFCost -= #$resCost$

    // - OX
    @tempVar = #$totalCap$
    @tempVar *= 0.18
    @OXCost += #$tempVar$
    @OXCost -= #$resCost$

    MODULE {
        name = InterstellarFuelSwitch

        # the first option should leave the tank like it is in stock
        resourceGui = Rocket Fuel;Liquid Fuel;Oxidizer
        resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer
        resourceAmounts = #$../RESOURCE[LiquidFuel]/maxAmount$,$../RESOURCE[Oxidizer]/maxAmount$;$../totalCap$;$../totalCap$
        initialResourceAmounts = #$../RESOURCE[LiquidFuel]/amount$,$../RESOURCE[Oxidizer]/amount$;$../totalCap$;$../totalCap$
        tankCost = #0;$../LFCost$;$../OXCost$

        displayCurrentTankCost = true

        hasGUI = true
        showInfo = true

        availableInFlight = false
        availableInEditor = true

        basePartMass = #$../mass$
        tankMass = 0;0;0;0;0
    }

}


@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[FSfuelSwitch],@MODULE[InterstellarFuelSwitch]]:AFTER[InterstellarFuelSwitch] {   

    // temporary variables cleanup to supress PartLoader warnings
    !tempVar = DELETE
    !resCost = DELETE
    !totalCap = DELETE
    !dryCost = DELETE
    !LFCost = DELETE
    !OXCost = DELETE

}


// -----------------------
// LF tanks
// -----------------------
@PART[*]:HAS[@RESOURCE[LiquidFuel],!RESOURCE[Oxidizer],!MODULE[FSfuelSwitch],!MODULE[InterstellarFuelSwitch]]:FOR[InterstellarFuelSwitch] {   

    // temporary variables - if you add one here, add it below in cleanup, too
    %tempVar = 0
    %resCost = 0
    %dryCost = 0
    %mixCost = 0
    %OXCost = 0
    %LFcap = 0
    %OXcap = 0

    // compute cost of fuel in part if at capacity
    @resCost = #$RESOURCE[LiquidFuel]/maxAmount$
    @resCost *= 0.8

    // and get dry cost as total cost - resource cost
    @dryCost = #$cost$
    @dryCost -= #$resCost$

    // Now compute tank costs as dry costs + res costs at capacity
    // - LFOX (also calculate caps: 45% of full cap for LF)
    @LFcap = #$RESOURCE[LiquidFuel]/maxAmount$
    @LFcap *= 0.45
    @tempVar = #$LFcap$
    @tempVar *= 0.8
    @mixCost += #$tempVar$
    @OXcap = #$RESOURCE[LiquidFuel]/maxAmount$
    @OXcap *= 0.55
    @tempVar = #$OXcap$
    @tempVar *= 0.18
    @mixCost += #$tempVar$
    @mixCost -= #$resCost$

    // - OX
    @tempVar = #$RESOURCE[LiquidFuel]/maxAmount$
    @tempVar *= 0.18
    @OXCost += #$tempVar$
    @OXCost -= #$resCost$

    MODULE {
        name = InterstellarFuelSwitch

        # the first option should leave the tank like it is in stock
        resourceGui = Liquid Fuel;Oxidizer;Rocket Fuel
        resourceNames = LiquidFuel;Oxidizer;LiquidFuel,Oxidizer
        resourceAmounts = #$../RESOURCE[LiquidFuel]/maxAmount$;$../RESOURCE[LiquidFuel]/maxAmount$;$../LFcap$,$../OXcap$
        initialResourceAmounts = #$../RESOURCE[LiquidFuel]/amount$;$../RESOURCE[LiquidFuel]/maxAmount$;$../LFcap$,$../OXcap$
        tankCost = #0;$../OXCost$;$../mixCost$

        displayCurrentTankCost = true

        hasGUI = true
        showInfo = true

        availableInFlight = false
        availableInEditor = true

        basePartMass = #$../mass$
        tankMass = 0;0;0;0;0
    }

}

@PART[*]:HAS[@RESOURCE[LiquidFuel],!RESOURCE[Oxidizer],!MODULE[FSfuelSwitch],@MODULE[InterstellarFuelSwitch]]:AFTER[InterstellarFuelSwitch] {   

    // temporary variables cleanup to supress PartLoader warnings
    !tempVar = DELETE
    !resCost = DELETE
    !dryCost = DELETE
    !mixCost = DELETE
    !OXCost = DELETE
    !LFcap = DELETE
    !OXcap = DELETE

}

Firespitter:

Spoiler

//Code by Badsector, Nertea and veryinky


@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[FSfuelSwitch],!MODULE[FStextureSwitch2],!MODULE[InterstellarFuelSwitch]]:FINAL {   

    %LF = #$RESOURCE[LiquidFuel]/maxAmount$
    %OX = #$RESOURCE[Oxidizer]/maxAmount$
    
    %totalCap = #$RESOURCE[LiquidFuel]/maxAmount$
    @totalCap += #$RESOURCE[Oxidizer]/maxAmount$
    
    %tempVar = 0
    %dryCost = 0
    
    @dryCost = #$cost$
    
    %LFCost = 0
    %OXCost = 0
    %mixLFCost = 0
    
    // compute cost of stock tank fuel
    @tempVar = #$RESOURCE[LiquidFuel]/maxAmount$
    @tempVar *= 0.8
    @mixLFCost += #$tempVar$
    
    @tempVar = #$RESOURCE[Oxidizer]/maxAmount$
    @tempVar *= 0.18
    @mixLFCost += #$tempVar$
    
    @dryCost -= #$mixLFCost$
    @cost -= #$mixLFCost$
    
    // Cost LF only
    @tempVar = #$totalCap$
    @tempVar *= 0.8
    @LFCost += #$tempVar$
    
    // Cost OX only
    @tempVar = #$totalCap$
    @tempVar *= 0.18
    @OXCost += #$tempVar$
    
    @tempVar = 0
    MODULE {
        name = FSfuelSwitch


        resourceNames = LiquidFuel,Oxidizer;LiquidFuel;Oxidizer


        resourceAmounts = #$../LF$,$../OX$;$../totalCap$;$../totalCap$


        tankCost = #$../mixLFCost$;$../LFCost$;$../OXCost$
        displayCurrentTankCost = true


        hasGUI = true
        showInfo = true
        
        availableInFlight = false
        availableInEditor = true


        basePartMass = #$../mass$
        tankMass = 0;0;0;0;0
    }
    
    !RESOURCE[LiquidFuel] {}
    !RESOURCE[Oxidizer] {}
    
}

 

Link to comment
Share on other sites

On 24/04/2016 at 0:57 AM, Rekthor said:

I'm a little confused as to how your mod works.

I've installed it and while the fuel switch feature works brilliantly when it comes to other modded parts like from Fuel Tanks Plus or Modular Rocket Systems, it doesn't seem to work on any of the stock tanks. My first guess was that it must have been something with the ModuleManager configuration (maybe you have to tell the game which tanks are allowed to have the fuel switch feature?), but I've tried a handful of MM files from other mods (Fuel Tanks Plus, Firespitter and the one you linked above, namely) to no avail: the stock rocket tanks are always stuck using LF+O. I used to use TAC Fuel Balancer to swap out the contents of tanks (filling up a 3.75m tank with all LF), but the author won't be updating it for 1.1, and I really need one of these types of mods to make my deep-space interplanetary ships.

Are there any other ModuleManager config files you could point me to? How complex is it to write one?

I appreciate your help, and thanks for the mod!

I seem to be having the same issue today, even reverted to an earlier version of IFS but the issue persists. I updated a few mods at once, tried reverting them as well but still have the same problem :(

Link to comment
Share on other sites

2 minutes ago, Groovemeister said:

I seem to be having the same issue today, even reverted to an earlier version of IFS but the issue persists. I updated a few mods at once, tried reverting them as well but still have the same problem :(

It is because the mod does not have baked in support for stock parts. Mod parts have to specify to use it. I'd love to see support for stock parts get baked in since I can't really see a situation where someone would want IFS and not want it for stock parts.

Link to comment
Share on other sites

7 hours ago, PortableGoogle said:

It is because the mod does not have baked in support for stock parts. Mod parts have to specify to use it. I'd love to see support for stock parts get baked in since I can't really see a situation where someone would want IFS and not want it for stock parts.

Personally, I don't like the idea of putting IFS on every stock part, because I think IFS is an advanced feature which should only become unlocked with more advanced fuel storage.  I understand there are people that despite the balance issues would still want IFS on every tank. Then the question becomes, what switching options do you want to put in it?  Some might only want stock resources, other might mix it with real resources and a third  will only want to use real fuels. I say, let everyone  decide for them-self what kind of fuel switching they want, or not. I will gladly cooperate with anyone who want to create a mod that put IFS on all stock tanks, I will even provide links on the main page to these mods. just don't ask me to create these mods myself.

Edited by FreeThinker
Link to comment
Share on other sites

19 hours ago, Tanya Sapien said:

could you start posting changelogs again? the list on the page only goes up to v1.16 and I'm the kind of person who really likes to know what bugs exist, no longer exist, and were never there to begin with. To say nothing of added features or removed ones.

Good point. I made the change log up to date as good as I could

Link to comment
Share on other sites

On 14/04/2016 at 11:44 PM, DrGonzo94 said:

First, thanks for a great mod, I realize only now how dependant I am on it. 

Secondly, my apologies in advance, I also realize I probably am making some noobish mistake since the mod seems to be working for everyone else. However, I still can't get any functionality at all. I reinstalled KSP (1.1 1203 prerelease now). Then I only install IFS and CRP into the fresh install, tried both 32 and 64-bit KSP. When I right-click tanks I only get the basic sliders for liquidfuel and oxidizer, nothing else. Anyone has any ideas what I'm doing wrong? 

Kind regards

ChGdGBT.png

I am getting this issue, I have installed the IFS mod and it never seems to work, what is wrong??!!

Link to comment
Share on other sites

20 hours ago, FreeThinker said:

Personally, I don't like the idea of putting IFS on every stock part, because I think IFS is an advanced feature which should only become unlocked with more advanced fuel storage.  I understand there are people that despite the balance issues would still want IFS on every tank. Then the question becomes, what switching options do you want to put in it?  Some might only want stock resources, other might mix it with real resources and a third  will only want to use real fuels. I say, let everyone  decide for them-self what kind of fuel switching they want, or not. I will gladly cooperate with anyone who want to create a mod that put IFS on all stock tanks, I will even provide links on the main page to these mods. just don't ask me to create these mods myself.

I didn't think about balancing like that, I guess cause even with tons of mods I was mainly wanting the ability to switch to liquid fuel only on mk2 and mk3 stock parts lol. I guess I'm used to putting constraints on myself like not using tweakscale to resize something above the largest size I have unlocked. 

Link to comment
Share on other sites

I'm still having some z-fighting issues and have been led to believe that IFS may be causing it (from browsing other threads), despite using the latest versions of IFS, CCC, FTP, and module manager. Any tips would be much appreciated (and I apologise if I'm barking up the wrong tree). :)

Link to comment
Share on other sites

31 minutes ago, algeo said:

I'm still having some z-fighting issues and have been led to believe that IFS may be causing it (from browsing other threads), despite using the latest versions of IFS, CCC, FTP, and module manager. Any tips would be much appreciated (and I apologise if I'm barking up the wrong tree). :)

 

We'll probably need to see your KSP.log to see what it's doing. Chances are something's out of date or not functioning. Z-fighting with FTP/CCC usually means either the MM patches applied, but IFS is missing or not functioning, or the MM patches didn't apply at all, which would be a ModuleManager problem, or MM has made a mistake about which mods are installed, which can be fixed by deleting ModuleManager.ConfigCache.

 

Link to comment
Share on other sites

1 hour ago, NecroBones said:

 

We'll probably need to see your KSP.log to see what it's doing. Chances are something's out of date or not functioning. Z-fighting with FTP/CCC usually means either the MM patches applied, but IFS is missing or not functioning, or the MM patches didn't apply at all, which would be a ModuleManager problem, or MM has made a mistake about which mods are installed, which can be fixed by deleting ModuleManager.ConfigCache.

 

Right, of course. I'm sorry for not including a log. I've already attempted to delete the MM cache, but I forgot to mention it.

Here's a log with only MM, FTP, CCC, and IFS active.

https://www.dropbox.com/s/diqng30qbrneiko/KSP.log?dl=0

Link to comment
Share on other sites

20 minutes ago, algeo said:

Right, of course. I'm sorry for not including a log. I've already attempted to delete the MM cache, but I forgot to mention it.

Here's a log with only MM, FTP, CCC, and IFS active.

https://www.dropbox.com/s/diqng30qbrneiko/KSP.log?dl=0

 

The MM patches are applying, I can see that much. It looks like it's finding the IFS DLL too. Hmm. That's really strange that it's not working. Have you tried deleting and re-installing the mods?

 

Link to comment
Share on other sites

11 hours ago, NecroBones said:

 

The MM patches are applying, I can see that much. It looks like it's finding the IFS DLL too. Hmm. That's really strange that it's not working. Have you tried deleting and re-installing the mods?

 

Yep. All of the relevant mods have been reinstalled in the hopes of the installation being faulty.

I find it very curious how I'm having this problem while it seems to be fine for everyone else. Normally I'd reinstall everything... but with the switch to 1.1 so recently (I haven't even started up a proper save yet - only a sandbox for checking mod compability) it hardly seems likely to help. I'll do more experimenting when I get home this afternoon. :) 

Link to comment
Share on other sites

5 hours ago, algeo said:

Yep. All of the relevant mods have been reinstalled in the hopes of the installation being faulty.

I find it very curious how I'm having this problem while it seems to be fine for everyone else. Normally I'd reinstall everything... but with the switch to 1.1 so recently (I haven't even started up a proper save yet - only a sandbox for checking mod compability) it hardly seems likely to help. I'll do more experimenting when I get home this afternoon. :) 

I would recommend you make a fresh install, meaning deinstall and manual remove everything and than make a nice fresh install

Link to comment
Share on other sites

1 hour ago, FreeThinker said:

I would recommend you make a fresh install, meaning deinstall and manual remove everything and than make a nice fresh install

 

Just made a fresh KSP install (albeit 1.1.1 rather than 1.1 - I'm on steam so I can't help getting that new patch) with only IFS downloaded from this thread (1.24), FTP from Necro's main thread (1.8.2), and the MM bundled with FTP (2.6.23). Everything else is completely fresh from steam. Still having the same issues. All FTP tanks are affected, stock tanks remain unaffected of course.

I feel like I must be doing something wrong since no one else is having this issue. But with a completely fresh install I just can't imagine what that would be.

Hopefully you have some other ideas; IFS and FTP are two of my favorite mods. :) 

 

Edit: Log if you want to have a look.

Edit 2: No Z-fighting with FTP+Firespitter. I guess that's something of a solution, but I'd really prefer to use IFS if at all possible.

Edited by algeo
Link to comment
Share on other sites

46 minutes ago, algeo said:

 

Just made a fresh KSP install (albeit 1.1.1 rather than 1.1 - I'm on steam so I can't help getting that new patch) with only IFS downloaded from this thread (1.24), FTP from Necro's main thread (1.8.2), and the MM bundled with FTP (2.6.23). Everything else is completely fresh from steam. Still having the same issues. All FTP tanks are affected, stock tanks remain unaffected of course.

I feel like I must be doing something wrong since no one else is having this issue. But with a completely fresh install I just can't imagine what that would be.

Hopefully you have some other ideas; IFS and FTP are two of my favorite mods. :) 

 

Edit: Log if you want to have a look.

Edit 2: No Z-fighting with FTP+Firespitter. I guess that's something of a solution, but I'd really prefer to use IFS if at all possible.

 

OK, I think the first time, it was something hosed up in your installation. This time, it looks like I mangled some of the "NEEDS" statements for FTP's MM rules, and so the patches are not applying (this is yesterday's patch to FTP at fault). I'll get a fix out shortly.

Link to comment
Share on other sites

32 minutes ago, NecroBones said:

 

OK, I think the first time, it was something hosed up in your installation. This time, it looks like I mangled some of the "NEEDS" statements for FTP's MM rules, and so the patches are not applying (this is yesterday's patch to FTP at fault). I'll get a fix out shortly.

 

Actually, I fixed up the MM patches on my side, but it's still z-fighting. Did 1.1.1 also break IFS?

 

EDIT: @algeo & @FreeThinker, I've pushed out the MM fixes for CCC and FTP, but I think IFS is having issues with 1.1.1 (it's broken for SpaceY too).

 

 

Link to comment
Share on other sites

1 hour ago, algeo said:

 

Just made a fresh KSP install (albeit 1.1.1 rather than 1.1 - I'm on steam so I can't help getting that new patch) with only IFS downloaded from this thread (1.24), FTP from Necro's main thread (1.8.2), and the MM bundled with FTP (2.6.23). Everything else is completely fresh from steam. Still having the same issues. All FTP tanks are affected, stock tanks remain unaffected of course.

I feel like I must be doing something wrong since no one else is having this issue. But with a completely fresh install I just can't imagine what that would be.

Hopefully you have some other ideas; IFS and FTP are two of my favorite mods. :) 

 

Edit: Log if you want to have a look.

Edit 2: No Z-fighting with FTP+Firespitter. I guess that's something of a solution, but I'd really prefer to use IFS if at all possible.

Just an FYI, you can set steam to only update the game when you run it, you will see it say "Update required" next to the game and be in blue. Normally you can't play a game on steam until it is updated, but ksp does not use steam's annoying drm so you can actually launch the game from the exe or the launcher directly. I have so many mods I do this simply so the steam overlay is not running and steam itself is not running freeing up more cpu for ksp :)
I was actually about to update to 1.1.1 for the bug fixes but I think I'm gonna wait to see if that caused your problem lol.

Link to comment
Share on other sites

55 minutes ago, NecroBones said:

 

Actually, I fixed up the MM patches on my side, but it's still z-fighting. Did 1.1.1 also break IFS?

 

EDIT: @algeo & @FreeThinker, I've pushed out the MM fixes for CCC and FTP, but I think IFS is having issues with 1.1.1 (it's broken for SpaceY too).

Exactly what is broken?

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