Jump to content

[1.4.1] Fuel Tanks Plus 2.0.2 (2018-03-14)


NecroBones

Recommended Posts

I am using game version 1.1.3.  It was working fine with 1.1.3 up until that latest patch. I am assuming the other guy having the same problem is on 1.1.3 as well.

Thanks for the speedy response.

I will update to 1.2 now!

Edited by zeppie
Link to comment
Share on other sites

15 hours ago, NecroBones said:

The latest IFS versions can be downloaded here.

This beta ink is now obsolete, please download the latest 2.2.3 release from Here (note the pre-1.2 label is incorrect)

Notice the property displayTankCost has been fixed improved and when set to true, it now accurately shows both tank cost, wet resource cost and total cost.

Edited by FreeThinker
Link to comment
Share on other sites

  • 2 weeks later...

Did radial tanks change default resource? IIRC it was Monoprop, but now it is LFO. And I've got a conflict with Cryogenic Engines, which rewrites LFO tanks to a set of LF/LH2/O combinations without Monoprop.

...no. Something else has changed.

I've tried to order radial tanks fuel switch patch with :AFTER[zzz_CryoTanks] and :BEFORE[zzz_CryoTanks], it didn't work.

...There is a typo in radial tank patch: @PART[TTPtankR??]. But no change after fixing it.

 

 

Edited by Psycho_zs
Link to comment
Share on other sites

On 10/22/2016 at 10:38 AM, Psycho_zs said:

Did radial tanks change default resource? IIRC it was Monoprop, but now it is LFO. And I've got a conflict with Cryogenic Engines, which rewrites LFO tanks to a set of LF/LH2/O combinations without Monoprop.

...no. Something else has changed.

I've tried to order radial tanks fuel switch patch with :AFTER[zzz_CryoTanks] and :BEFORE[zzz_CryoTanks], it didn't work.

...There is a typo in radial tank patch: @PART[TTPtankR??]. But no change after fixing it.

 

 

I've fixed the typo for the next release. It was on the B9 Part Switch config, so if you're not using that, then it wouldn't have made a difference. The patches are set up to step aside if you're using Cryo Engines or Cryo Tanks, or Real Fuels, or Modular Fuel Tanks (or any mod that includes those). So if you're using CryoEngines, then it's definitely relying on their fuel configs.

Link to comment
Share on other sites

13 minutes ago, Psycho_zs said:

I have a local dirty fix (see Cryo Engines thread), but what would be the correct way of preserving monoprop in radial tanks?

 

I suppose it's always possible to make a patch that has ":FINAL" so that it runs after everything else, and removes the fuel configs that Cryo Engines adds, and re-adds what you want.

 

I'm not sure if things have changed recently, but it used to be that CryoEngines would add its own fuel configs whether I had already put patches on it or not, and of course it adds some fuel types too, so I've always set up my patches to step aside if CryoEngines is present. But we can rethink that for the monoprop tanks if there's a way to get it to play nice with CryoEngines. I haven't looked at it in a while though.

 

Link to comment
Share on other sites

me again, with another patch for you.

So you have these lovely "Nuclear Fuel Tanks" that only store LiquidFuel, but when you use a mod like Kerbal Atomics that converts atomic engines to using LH2 instead of LiquidFuel, these tanks are left in a bit of an awkward state.

Anyway, I "borrowed" the fuel tank switching patch from Nertea's CryoEngine's mod (see below), and modified it slightly so it would work with the fuel tanks in question. The original patch uses B9PartSwitch, as does this one, but luckily you have a version of your mod for that. It specifically won't work for versions with IFS or Firespitter. You have a head for these things (I don't), so I'm sure you could rework it as needed or desired.

As it stands, the tanks in question now have the option of storing LH2, LH2/OX, or OX. The Size3 drum, for example, stores 72,000 LH2, or 43,200 LH2 / 2880 OX, or 7,200 OX - whereas it originally stored 7,200 LiquidFuel.

Since they are dedicated drums for storing this type of fuel, I also went ahead and gave them the full CryoTank module (with cooling to prevent boiloff). Normally, they lack the cooling option (which costs EC). If you dislike this, I believe all you have to do is remove the "CoolingCost" line in the ModuleCryoTank below, to restore default behavior (the CryoTank mod adds the module to all fuel tanks).

Considering that visually, your tanks and the tanks from CryoTanks look quite different, none of this might make any sense from a realism perspective. But it made sense to me from a gameplay perspective; at the very least it gives the tanks a purpose.

 

Since I basically copied and pasted the patch (albeit with edits) from CryoTanks, I feel it fair to mention its license, which is CC-BY-NC-SA-4.0, which incidentally is the same as your's, so I don't think it matters in the end. But if I'm to plagiarize, I should at least give credit where credit is due, and that is entirely with @Nertea, as I changed very little.

 

As always, tested and working. If you have any suggestions for improvements, let me know, as I feel I went about it in a bit of a ham handed manner (I'm not the cleverest of kerbs when it comes to such things).

(see below for code)

Link

EDIT: I run the patch first thing (at the 000_Rast level), so the tanks already have ModuleCryoTank by the time the CryoTank mod sees them and therefore doesn't add it in again, but your mod comes after that mod, so you might get a second ModuleCryoTank, added by this mod. Unsure about this though. Could probably over ride the other one easily enough.

//FTP Nuclear Tanks
@PART[TPtank?mL0*-Nuke]:HAS[!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch]]:NEEDS[FuelTanksPlus&CryoTanks]:NEEDS[!modularFuelTanks&!RealFuels]
{

  %LF = #$RESOURCE[LiquidFuel]/maxAmount$
  //%OX = #$RESOURCE[Oxidizer]/maxAmount$
  %OX = 0

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

  %massOffset = #$totalCap$
  @massOffset *= 0.000625 // standard dry mass per units of LF/OX // 0.000025
  @massOffset *= -1

  @LF *= #$@RESOURCE_DEFINITION[LiquidFuel]/unitCost$
  //@OX *= #$@RESOURCE_DEFINITION[Oxidizer]/unitCost$

  %costOffset = #$LF$
  @costOffset += #$OX$
  @costOffset *= -1

  !RESOURCE[LiquidFuel] {}
  !RESOURCE[Oxidizer] {}

  MODULE
  {
    name = ModuleB9PartSwitch
    moduleID = fuelSwitch
    switcherDescription = Tank Type
    baseVolume = #$../totalCap$
    SUBTYPE
    {
      name = LH2/O
      tankType = LH2O
      addedMass = #$../../massOffset$
      addedCost = #$../../costOffset$
    }
    SUBTYPE
    {
      name = LH2
      tankType = LH2
      addedMass = #$../../massOffset$
      addedCost = #$../../costOffset$
    }
    SUBTYPE
    {
      name = Oxidizer
      tankType = OX
      addedMass = #$../../massOffset$
      addedCost = #$../../costOffset$
    }
    //SUBTYPE
    //{
    //  name = LiquidFuel
    //  tankType = LF
    //  addedMass = #$../../massOffset$
    //  addedCost = #$../../costOffset$
    //}
    //SUBTYPE
    //{
    //  name = LF/O
    //  tankType = LFOX
    //  addedMass = #$../../massOffset$
    //  addedCost = #$../../costOffset$
    //}
  }

	MODULE
	{
		name =  ModuleCryoTank
		FuelName = LqdHydrogen
		FuelTotal = #$../LH2$
		BoiloffRate = 0.05 // in % per hour
		CoolingCost = 0.08 // in Ec per 1000 units per second
	}

}

 

Link to comment
Share on other sites

On 10/28/2016 at 7:27 PM, Deimos Rast said:

me again, with another patch for you.

 

 

Cool, I'll take a look. I won't have time today though.

 

One thing though, is that having more than one "NEEDS" can be a bit inconsistent in how it's interpreted. It used to be that they were treating like an "AND", but more recently MM seems to be doing it more like an "OR" condition, so I try not to double those up anymore since I don't know when/if the interpretation may change and break things.

 

It's probably possible to work this into the FS/IFS rules too. But man, it gets complicated really quickly trying to support all three switchers while also having different combinations for different fuel mods to support. :)  But I suppose at this point, "complicated MM configs" is my middle name, or something. :wink:  :D

 

 

Link to comment
Share on other sites

11 hours ago, NecroBones said:

 

Cool, I'll take a look. I won't have time today though.

 

One thing though, is that having more than one "NEEDS" can be a bit inconsistent in how it's interpreted. It used to be that they were treating like an "AND", but more recently MM seems to be doing it more like an "OR" condition, so I try not to double those up anymore since I don't know when/if the interpretation may change and break things.

 

It's probably possible to work this into the FS/IFS rules too. But man, it gets complicated really quickly trying to support all three switchers while also having different combinations for different fuel mods to support. :)  But I suppose at this point, "complicated MM configs" is my middle name, or something. :wink:  :D

 

 

Actually, I should warn you, that patch is making MM cranky. I didn't catch it at first, because I'm never by KSP when it's loading, but looking through my log I see the following for each of the parts, so I clearly did something wrong. It's odd though, because it works perfectly in game.

I'm pretty sure I know why it is ("FuelTotal = #$../LH2$" is referring to $LH2 which doesn't exist in my patch version). The issue is that the original patch specifically deals with tanks that either already have LH2 in them, (then adds to them the option of adding a dash of Oxidizer) or are LFO tanks (and then they get the works). Your tanks are neither, so I combined aspects of both patches.:D

TLDR: I'm going to try commenting out the FuelTotal line and see if MM will leave me alone. The other option would be to give it the non-boiloff proof cryotank module, which wouldn't be the end of the world, but meh.

Oh, and Happy Halloween.

[ModuleManager] Cannot find key LH2 in PART
 
[ModuleManager] Error - Cannot parse variable search when inserting new key FuelTotal = #$../LH2$

 

Link to comment
Share on other sites

  • 3 weeks later...

I see some inconsistency in amounts, all stock and ftp tanks have different ratios.

For stock tanks all volumes are equal, but not for ftp tanks.

Eg: FL-T400 can have 180LF+220Ox or 400LF or 400Ox or 400MP, FL-T1200-FTP  can have 540LF+660Ox or 1080LF or 1320Ox or 1410MP. Only LF+Ox value looks right.

FTP - 1.11, IFS - 2.2.9



 

Edited by angelix
Link to comment
Share on other sites

On ‎11‎/‎18‎/‎2016 at 1:47 AM, PhantomC3PO said:

Hi @NecroBones, this may be a really dumb question, but is there a way to get these cool textures to go onto the shrouds that go on the upper stage engines? Sorry if this question has already been answered, but I cant find anything that seems to answer this.

It's something I've been wanting to look into, but there's some added complexity with it. So I'm not sure when yet. :)

 

On ‎11‎/‎24‎/‎2016 at 6:56 AM, angelix said:

I see some inconsistency in amounts, all stock and ftp tanks have different ratios.

For stock tanks all volumes are equal, but not for ftp tanks.

Eg: FL-T400 can have 180LF+220Ox or 400LF or 400Ox or 400MP, FL-T1200-FTP  can have 540LF+660Ox or 1080LF or 1320Ox or 1410MP. Only LF+Ox value looks right.

 

OK, there must be some old numbers still floating around. I had at one point made the LF and OX amounts based on double what their component amounts were for LF+OX, and more recently instead changed them to be equal to the LF+OX total. I may have missed a few cases. I'll have to look for that.

 

Link to comment
Share on other sites

On ‎12‎/‎3‎/‎2016 at 7:45 PM, emirkustirika said:

https://drive.google.com/file/d/0Bx6BfE4kkgiwbmhOLU5BVjF1N2c/view?usp=sharing

 

why ? this plate in my space craft ? 

pls help ? pls look the photo \ link

what is the Solution ?

https://www.dropbox.com/s/vcwagb7j4uuit7m/Untitled.jpg?dl=0

 

Unfortunately it's a stock bug. The plates are part of the tanks, but there's a bug that makes them appear out of position. You can turn off the individual shrouds in the VAB by right-clicking on the tanks when building your vehicle.

 

Link to comment
Share on other sites

21 hours ago, NecroBones said:

 

Ne yazık ki bir stok böcek. Plakalar tanklarının parçası olan, ama onları pozisyon dışında görünür kılan bir hata var. Sen bireysel shrouds kapatabilirsiniz Vab aracınızı oluştururken tanklarda sağ tıklayarak.

 

thankss so much i try new craft thank you again

Link to comment
Share on other sites

  • 1 month later...
19 minutes ago, westamastaflash said:

Any way to remove the IFS dependency? I like using the configurable containers mod instead of IFS, and would prefer to load as few DLL mods as possible to improve game performance.

No, it's designed around mesh-switching. If you don't want IFS specifically, it also works with Firespitter or B9 Part Switch.

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