Jump to content

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


FreeThinker

Recommended Posts

Hm, I'm still having that weird VAB problem when first part to place is IFS-enabled part - can't attach more parts; have to load some craft and press "new" to workaround this IIRC... What can be wrong? Yes I have CryoEngines installed too.

I wasn't aware of this bug, thanks. An exception is raised when you start with a IFT, I guess some calls are not done which are done normally when you add it to another part.

Edited by FreeThinker
Link to comment
Share on other sites

There's a lot of decimals attached to the weight of each resource. Might I recommend displaying only 2-4 decimal places?

Personaly, I like high accuracy, but I understand other people on't like this. I will add a format proerty which will allow you to specify thr amount of decimals

Link to comment
Share on other sites

I'm having some problems with the fuel switch script over at the NFT thread.

For some reason, IFS throws a fit with the NFP tank weight. The correct weight is calculated by Module Manager (the tank is configured correctly in ModuleManager cache). I get something like this:

[LOG 07:31:47.509] InsterstellarFuelSwitch: error parsing resource amount 0/0: '90,110': '90'

[LOG 07:31:47.510] InsterstellarFuelSwitch parseDoubles: invalid float: tankCost [len:0] '']

and this:

[LOG 07:34:13.896] InsterstellarFuelSwitch nextTankSetupEvent selectedTankSetup++ = 1

[LOG 07:34:13.896] InsterstellarFuelSwitch assignResourcesToPart calledByPlayer reset configuredAmounts

[LOG 07:34:13.897] InsterstellarFuelSwitch assignResourcesToPart parsing configuredAmounts =

[LOG 07:34:13.897] InsterstellarFuelSwitch assignResourcesToPart setupTankInPart = 1

[LOG 07:34:13.898] InsterstellarFuelSwitch assignResourcesToPart tankList[1].Resources[0].amount * 1 = 28856.25

[LOG 07:34:13.898] InsterstellarFuelSwitch assignResourcesToPart tankList[1].Resources[1].amount * 1 = 2885.625

[LOG 07:34:13.899] InsterstellarFuelSwitch setupTankInPart removing resource: LqdHydrogen

[LOG 07:34:13.899] InsterstellarFuelSwitch setupTankInPart adding new resources: LqdHydrogen;Oxidizer;

[LOG 07:34:13.900] InsterstellarFuelSwitch: UpdateMass to (0 + 0) * 1 = 0

[LOG 07:34:13.901] InsterstellarFuelSwitch setupTankInPart show Resource mass GUI

from the log.

I think it is a typecasting error somewhere in the code. I do use float numbers for the mass of the tank.

Link to comment
Share on other sites

[h=2]Version 1.11 for Kerbal Space Program 1.0.2[/h] Released on 2015-06-08

  • Fixed IFS in Root object not responding after creation
  • Fixed Initialization error messages
  • Added property which allows you to override resource formatting. Default format is 0.0000000

- - - Updated - - -

I'm having some problems with the fuel switch script over at the NFT thread.

For some reason, IFS throws a fit with the NFP tank weight. The correct weight is calculated by Module Manager (the tank is configured correctly in ModuleManager cache). I get something like this:

[LOG 07:31:47.509] InsterstellarFuelSwitch: error parsing resource amount 0/0: '90,110': '90'

[LOG 07:31:47.510] InsterstellarFuelSwitch parseDoubles: invalid float: tankCost [len:0] '']

and this:

[LOG 07:34:13.896] InsterstellarFuelSwitch nextTankSetupEvent selectedTankSetup++ = 1

[LOG 07:34:13.896] InsterstellarFuelSwitch assignResourcesToPart calledByPlayer reset configuredAmounts

[LOG 07:34:13.897] InsterstellarFuelSwitch assignResourcesToPart parsing configuredAmounts =

[LOG 07:34:13.897] InsterstellarFuelSwitch assignResourcesToPart setupTankInPart = 1

[LOG 07:34:13.898] InsterstellarFuelSwitch assignResourcesToPart tankList[1].Resources[0].amount * 1 = 28856.25

[LOG 07:34:13.898] InsterstellarFuelSwitch assignResourcesToPart tankList[1].Resources[1].amount * 1 = 2885.625

[LOG 07:34:13.899] InsterstellarFuelSwitch setupTankInPart removing resource: LqdHydrogen

[LOG 07:34:13.899] InsterstellarFuelSwitch setupTankInPart adding new resources: LqdHydrogen;Oxidizer;

[LOG 07:34:13.900] InsterstellarFuelSwitch: UpdateMass to (0 + 0) * 1 = 0

[LOG 07:34:13.901] InsterstellarFuelSwitch setupTankInPart show Resource mass GUI

from the log.

I think it is a typecasting error somewhere in the code. I do use float numbers for the mass of the tank.

Please try again with the new version and show me the IFS configuration

Link to comment
Share on other sites

  • Added property which allows you to override resource formatting. Default format is 0.0000000

Thanks!! But sorry, how do I go about changing the format? There's no in game setting, and I don't see anything in the config files... in fact most of the config files with this mod are totally blank.

Link to comment
Share on other sites

Thanks!! But sorry, how do I go about changing the format? There's no in game setting, and I don't see anything in the config files... in fact most of the config files with this mod are totally blank.

Look at the OP

[B]resourcesFormat = 0.0000[/B]

Link to comment
Share on other sites

Version 1.11 for Kerbal Space Program 1.0.2

Released on 2015-06-08

  • Fixed IFS in Root object not responding after creation
  • Fixed Initialization error messages
  • Added property which allows you to override resource formatting. Default format is 0.0000000

- - - Updated - - -

Please try again with the new version and show me the IFS configuration

You know what? I had a , instead of a ; between the values.


[COLOR=#333333][I][LOG 07:31:47.509] InsterstellarFuelSwitch: error parsing resource amount 0/0: '90[B],[/B]110': '90'
[/I][/COLOR]Right here -----------------------------------------------------------------------^

sometimes I am so dumb.

Thank you for trying to fix the issue anyways! I really appreciate it. Also, thank you for fixing the tank root problem. :)

Edited by pacbard
Link to comment
Share on other sites

Look at the OP

I see it now:P Just slapped on this MM.

@PART
[*]:HAS[@MODULE[InterstellarFuelSwitch]]:NEEDS[InterstellarFuelSwitch]
{
@MODULE[InterstellarFuelSwitch],*
{
%resourcesFormat = 0.000
}
}

Link to comment
Share on other sites

You know what? I had a , instead of a ; between the values.


[COLOR=#333333][I][LOG 07:31:47.509] InsterstellarFuelSwitch: error parsing resource amount 0/0: '90[B],[/B]110': '90'
[/I][/COLOR]Right here -----------------------------------------------------------------------^

sometimes I am so dumb.

Thank you for trying to fix the issue anyways! I really appreciate it. Also, thank you for fixing the tank root problem. :)

Yes, they are easy to overlook. To help to detect them, I made them warnings instead of information messages, this makes them stand out in the log better.

Link to comment
Share on other sites

Hello, could the recent update have messed with the deltaV values that KER shows somehow? I updated this plugin just now and the DeltaV on my rocket is off with several thousands now. It says i have 5.8k but it wont even get to orbit. I double checked and KER is set to atmospheric and to kerbin. What else could it be? It was showing the right values before i updated thats why i suspect this mod :) Sorry just wondering if anyone got the same problem.

Link to comment
Share on other sites

IFS only affects stored resources, nothing else. Although I have never hear or seen it, The worst that might theoretically happen is replacement of resources, causing you to lose delta V. There is a know issue that if you change the position of resource in the definition. The Fuelswitch think you have switched, and replaces the propellant by a different propellant at startup. Please very all you tanks and compare them with your vessel in you save file before the update.

Edited by FreeThinker
Link to comment
Share on other sites

Hello Freethinker, thanks for you reply. I figured it out. It was a problem with the root part. After i changed it, the correct deltaV values was showing. Im not sure what entirely was causing it because the staging was set up correctly. But i have the correct DeltaV values showing now! Thanks

Link to comment
Share on other sites

Hello Freethinker, thanks for you reply. I figured it out. It was a problem with the root part. After i changed it, the correct deltaV values was showing. Im not sure what entirely was causing it because the staging was set up correctly. But i have the correct DeltaV values showing now! Thanks

The delta-v calculator mods all assume that the root part is what you care about, so any delta-v that other parts of the ship have after separating from the root part will be ignored.

Link to comment
Share on other sites

Would you consider adding functionality to define resource amounts as a percent/decimal amount of total tank volume. This would make for faster conversion with many fuels like RealFuels.

Link to comment
Share on other sites

Would you consider adding functionality to define resource amounts as a percent/decimal amount of total tank volume. This would make for faster conversion with many fuels like RealFuels.

Yes I was considering this for some time, but I was not sure if there was any need for such a thing. One problem is the difference in volume of CRP resources and Stock resources . One way to implement this would be to assume all resource are 1u / 1l except stock resources (which is a fixed list of resources).

THe current definition for resource amount look like this


resourceNames = ArgonGas;CarbonDioxide;Hydrogen;KryptonGas;NeonGas;Nitrogen;Oxygen;XenonGas;Oxygen,CarbonDioxide;Structural
resourceAmounts = 224000;224000;224000;224000;224000;224000;224000;44800;112000,112000,0

Which could then be implemented with the following


VolumeInLiterUnits = 224000
VolumeInStockUnits = 44800
resourceNames = ArgonGas;CarbonDioxide;Hydrogen;KryptonGas;NeonGas;Nitrogen;Oxygen;XenonGas;Oxygen,CarbonDioxide;Structural
resourceAmounts = 100%;100%;100%;100%;100%;100%;100%;100%;50%,50%,0

Since we could assume 100% is the default, and VolumeInStockUnits is 20% of VolumeInLiterUnits, the following should also work:


VolumeInLiterUnits = 224000
resourceNames = ArgonGas;CarbonDioxide;Hydrogen;KryptonGas;NeonGas;Nitrogen;Oxygen;XenonGas;Oxygen,CarbonDioxide;Structural
resourceAmounts = ;;;;;;;;50%,50%,0

Edited by FreeThinker
Link to comment
Share on other sites

Heya, I am currently trying to make Near Future Technologies RealFuels compatible and have hit a wall with Construction. It is using the IFS to create parts with different tanks and textures (correct me if am describing this wrongly), however the tank contents RF offers are too varied to just change a few values in the IFS module of the part file. A servicemodule tank will for example hold many different kinds of hypergolic propellants as well as electric charge - doing this with anything but RF would be quite the chore and get overly cluttered quickly.

Now, from what I gathered, IFS does not allow me to add something more complex than tanks, like RF's ModuleFuelTanks as a switchable option to a part. The second option that comes to mind would be making a bunch of different part.cfgs that each use one of the different textures IFS applies ingame and let RF handle things from then on. What I do not know is how to do that - what I would need to include in the part.cfg to create a tank with one of the distinct visual options IFS provides ingame? Hints greatly appreciated :)

Link to comment
Share on other sites

I don't understand the question

What do you mean something more complex that tank, IFS allow switch any resourses, which can include any exotic, etherial or abstract resources like Electric Charge, Antimatter or ResearchResult

Edited by FreeThinker
Link to comment
Share on other sites

Sorry, I might have expressed myself a little convolutedly.

Near Future Construction adds parts than can have different visuals and tank contents using IFS, and I want to make them RealFuels compatible. RF has a huge amount of possible resources, and doing all of them with IFS is not practical. RF uses ModuleFuelTanks to define what and how much of it goes into a certain tank, so I need to add that to the different versions of the part. For example, of the tanks in the screenshot, the one on the left needs something like

    
MODULE
{
name = ModuleFuelTanks
volume = 7000
type = ServiceModule
}

and nothing else, the next one needs something similar but slightly different. Now, if those were separate parts, I just write a MM config adding what I need and removing what I do not - they are, however just two parts using IFS. So I need to either (a) add those RF Modules with IFS (I am not sure whether IFS supports something like that) or (B) split those two parts up into many individual ones, so instead of having all those tanks in the screenshot handled by IFS I have each of them as individual parts with individual appearances. I am asking here because I do not know whether IFS would support the more elegant (a), or how to "split" the parts handled by IFS into their individual forms (how to make a part that looks like exactly one of the ones in the screenshot).

Edited by Tellion
Link to comment
Share on other sites

Yea, its basically the visual part giving me trouble. I need either for IFS to push RF modules in the different versions or to "reverse engineer" what IFS does, eg. split all those different tanks up into their own part.cfgs and then modify those... No idea whether the first is possible and no idea how to do the second ._.

Link to comment
Share on other sites

Alright, now I understand, you want to switch Modules, that actually quite a neat idea and I was investigating something similar which was to add modules from external mods to a part. This actually a very powerful concept, as it would allow you do dynamically completely reconfigure a part. Once I figure that out, I will look if I can realize your idea

Link to comment
Share on other sites

  • 2 weeks later...

Really like this mod. Switching tanks is so helpful.

Got a question though, is there a way to have a tank type require electricity for storage (and specify it in the IFS config)? I'm thinking about editing cyrogenic fuel tanks to require electrcity, but I'm not sure how to configure it for IFS tanks.

Link to comment
Share on other sites

Really like this mod. Switching tanks is so helpful.

Got a question though, is there a way to have a tank type require electricity for storage (and specify it in the IFS config)? I'm thinking about editing cyrogenic fuel tanks to require electricity, but I'm not sure how to configure it for IFS tanks.

I'm currently working on a 2.0 version which will have Cryogenic support which works in conjunction with KSP Heating system. Electric requirment or Boil-off will be automatically calculated based on how fast a tank heats up. This means by increasing the tank insulation, power cost / boiloff will increase realistically. The only requirements are that all stored resources have specific heating specified (in their resource definition) and you have to include a list of the boiling temperatures and Latent Heat vaporization energy

For now, I will release a update which should help get rid of one more of those warning messages

Version 1.12 for Kerbal Space Program 1.0.3

Released on 2015-06-23

  • Recompile for KSP 1.0.4

Edited by FreeThinker
Link to comment
Share on other sites

Seems to be some kind of problem between last update (1.12) and novapunch un 1.04.

K1 tanks in novapunch have decouplers and fuel, but if I use 1.12 they don't work, the decoupler is not shown in staging and when the ship is like the decoupler is active from the start even without touching anything.

With 1.11 (even with the warning in KSP 1.04) this doesn't happen. Not 100% sure if this mod, since I have a lot of mods, but so far this seems to be the only incompatibility I have encountered and it is removed if I uninstall this mod (which I don't want to) or I use the old version.

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...