FreeThinker

[1.8.1/1.7.3/1.6.1/1.5.1/1.4.5/1.3.1] Interstellar Fuel Switch (IFS) 3.12.2

Recommended Posts

[h=2]Version 1.14 for Kerbal Space Program 1.0.4[/h] Released on 2015-06-28

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

Share this post


Link to post
Share on other sites

Bug report :(

It seems IFS is activating engines with built in fuel tanks in the editor. I originally thought this was a KER problem but it was just reporting what was happening. My original bug report:

So I've found a little but annoying bug that only occurs in quite specific circumstances.

Ingredients: KER 1.0.17.0, Interstellar Fuel Switch 1.14, any engine that also contains fuel (I use the Beagle from Stock Part Revamp) and a config that allows that fuel tank to be switched.

Recipe: Build a simple rocket that consists of any pod, any fuel tank, the aforementioned engine, a decoupler, some more fuel tanks and any other normal engine.

The problem is that KER doesn't calculate any ÃŽâ€v or TWR etc info for the rocket. Here's a picture that should help illustrate it:

YVNiwjr.jpg

You can (faintly) see the bottom two tanks and Swivel engine, (clearly) see the engine info, the Fuel Switch info and KER not accounting for this. The log gets spammed with

NullReferenceException: Object reference not set to an instance of an object
at ModuleEngines.CalculateThrust () [0x00000] in <filename unknown>:0

at ModuleEngines.ThrustUpdate () [0x00000] in <filename unknown>:0

at ModuleEngines.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException: Object reference not set to an instance of an object
at StackIconInfoBox.Update () [0x00000] in <filename unknown>:0

(full log here)

Removing InterstellarFuelSwitch does fix this issue, but then again, so would removing the modded engine or KER.. So, it's a little bug and one that I don't necessarily expect a fix for (though I'd like it), but it effectively renders that engine useless (which is annoying as it comes before the Terrier in the tech tree).

The problem, as discovered by Padishar:

It does... Line 41152 is where the simulation proper starts (the previous 150 lines are the setup for it). This shows that the dodgy engine is incorrectly marked as active and the other engine is activated because it is in the initial stage. So, it is simulating both engines burning at the same time and the top engine presumably burns all its fuel before the lower one. If you turn the thrust limiter on the top engine right down you should be able to slow it down enough that it will still have some fuel left when the lower one runs out and then some deltaV will appear in stage 0. The active flag is read from ModuleEngines.isOperational so I would expect all engines to have this set to false in the VAB and for it to be false during flight until the engine is activated (either by the staging or any other method). I've no idea why this flag is being set while in the VAB but this should give the IFS and/or VSR folks something to look into...

I know this is a problem with IFS because removing it solved the issue and testing on a purely stock + StockPartRevamp resulted in no log errors (adding KER back in but not IFS results in no bug either).

Share this post


Link to post
Share on other sites
Bug report :(

It seems IFS is activating engines with built in fuel tanks in the editor. I originally thought this was a KER problem but it was just reporting what was happening.

I've also run into an issue with the Daikon Service Module from HGR and the LTS Mk2 "Bun" Lower Stage from Dr. Jet's Chop Shop. Both parts cause the following to appear in the output log:

NullReferenceException: Object reference not set to an instance of an object

at ModuleDecouple.OnDecouple () [0x00000] in <filename unknown>:0

at ModuleDecouple.OnActive () [0x00000] in <filename unknown>:0

at Part.ModulesOnActivate () [0x00000] in <filename unknown>:0

at Part.force_activate () [0x00000] in <filename unknown>:0

at InterstellarFuelSwitch.InterstellarFuelSwitch.OnStart (StartState state) [0x00000] in <filename unknown>:0

at Part.ModulesOnStart () [0x00000] in <filename unknown>:0

at Part+.MoveNext () [0x00000] in <filename unknown>:0

In this particular case both parts have decouplers built into the part and the fx_gasBurst_white effect is playing continuously in the editor and on the launch pad. It appears the parts are working normally. I also pulled this out of debug when selecting the parts in the editor just in case it helps at all:

--- when selecting the Daikon Service Module

[Warning]: InsterstellarFuelSwitch: error parsing selectedTankResource amount 0/0: '90,110': '90'

[Log]: InsterstellarFuelSwitch parseDoubles: invalid float: tankCost [len:0] '']

[Log]: InsterstellarFuelSwitch OnStart loaded persistant selectedTankSetup = -1

--- when selecting the LTS Mk2 "Bun" Lower Stage

[Warning]: InsterstellarFuelSwitch: error parsing selectedTankResource amount 0/0: '324,396': '324'

[Log]: InsterstellarFuelSwitch parseDoubles: invalid float: tankCost [len:0] '']

[Log]: InsterstellarFuelSwitch OnStart loaded persistant selectedTankSetup = -1

I am running the fuel switch config from Cryogenic Engines for my tank selection and use no other tank switching mods at all. (No RF or MFT) Once I removed IFS the problems went away and the tanks stopped the consistent playing of the fx_gasBurst_white effect as well. I also tested an earlier version of the config file where this problem was not occurring and was able to duplicate the problem with both the NREs and consistent smoke effect.

I hope all this info gets you pointed in the right direction. You do really great work with this switching mod and I prefer it above all others I've tried. Keep up the good work!

Share this post


Link to post
Share on other sites

Quick question. The first post indicates tweakscale support, but the tweakscale cfgs in the download are blank. Is that intentional?

Share this post


Link to post
Share on other sites
Quick question. The first post indicates tweakscale support, but the tweakscale cfgs in the download are blank. Is that intentional?

For technical reasons Tweakscale is fully integrated. In the past tweakscale.cfg was used to configure it be it is now handled by the part itlsef. To control scalling massExponent and volumeExponent (default 3). THe reason why I left is to overrite old configuration files. But now they can simply be removed

- - - Updated - - -

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)

- - - Updated - - -

Bug report :(

It seems IFS is activating engines with built in fuel tanks in the editor. I originally thought this was a KER problem but it was just reporting what was happening. My original bug report:

The problem, as discovered by Padishar:

I know this is a problem with IFS because removing it solved the issue and testing on a purely stock + StockPartRevamp resulted in no log errors (adding KER back in but not IFS results in no bug either).

Try again with the new version

Share this post


Link to post
Share on other sites

Cool, thanks for the explanation. I test a bit after I made the post and found that it scaled just fine with the default tweakscale settings.

Share this post


Link to post
Share on other sites

Hey,

I have some trouble with IFS after updating to version 1.15. I do use a massive amount of mods, so there is a wide field of potential collision, but so far the mods worked together pretty well. After updating I now dont get the option to change any of my fuel types in any of my tanks. Even the stock tanks are not interchangeable anymore. Was there a new dependency in IFS 1.15 that I might be missing maybe?

Share this post


Link to post
Share on other sites

I'm having trouble installing this via CKAN: it won't install at the same time as Real Fuels. (Specifically, "Interstellar Fuel Switch" won't; "Interstellar Fuel Switch Core" installs just fine.) Bit of a problem for me, that, since Real Fuels and KSPI are two essential parts of my All Reality, All The Time combo pack...

Known problem? Any thoughts or workarounds?

-c

Share this post


Link to post
Share on other sites
I'm having trouble installing this via CKAN: it won't install at the same time as Real Fuels. (Specifically, "Interstellar Fuel Switch" won't; "Interstellar Fuel Switch Core" installs just fine.) Bit of a problem for me, that, since Real Fuels and KSPI are two essential parts of my All Reality, All The Time combo pack...

Known problem? Any thoughts or workarounds?

-c

This is not my fault . Ask Real Fuels why they block IFS in Real Fuels CKAN. In the mean time you just have to install it oldschool, which manually.

Edited by FreeThinker

Share this post


Link to post
Share on other sites

Regarding the post I made yesterday, I found out that IFS is working with it's own tanks, but exclusively with those.

Is that on purpose or is my Module Manager messed up and fails to patch the other tanks correctly?

It used to be standard that IFS used MM to patch all detected tanks to use the fuel switches, wasn't it?

And if that is intentional, can I somehow undo these changes? I liked to be able to change to liquid fuel only in all my tanks to have freedom of building with nuclear engines. Sadly enough that is not possible anymore with this state.

Is anyone else having this issue or is it just me having trouble with MM and IFS together?

Share this post


Link to post
Share on other sites

I just came over here from the KSPIE thread where I posted a similar question. The source of the incompatilibity seems to be some testing done in May.

see here and surrounding posts:

http://forum.kerbalspaceprogram.com/threads/64118-1-0-4-Real-Fuels-v10-4-7-July-17?p=1976304&viewfull=1#post1976304

It seems that some tanks are reverting on the launch pad. I hope something can be worked out.

Share this post


Link to post
Share on other sites

Great mod. I got a question though, when I use the already buggy UbioWelding ltd, the interstellar fuel switch keeps on the part. I suspect this is the cause of my crashes because there are more than one type of fuel on the welded part, not to mention the non-generic LqdHydrogen and etc also in it. What would I need to do in the .CFG file to disable the fuel switch for a specific part? Changing the part type didn't do the trick.

Hope that made sense. Thanks in advance.

Share this post


Link to post
Share on other sites
Regarding the post I made yesterday, I found out that IFS is working with it's own tanks, but exclusively with those.

Is that on purpose or is my Module Manager messed up and fails to patch the other tanks correctly?

It used to be standard that IFS used MM to patch all detected tanks to use the fuel switches, wasn't it?

And if that is intentional, can I somehow undo these changes? I liked to be able to change to liquid fuel only in all my tanks to have freedom of building with nuclear engines. Sadly enough that is not possible anymore with this state.

Is anyone else having this issue or is it just me having trouble with MM and IFS together?

There are several mods which disable IFS when they encounter it. It's not my respnsiblility. It only provide this as a tool which people can use to augment their tanks, when other mods override those, it's the reponsiblity of those who override.

- - - Updated - - -

Great mod. I got a question though, when I use the already buggy UbioWelding ltd, the interstellar fuel switch keeps on the part. I suspect this is the cause of my crashes because there are more than one type of fuel on the welded part, not to mention the non-generic LqdHydrogen and etc also in it. What would I need to do in the .CFG file to disable the fuel switch for a specific part? Changing the part type didn't do the trick.

Hope that made sense. Thanks in advance.

If a part contains more than one Fuel Switcher and they define the same resource, they will conflict with each other, causing each other tanks to be removed when switching or at startup.

What should be possible is if one fuel switch defines only liquid and other only gases, they should play nice together, but I haven't tested it myself, I only know that IFS will ignore resources that are not in their list of switchable resources. This allows you for example to put it on a service module with resources like Electric Charge.

Edited by FreeThinker

Share this post


Link to post
Share on other sites

can anyone make a config so that this mod works with stock parts? i would like it if i could have a long mk2 fuselage adapter, with only LF and not LF and OX, and i know i could just remove the ox but then im only using half of the full capacity of a mk2 adapter.

Share this post


Link to post
Share on other sites

Hi, my game says that the mod needs to update even though I've got the latest version installed. Any suggestions?

Share this post


Link to post
Share on other sites

Sorry if I missed this earlier in the thread, but is there an easy way to get fuel switch to work with any tank instead of just the interstellar ones?

Share this post


Link to post
Share on other sites

KSP in log write next:

[LOG 01:04:12.530] PhysicsGlobals: Loading database

[ERR 01:04:14.173] Error: Empty part config file

[WRN 01:04:14.174] Cannot create config from file ':\route to ksp\GameData\InterstellarFuelSwitch\Plugins\FuelSwitchConfig.cfg'.

[ERR 01:04:14.176] Error: Empty part config file

[WRN 01:04:14.177] Cannot create config from file ':\route to ksp\GameData\InterstellarFuelSwitch\Resources\InterstellarResources.cfg'.

How to fix it?

Share this post


Link to post
Share on other sites
KSP in log write next:

[LOG 01:04:12.530] PhysicsGlobals: Loading database

[ERR 01:04:14.173] Error: Empty part config file

[WRN 01:04:14.174] Cannot create config from file ':\route to ksp\GameData\InterstellarFuelSwitch\Plugins\FuelSwitchConfig.cfg'.

[ERR 01:04:14.176] Error: Empty part config file

[WRN 01:04:14.177] Cannot create config from file ':\route to ksp\GameData\InterstellarFuelSwitch\Resources\InterstellarResources.cfg'.

How to fix it?

I was just coming here to wonder the same thing. Are these benign or a real problem?

Share this post


Link to post
Share on other sites
I was just coming here to wonder the same thing. Are these benign or a real problem?

THese are old configs that needed to be overriten. They can be safely removed. In next release I will simply remove them

Share this post


Link to post
Share on other sites
IFS keeps telling me it isn't up to date even though i have the latest version?

Are you sure? most likely you installed it on the wrong location, happens to the best of us.

Edited by FreeThinker

Share this post


Link to post
Share on other sites

Well i have done this before, but i did it again, deleted it and reinstalled it, and it works fine again... weirdness, as all i did was delete exactly the same file i put back in. Thanks anyway.

Share this post


Link to post
Share on other sites
THese are old configs that needed to be overriten. They can be safely removed. In next release I will simply remove them

Just a reminder. The warning is still in my log I noticed when I went to check on some other stuff

Share this post


Link to post
Share on other sites

I love this mod, but i'm having trouble finding a single solution to fuel switching without combining multiple fuel switching mods that conflict with one another. Is there a way to get this mod to work with all tanks and also include liquid hydrogen in it's list of fuel types?

currently most of my tanks can switch between liquid fuel/ox, ox, and liquid fuel, the exception is kw rocketry. But none of my tanks can switch to liquid hydrogen. If this isn't possible that's cool but I feel like with how useful this mod is someone somewhere has probably figured out how to use it for all their fuel needs instead of having a funky combination of this and modular fuel tanks which tends to cause oddness.

Share this post


Link to post
Share on other sites

While working on a Community Tech Tree comparability script for TAC-LS, I came across an interesting situation that isn't address by either Interstellar Fuel Switch or Firespitter. I was originally going to place all of the life support parts into suitability node except for the waste containers, which were going to be put in the recycling node to sync it with Universal Storage. However, my declutter script bases everything off the first life support parts that are unlocked, thus allowing the player to switch to the waste container configuration without having to unlock the recycling node. Is it possible to limit certain options to specific tech nodes?

Such as...

MODULE
{
name = InterstellarTextureSwitch2
objectNames = MyContainer
nextButtonText = Next Container
prevButtonText = Previous Container
textureRootFolder = ThunderAerospace/TacLifeSupportContainers/
textureNames = Texture;FoodTexture;WaterTexture;OxygenTexture;WasteTexture
textureDisplayNames = Life Support;Food;Water;Oxygen;Waste
useFuelSwitchModule = true
fuelTankSetups = 0;1;2;3;4
showInfo = false
techRequired = survivability;survivability;survivability;survivability;recycling
}
MODULE
{
name = InterstellarFuelSwitch
resourceNames = Food,Water,Oxygen;Food;Water;Oxygen;Waste,WasteWater,CarbonDioxide
resourceAmounts = 113.2,74.8,11466.9;240;240;53072.3;19.5,180.9,18800.1
initialResourceAmounts = 113.2,74.8,11466.9;240;240;53072.3;0,0,0
tankCost = 27.8;57.4;0.2;3;0
displayCurrentTankCost = true
hasGUI = false
showInfo = true
techRequired = survivability;survivability;survivability;survivability;recycling
}

...or something similar

I can see this being useful for configuring tanks for fuels that aren't available early at the begining of the tech tree, but are unlocked later.

Share this post


Link to post
Share on other sites

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.